You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

rofi-bspwm-unhide 468B

123456789101112
  1. #!/bin/sh
  2. win=$(bspc query -N -n .hidden.window)
  3. n=$(for w in $win; do
  4. name=$(xprop -id "$w" WM_CLASS 2>/dev/null | sed -r 's/.+ "(.+)"$/\1/')
  5. title=$(xprop -id "$w" WM_NAME 2>/dev/null | sed -r 's/.+ "(.+)"$/\1/')
  6. [ "$name" = "WM_CLASS" ] && echo "node $w" || echo "$name \"$title\""
  7. done | rofi -dmenu -no-custom -format i -p 'Unhide: ')
  8. if [ -n "$n" ]; then
  9. id=$(echo "$win" | sed -n "$((n+1))p")
  10. bspc node "$id" -d focused
  11. bspc node "$id" -g hidden=off
  12. fi