add scripts and improve structure

This commit is contained in:
Felix Van der Jeugt 2014-12-19 00:26:04 +01:00
parent abce0ddb22
commit 358fc1cf93
10 changed files with 52 additions and 0 deletions

View File

@ -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"

View File

@ -0,0 +1 @@
xclip -o | sed -n 's/view/download/p' | xargs transmission-remote --add

BIN
local/bin/plop.mp3 Normal file

Binary file not shown.

18
local/bin/pwcalc.sh Executable file
View File

@ -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}"

11
local/bin/shoot.sh Executable file
View File

@ -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

12
local/bin/sound_control.sh Executable file
View File

@ -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

View File

@ -0,0 +1,4 @@
#!/bin/bash
mpv ./plop.mp3

3
local/bin/spawn Executable file
View File

@ -0,0 +1,3 @@
#!/bin/bash
herbstclient spawn $@