mirror of
https://gitlab.com/dwt1/dotfiles.git
synced 2026-04-23 19:40:24 +10:00
Delete rename.sh
This commit is contained in:
@@ -1,32 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
function hc() {
|
|
||||||
herbstclient "$@"
|
|
||||||
}
|
|
||||||
|
|
||||||
tags=$(hc tag_status)
|
|
||||||
current=""
|
|
||||||
|
|
||||||
for i in ${tags}; do
|
|
||||||
if [[ ${i:0:1} == '#' ]]; then
|
|
||||||
current=${i}
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
# If : is in current tag
|
|
||||||
if [[ "$current" == *:* ]]; then
|
|
||||||
num=$(echo $current | sed -e 's/#\([^:]*\):.*/\1/')
|
|
||||||
name=$(echo $current | sed -e 's/#[^:]*:\(.*\)/\1/')
|
|
||||||
|
|
||||||
old_tag=${num}:${name}
|
|
||||||
new_name=$(echo ${name} | dmenu -p "Rename #${num}: ")
|
|
||||||
new_tag=${num}:${new_name}
|
|
||||||
else
|
|
||||||
old_tag=$(echo ${current} | sed -e 's/^#//')
|
|
||||||
new_name=$(echo "" | dmenu -p "Rename #${old_tag}: ")
|
|
||||||
new_tag="${old_tag}:${new_name}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
hc rename "${old_tag}" "${new_tag}"
|
|
||||||
hc rename ${num}:${name} "${num}:${new_name}"
|
|
||||||
Reference in New Issue
Block a user