[download]

local/bin/windows-menu

   1 #!/bin/bash
   2 #         ░███████
   3 #       ░███████       D O T F I L E S 
   4 #       ░███████       W I N D O W S - M E N U 
   5 #    ░█████████████
   6 #       ░███████
   7 #       ░███████       LGPL <http://www.gnu.org/licenses/>
   8 #       ░██  ░██
   9 #       ░██  ░██   (C) 2020 Alexey Gagin <http://www.lexa.by/dotfiles/>
  10 
  11 if [[ ! $MENU && $(command -v rofi) ]]; then
  12     rofi -show window -display-window "$(icon windows)"
  13     exit
  14 fi
  15 
  16 wmctrl -l | sort -k 2 | awk '$2 > -1' |
  17 menu -Li windows | cut -d ' ' -f 1 | xargs -r wmctrl -ia