Skip to content

u/MightyMerl

In this archive from Oct 2018 to Feb 2022

1
posts
28
comments
0
media
130
score

Hm sorry about your countries corruption.

Usually I have heard the companies have to sue people and for example sometimes have people in torrent chains monotoring ips and checking and sueing them later for copyright infringement or something. In my country and I believe internationally for the most part you arent being procecuted for anything thats not very sever (I dont think piracy) unless you have someone that want you procecuted because they have evidence you did something wrong.

Thats why usually if you were to engage in piracy its like playing lottery and if you mask your ips or move in safe torrent chains (idk exactly how if works but some groups are restrictive I heard) so there is no procecutor -- then again for arch isos you cannot be procecuted so it wouldnt really be piracy ;)

1 points

Hm true thats an option. Maybe Ill give qbittorrent a try... I always hate opening a webbrowser to download the new Arch Iso when updating so maybe thatll be a way to make it more convenient... man I really loved myself earlier for this joke but its so late idk if anyone gets it or if it is remotely funny

4 points

hm but if you get frustrated maybe dont use arch. You should choose what you think fits you well and if you want to tiker around to maximize your performance whilst not diving as deep as gentoo, arch works well as far as Ive heard and experienced myself. But if your stuff breaks and the whole virtual room is burning and you are dissatisfied AND you are annoyed by this and cant get it fixed, maybe trading a bit of performance for usability/ease is not a bad trade. your stats are pretty okay Im guessing you can disable stuff / tinker around with other distros too, maybe a headless debian from scratch works (idk I basically only used arch).

7 points

maybe refactor it to (to make it non bash, but if you have to use the other conversion you specifically probably just want to make it /bin/bash):

#!/bin/sh

open=$(xsel -o) # lower case because usually upper case is reserved for environment variables

case $open in

https://*|http://) firefox --new-tab “$open” ;;

*) firefox --new-tab “https://duckduckgo.com/?q=$open” ;; # notice this may break with weird characters or just spaces

esac

1 points

you can also prepend something like

clip=$(printf "primary\nsecondary\nclipboard\n" | ${dmenu} -p "selection")

and then change the xclip occurences with "-selection $clip"

​

also I havent tested the i3 stuff again and some stuff in there is specific to how brave sometimes opens in the same process and sometimes not, you might wanna drop that pert but I thought I'd include it, it also obviously misbehaves if not in i3, but it could be adjusted to another tiling WM.

​

also I took some of the snippets like the make-it-float section and the converter from some other exchanges idk where tho ...

​

also also a single line is hard because of the weird url encodings, but you could just take one of the lines of the first case thing and wrap them into a $() and then put the browser first. eg:

${search_engine}$(${convert_illegal_url} "$(xclip -o)")

into

$BROWSER "https://duckduckgo.com/?q=$(ILLEGAL_URL_PATH "$(xclip -o)")"

1 points

sorry for the delay, mines quite extensive, I guess.

​

#!/bin/sh
# search clipboard contents.
# THIS_FILE_PATH (normal|floating) (bang|ddg|url|arg [URL]|URL)
#
# FIRST ARG:
# normal: just open the final url in the web_browser (default: brave) # NEEDS brave / web_browser
# floating: open the final url in the web_browser but do some shenanigans to make it float in i3 without a rule # NEEDS brave / web_browser AND i3 AND wmctrl (AND awk)
# + alternatively use a rule with a side browser, I just didn't want my main browser floating all the time.
# SECOND ARG:
# bang: open a context menu first to select a duckduckgo bang to search in google or merriamwebster eg instead of duckduckgo! # NEEDS dmenu / alternative AND xclip AND url_converter (AND tr)
# ddg: just search the web with clipboard contents #NEEDS xclip AND URL_CONVERTER
# url: just open the clipboard contents as an url # NEEDS xclip
# arg: open the THIRD ARG as an url
# *: if no match just open SECOND ARG as url (legacy for me)
#
# the URL_CONVERTER is a script to transform illegal charcters into %XX unicode representations, anything that accepts a string as arg1 and outputs a transformed text will do (if you're daring even echo, ie not converting it)
# you could change the first line to bash instead of sh and uncomment the MARKED REGION or put the MARKED REGION as a file somewhere and GIVE ACTUAL LOCATION.
#
convert_illegal_url=~/Scripts/convert-url.sh # TODO: GIVE ACTUAL LOCATION
search_engine="https://duckduckgo.com/?q="
dmenu_command="dmenu"
web_browser="brave --incognito --new-window"
# illegal_url() {
# MARKED REGION :: uncomment the previous line if not using it as a seperate file
#
##!/bin/bash
#
## URL encode string and optionally store in shell variable
##
## usage: url_var <string> [var]
#
#LC_ALL=C
#encoded=""
#
#for (( i=0 ; i<${#1} ; i++ )); do
# c=${1:$i:1}
# case "$c" in
# [a-zA-Z0-9/_.~-] ) encoded="${encoded}$c" ;;
# * ) printf -v encoded "%s%%%02x" "$encoded" "'${c}" ;;
# esac
#done
#printf "%s" $encoded
# END OF MARKED REGION :: Uncomment the following 2 lines for not using an additional file
#}
# convert_illegal_url="illegal_url"
url=""
case $2 in
bang ) url="${search_engine}$(${convert_illegal_url} "$(printf " \n!g\n!mw\n" | ${dmenu_command} -p "w/ bang"| tr -d '\n') $(xclip -o)")" ;;
ddg ) url="${search_engine}$(${convert_illegal_url} "$(xclip -o)")" ;;
url ) url="$(xclip -o)" ;;
arg ) url="$3" ;;
* ) url="$2" ;;
esac
case $1 in
normal ) ${web_browser} "$url" ;;
floating )
${web_browser} "$url" &
pid="$!"
selfopen=false
for _ in $(seq 1 25); do
sleep 0.0005
if [ -z "$(ps -p $pid -o comm=)" ]; then
#winid="$(wmctrl -lp | cut -d' ' -f1 | tail -n1)"
selfopen=true
break
fi
done
if ! $selfopen; then
# Wait for the window to open and grab its window ID
winid=''
while : ; do
winid="$(wmctrl -lp | awk -vpid=$pid '$3==pid {print $1; exit}')"
test -z "${winid}" || break
done
# Focus the window we found
wmctrl -ia "${winid}"
fi
# Make it float
i3-msg floating enable > /dev/null
# Resize
i3-msg resize set 50 ppt 50 ppt > /dev/null
# Move it to the center for good measure
i3-msg move position center > /dev/null
;;
esac

