Added some WM functions

This commit is contained in:
Tom Willemsen 2012-01-30 00:34:38 +01:00
parent 412b27682d
commit 3c43c86150
2 changed files with 20 additions and 0 deletions

10
bin/kill_tag Executable file
View file

@ -0,0 +1,10 @@
#!/bin/zsh
TAGS=( $(herbstclient tag_status 0 | tr ":\!.+#" " ") )
FOO=$(for i in "${TAGS[@]}"; do echo $i; done | dmenu)
if [[ "${TAGS[@]}" == *"$FOO"* ]]; then
herbstclient merge_tag $FOO
else
notify-send "Unknown tag: $FOO"
fi

10
bin/switch_tags Executable file
View file

@ -0,0 +1,10 @@
#!/bin/zsh
TAGS=( $(herbstclient tag_status 0 | tr ":\!.+#" " ") )
FOO=$(for i in "${TAGS[@]}"; do echo $i; done | dmenu)
if [[ "${TAGS[@]}" != *"$FOO"* ]]; then
herbstclient add $FOO
fi
herbstclient use $FOO