Add context menu for cmus

Requires the `set_term_title` in cmus to be set to false, otherwise cmus
will set the WM_TITLE to the currently playing song / album, which makes
it hard to determine that the current app is cmus.

Signed-off-by: Stacy Harper <contact@stacyharper.net>
master
Galen Abell 3 years ago committed by Stacy Harper
parent 9abfa620fe
commit 50f1c4e102
No known key found for this signature in database
GPG Key ID: 5BAC92328B7C5D65
  1. 14
      scripts/core/sxmo_appmenu.sh

@ -359,6 +359,20 @@ programchoicesinit() {
$icon_phn Call ^ 0 ^ sxmo_modemdial.sh $number
"
WINNAME=sms
elif echo "$WMNAME" | grep -i -w "cmus"; then
# cmus
# requires `:set set_term_title=false` in cmus to match the application
CHOICES="
$icon_itm Play ^ 0 ^ cmus-remote -p
$icon_pau Pause ^ 0 ^ cmus-remote -u
$icon_stp Stop ^ 0 ^ cmus-remote -s
$icon_nxt Next track ^ 0 ^ cmus-remote -n
$icon_prv Previous track ^ 0 ^ cmus-remote -r
$icon_rld Toggle repeat ^ 0 ^ cmus-remote -R
$icon_sfl Toggle random ^ 0 ^ cmus-remote -S
$icon_mnu St menu ^ 0 ^ sxmo_appmenu.sh st-256color
"
WINNAME=cmus
else
STSELMODEON="$(
echo "$XPROPOUT" | grep -E '^_ST_SELMODE.+=' | cut -d= -f2 | tr -d ' '

Loading…
Cancel
Save