:: Re: [DNG] Devuan docs for dmenu
トップ ページ
このメッセージを削除
このメッセージに返信
著者: Vicente Vera
日付:  
To: Steve Litt
CC: dng
題目: Re: [DNG] Devuan docs for dmenu
Nice! Thank you.

Here's a simple script I wrote for launching programs in X (dmenu_run
is overkill IMO):

---
#!/usr/bin/env bash

# Terminal emulator program (st is suckless.org simple terminal)
terminal=st

# Array of programs we want in our menu
programs=(cmus
          emacs
          firefox-esr
          geeqie
          libreoffice
          palemoon)


# Checks whether above programs are available in $PATH and sends a new
# list to dmenu; your selection will be saved in the $chosen_program
# variable
chosen_program=$(for program in "${programs[@]}"; do
                     [[ $(command -v $program) ]] || continue
                     echo "$program"
                 done | dmenu -i -b -l "${#programs[@]}")


# Run the program! cmus is a special case because it has no GUI
case "$chosen_program" in
    cmus)
        exec /bin/bash -c "${terminal} -e cmus" >/dev/null 2>&1
        ;;
    *)
        exec "$chosen_program" >/dev/null 2>&1
        ;;
esac
---


Hope it proves to be useful as reference.

Also, this thread is full of great ideas:
https://bbs.archlinux.org/viewtopic.php?id=80145

2016-07-12 21:36 GMT-04:00 Steve Litt <slitt@???>:
> Hi all,
>
> As promised, I created a documentation page for using dmenu in Devuan:
>
> http://troubleshooters.com/linux/devuan_docs/devuan_dmenu.html
>
> I licensed it GPL2.
>
> Hope you like it, use it to best advantage.
>
> SteveT
>
> Steve Litt
> July 2016 featured book: Troubleshooting Techniques
>      of the Successful Technologist
> http://www.troubleshooters.com/techniques
> _______________________________________________
> Dng mailing list
> Dng@???
> https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng