diff options
| author | marcellus <msimon_fr@hotmail.com> | 2023-05-04 19:38:38 +0200 |
|---|---|---|
| committer | marcellus <msimon_fr@hotmail.com> | 2023-05-04 19:38:38 +0200 |
| commit | 8ce30a9db3677de3f90c3f404bb6c93a4f64936a (patch) | |
| tree | c38f4b80e6b2cbe0d10e742cb8b0ce8c1d795eb5 | |
| parent | 13535011bb12163a4f9035cf2f231e856565e950 (diff) | |
feat: added script to select either music or musiccmd depending on whether mpv is already running or not
| -rwxr-xr-x | scripts/selectopt | 5 | ||||
| -rw-r--r-- | sxhkd/sxhkdrc | 4 |
2 files changed, 8 insertions, 1 deletions
diff --git a/scripts/selectopt b/scripts/selectopt new file mode 100755 index 0000000..eff605f --- /dev/null +++ b/scripts/selectopt @@ -0,0 +1,5 @@ +# !/bin/sh +# a script to select whether music or musiccmd should be called, +# depending on whether mpv is already running or not + +pidof mpv >/dev/null && musiccmd || music
\ No newline at end of file diff --git a/sxhkd/sxhkdrc b/sxhkd/sxhkdrc index b20942c..199ad3c 100644 --- a/sxhkd/sxhkdrc +++ b/sxhkd/sxhkdrc @@ -17,10 +17,12 @@ XF86AudioMute pamixer -t; kill {F7,super + n,super + shift + n} $TERMINAL -e {dmenurecord,lfub "$XDG_DATA_HOME/notes",newsboat} -{super + m, XF86Tools} +super + m music super + shift + m musiccmd +XF86Tools + selectopt XF86Audio{Prev,Next,Play,Stop} musiccmd {prev,next,cycle,stop} super + {s,a,y,w,e} |
