blob: b4ea69eb75d10bd37dc2b89353dcc8be0ed6e087 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#!/bin/sh
numtags=9
while !([ $tagnum -ge 1 2>/dev/null ] && [ $tagnum -le $numtags ]); do
tagnum=$(seq $numtags | dmenu -p "Choose tag: ")
[ "$tagnum" = "" ] && exit
done
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
if [ "$action" = "Rename" ]; then
name="$(dmenu -p "Rename tag $tagnum to: " <&-)"
[ "$name" = "" ] && exit
nametag $tagnum n "$name"
else
nametag $tagnum r
fi
# 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')"
|