aboutsummaryrefslogtreecommitdiffstats
path: root/.config/herbstluftwm
diff options
context:
space:
mode:
authorkatherine <ageha@airen-no-jikken.icu>2024-03-20 14:29:50 -0700
committerkatherine <ageha@airen-no-jikken.icu>2024-03-20 14:29:50 -0700
commitd2c4188780e9037a894c1df0d62ad76ce67bb245 (patch)
treeba631b1e7ea39b45ace2ea42e80e09fdf35bc322 /.config/herbstluftwm
parentf0f66dd1db43b52a156576d7306dbe448369c3f0 (diff)
downloaddotfiles-d2c4188780e9037a894c1df0d62ad76ce67bb245.tar.gz
drop wmctrl from switcher
ought to have done long while ago
Diffstat (limited to '.config/herbstluftwm')
-rwxr-xr-x.config/herbstluftwm/switcher.sh23
1 files changed, 11 insertions, 12 deletions
diff --git a/.config/herbstluftwm/switcher.sh b/.config/herbstluftwm/switcher.sh
index 2558303..7199e1c 100755
--- a/.config/herbstluftwm/switcher.sh
+++ b/.config/herbstluftwm/switcher.sh
@@ -5,17 +5,16 @@ source ~/.config/init/vars
typeset -i choice
nums=()
lines=""
-while read -rA line; do
- nums=( "${nums[@]}" "${line[1]}" )
- if [[ -z "$lines" ]]; then
- lines="${line[@]:3}"
- else
- lines="${lines}\n${line[@]:3}"
- fi
-done < <(wmctrl -l)
-echo -e "$lines" | nl -w 2 -s ") " | dmenu -fn "${bfont}:size=${bfont_size}" -i -h "$bheight" \
- -nb "$bar_bg" -nf "$bar_fg" -sb "$bg_focus" -sf "$fg_focus" \
- -p "Select:" -l 40 | cut -d ')' -f 1 | read choice
+hc foreach --unique T tags.by-name echo T | cut -d '.' -f 3- | while read t; do
+ hc list_clients --title --tag=$t
+done | while read -rA l; do
+ nums+=( $l[1] )
+ [[ -z $lines ]] && lines=${l[@]:1} || lines="${lines}\n${l[@]:1}"
+done
-herbstclient jumpto "${nums[$choice]}"
+echo -e $lines | nl -w 2 -s ") " | dmenu -fn "${bfont}:size=${bfont_size}" -i \
+ -h $bheight -nb $bar_bg -nf $bar_fg -sb $bg_focus -sf $fg_focus \
+ -p "Select:" -l 40 | cut -d ')' -f 1 | read choice
+
+hc jumpto $nums[$choice]