diff --git a/herbstluftwm/autostart b/config/herbstluftwm/autostart similarity index 100% rename from herbstluftwm/autostart rename to config/herbstluftwm/autostart diff --git a/herbstluftwm/panel.sh b/config/herbstluftwm/panel.sh similarity index 100% rename from herbstluftwm/panel.sh rename to config/herbstluftwm/panel.sh diff --git a/local/bin/eztv_add_selection.sh b/local/bin/eztv_add_selection.sh new file mode 100755 index 0000000..bde0159 --- /dev/null +++ b/local/bin/eztv_add_selection.sh @@ -0,0 +1,3 @@ +wget "$(xclip -o)" -O "eztv_add_selection.html" +cat "eztv_add_selection.html" | grep 'class="magnet"' | sed 's/.*\("magnet:[^"]*"\).*/\1/' | xargs transmission-remote --add +rm "eztv_add_selection.html" diff --git a/local/bin/nyaa_add_selection.sh b/local/bin/nyaa_add_selection.sh new file mode 100755 index 0000000..aa34036 --- /dev/null +++ b/local/bin/nyaa_add_selection.sh @@ -0,0 +1 @@ +xclip -o | sed -n 's/view/download/p' | xargs transmission-remote --add diff --git a/local/bin/plop.mp3 b/local/bin/plop.mp3 new file mode 100644 index 0000000..b0bbe06 Binary files /dev/null and b/local/bin/plop.mp3 differ diff --git a/local/bin/pwcalc.sh b/local/bin/pwcalc.sh new file mode 100755 index 0000000..5a83eb9 --- /dev/null +++ b/local/bin/pwcalc.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +# Reading input {{{ + +# Terminal +#read -p "Alias: " alias_ +#read -s -p "Secret: " secret + +# GUI +pair="$(zenity --password --username --title="Password Calculator")" +alias_="${pair%|*}" +secret="${pair#*|}" + +pass="$(echo -n "$secret$alias_" | shasum | xxd -r -p | base64 | colrm 17)" + +echo -n "$pass" | xclip +notify-send "xclip set to ${pass:0:3}...${pass:(-3):3}" + diff --git a/local/bin/shoot.sh b/local/bin/shoot.sh new file mode 100755 index 0000000..7f6304a --- /dev/null +++ b/local/bin/shoot.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +file="$(mktemp XXXXXX.png)" +scrot $* "$file" +chmod 755 $file +scp -P 2222 "$file" ftper@178.116.153.116:'~/Pictures' +rm "$file" +url="http://178.116.153.116:8080/$file" +notify-send "Screenshot uploaded to $url" +echo "$url" | xclip -sel c + diff --git a/local/bin/sound_control.sh b/local/bin/sound_control.sh new file mode 100755 index 0000000..f2acf78 --- /dev/null +++ b/local/bin/sound_control.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +command="${1:=toggle}" + +current="$(amixer get Master | sed -n '/%/s/.*\[\(.*\)%\].*/\1/p' | head -1)" + +case $command in + toggle) amixer set Master toggle ;; + down) amixer set Master "$((current - 5))%" ;; + up) amixer set Master "$((current + 5))%" ;; + *) notify-send "learn to volume" ;; +esac diff --git a/local/bin/sound_notification.sh b/local/bin/sound_notification.sh new file mode 100755 index 0000000..6323825 --- /dev/null +++ b/local/bin/sound_notification.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +mpv ./plop.mp3 + diff --git a/local/bin/spawn b/local/bin/spawn new file mode 100755 index 0000000..459994d --- /dev/null +++ b/local/bin/spawn @@ -0,0 +1,3 @@ +#!/bin/bash + +herbstclient spawn $@