From 4c5d00fad60599b66157b330e6d769997ca4df2b Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Tue, 20 Jul 2021 22:49:39 +0200 Subject: [PATCH] rofi-mediaplayer: focus pavucontrol if already opened --- bin/rofi-mediaplayer | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/rofi-mediaplayer b/bin/rofi-mediaplayer index 4f1c502..370e37b 100755 --- a/bin/rofi-mediaplayer +++ b/bin/rofi-mediaplayer @@ -26,6 +26,6 @@ case $choice in Play) xdotool key --clearmodifiers XF86AudioPlay ;; Pause) xdotool key --clearmodifiers XF86AudioPause ;; Stop) xdotool key --clearmodifiers XF86AudioStop ;; - Open*) i3-msg exec exec pavucontrol ;; + Open*) i3-msg '[class="Pavucontrol"] focus' || i3-msg exec exec pavucontrol ;; *Spotify*) i3-msg '[class="Spotify"] focus' || i3-msg exec exec spotify ;; esac