*nohtml*

local/bin/apps-menu

   1 #!/bin/bash
   2 
   3 rofi -show drun -display-drun "$(icon apps)" -columns 3 -terminal term
   4 command -v rofi && exit
   5 
   6 j4-dmenu-desktop --display-binary --dmenu 'menu -Li apps' --term term
   7 command -v j4-dmenu-desktop && exit
   8 
   9 find -L $(echo $PATH | tr : \\n) -type f -printf '%A+ %p\n' | sort -r |
  10 awk -F / '!a[$NF]++ { print $NF }' | menu -i apps | while read i; do
  11     x=
  12 
  13     ldd $(command -v $i) | grep -q libX11.so && x=1
  14     while read f; do grep -qwi terminal=true $f || x=1
  15     done < <(grep -lw $i /usr/share/applications/*.desktop)
  16 
  17     [[ $i == *-menu   ]] && x=1
  18     [[ $i == *-notify ]] && x=1
  19 
  20     if [[ $x ]]; then $i &
  21     else term $i & fi
  22 done