diff options
Diffstat (limited to '.old/dmenunametag')
-rwxr-xr-x | .old/dmenunametag | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/.old/dmenunametag b/.old/dmenunametag new file mode 100755 index 0000000..0458c79 --- /dev/null +++ b/.old/dmenunametag @@ -0,0 +1,30 @@ +#!/bin/sh +numtags=9 +rcn="Remove Current Name" +defnames="$rcn\nCode\nCompile\nTest\nDebug\nEdit" +while !([ $tagnum -ge 1 2>/dev/null ] && [ $tagnum -le $numtags ]); do + tagnum=$(seq $numtags | dmenu -p "Choose tag: ") + [ "$tagnum" = "" ] && exit +done +name="$(echo -n "$defnames" | dmenu -p "Rename tag $tagnum to: ")" +[ "$name" = "$rcn" ] \ + && nametag $tagnum r \ + || nametag $tagnum n "$name" + +# Force bar to update by setting the root name to itself since there is currently a bug in the window manager +#xsetroot -name "$(xprop -root WM_NAME | sed -n 's/^WM_NAME(STRING) = \"\(.*\)\"/\1/p')" + +# Old mode +#while [ "$action" != "Rename" ] && [ "$action" != "Remove" ]; do +# action=$(echo -n "Rename\nRemove" | dmenu -p "Would you like to rename or remove this tag $tagnum's label? ") +# [ "$action" = "" ] && exit +#done +#case $action in +# Rename) +# name="$(echo -n "$defnames" | dmenu -p "Rename tag $tagnum to: ")" +# [ "$name" = "" ] && exit +# nametag $tagnum n "$name" +# ;; +# Remove) nametag $tagnum r ;; +# *) exit ;; +#esac |