1 points

cant you just leave out the bash? I think I have a systemd module with a just a path, the first line of your script then tells it to use bash — or am I wrong? does it have problems executing your script or maybe problems inside the script, maybe the modprobe needs root but the process isnt root (maybe check with a “”id > tmp/test”” as the first line and then “”cat tmp/test””)

1 points

yeah idk maybe read through my reddit posts on r/surfacelinux. I think Ive been quite reasonable. sometimes after not immediately finding a solution I posted a question and then looked for an answer and did find one in 2 out of 3 (I think) questions asked there (under only one I think I had been told to not use arch, and its not r/archlinux so idk). In the cases I found a solution I posted it for people using the search function like me in hopes theyll find my solution.

If you find I havent been using the best practice to this it would be awesome for me to know as I always want to improve.

Im just really annoyed by those people as I read the guides about posting questions first (I think its somewhere on the about page here or on another arch forum) and thought Id followed it at least to a base level and they are literally contributing nothing and probably dont know a solution nor use arch (I assume, but maybe Im blind idk).

6 points

I started with arch a few months ago, quickly uninstalled kde again and am happy with building/customizing my own OS with just as much overhead as needed and no random junk. love it and dont want to install windows ever again (probably have to at some point).

Fuck those people who didnt answer my handful of questions and instead urged me to switch over to another distro.

32 points

maybe check through the programs updated whether something could’ve influenced it (specifically the kernel or network manager are likely I guess) and possibly try rolling them back if nothing works (ie downgrading them)

1 points

hm. what hardware do you have? on most pcs youll have to press a FX key, on my laptop however I press power and volume up so be sure you find the appropriate buttons for your version. then you make the usb stick bootable as you probably know, and have it inside and press the buttons while starting

youve done that?

1 points

do you want win11 for use cases or just for playing around? if the latter, just get a vm google oracle box, it’s probably the easiest as most people use it. theres definitely youtube tutorials or preferably read the manual that comes with the software or is on its page

1 points

possibly consult the archcraft reddit/stack or whatever

or try tp find out about your hardware (for BIOS) or bootloeader (probably GRUB) for maybe dual booting from there (idk if possible but sounds plausible, look for that) you probably want to start with your hardware documentation or a better place depending on how different archcraft is from arch

4 points

Wtf. This sub. It’s a closeup of a power symbol. It is charging so the battery power hardly matters and it seems to be plugged in just the moment such that the power of the battery is ~0% if it were 0.4% it would sensibly Display 0% a little weird maybe, but actually a feature not even a bug and unless this is literally your screen how in hell is this software GORE? Nothing against you in particular tho the critique should be considered by you but this sub feels like rarely having software gore and often have like crappy design or bugs, idk I guess soon I’ll just unsub tho I enjoy software gore if well done. Sad

0 points

Well gore? This feels like it happens regularly to my phone when turning it a lot while switching apps and then I switch or after a while it just returns to normal. Isn’t here supposed to be like app icons turning around and all inverted for no reason whatsoever or something and not some teeny tiny wrongly oriented bar? And then it is even a beta... disappointment

Btw don’t wanna bash on you particularly just seen this happen a lot and that’s not what I signed up for; isn’t there some funny bug subreddit which would be more suitable

2 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.