From ed70634112ddbec6f13a0902bb5b64d1c22bd8d6 Mon Sep 17 00:00:00 2001 From: William Jacoby Date: Tue, 13 Sep 2022 23:00:27 -0500 Subject: [PATCH] Fix xdotool Spotify detection --- spotify-panel.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/spotify-panel.sh b/spotify-panel.sh index 25ce7bf..0aff364 100755 --- a/spotify-panel.sh +++ b/spotify-panel.sh @@ -14,7 +14,6 @@ if pidof spotify &> /dev/null; then readonly ARTIST=$(bash "${DIR}/spotify.sh" artist | sed 's/&/&/g') readonly TITLE=$(bash "${DIR}/spotify.sh" title | sed 's/&/&/g') readonly ALBUM=$(bash "${DIR}/spotify.sh" album | sed 's/&/&/g') - readonly WINDOW_ID=$(wmctrl -l | grep "${ARTIST_TITLE}" | awk '{print $1}') ARTIST_TITLE=$(echo "${ARTIST} - ${TITLE}") # Proper length handling @@ -36,7 +35,7 @@ if pidof spotify &> /dev/null; then INFO+="" fi - INFO+="xdotool windowactivate ${WINDOW_ID}" + INFO+="xdotool search --desktop 0 Spotify windowactivate" # Tooltip MORE_INFO=""