Skip to content

Commit e4b05ac

Browse files
authored
Remove now_playing support for Spotify though wine.
Instead of spending time fix old code, remove it as it is unlikely to still be used. If you in fact use this, please ping me and I'll add it back :). Relates to #467
1 parent 8e5894f commit e4b05ac

File tree

2 files changed

+4
-13
lines changed

2 files changed

+4
-13
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88
## [Unreleased]
99
### Added
1010
- weather.sh segment: auto detection of location by GeoIP [#464](https://github.com/erikw/tmux-powerline/pull/464)
11+
### Removed
12+
- now_playing: removed Spotify though wine. Not likely this is used anymore. If someone still uses, shout at me and I'll add it back :-). [#](https://github.com/erikw/tmux-powerline/pull/)
1113

1214

1315
## [3.1.0] - 2025-03-03

segments/now_playing.sh

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ TMUX_POWERLINE_SEG_NOW_PLAYING_MUSIC_PLAYER_DEFAULT="spotify"
2626

2727
generate_segmentrc() {
2828
read -r -d '' rccontents <<EORC
29-
# Music player to use. Can be any of {audacious, banshee, cmus, apple_music, itunes, lastfm, plexamp, mocp, mpd, mpd_simple, pithos, playerctl, rdio, rhythmbox, spotify, spotify_wine, file}.
29+
# Music player to use. Can be any of {audacious, banshee, cmus, apple_music, itunes, lastfm, plexamp, mocp, mpd, mpd_simple, pithos, playerctl, rdio, rhythmbox, spotify, file}.
3030
export TMUX_POWERLINE_SEG_NOW_PLAYING_MUSIC_PLAYER="${TMUX_POWERLINE_SEG_NOW_PLAYING_MUSIC_PLAYER_DEFAULT}"
3131
# File to be read in case the song is being read from a file
3232
export TMUX_POWERLINE_SEG_NOW_PLAYING_FILE_NAME=""
@@ -116,7 +116,6 @@ run_segment() {
116116
"rhythmbox") np=$(__np_rhythmbox) ;;
117117
"spotify") np=$(__np_spotify) ;;
118118
"file") np=$(__np_file) ;;
119-
"spotify_wine") np=$(__np_spotify_native) ;;
120119
*)
121120
echo "Unknown music player type [${TMUX_POWERLINE_SEG_NOW_PLAYING_MUSIC_PLAYER}]"
122121
return 1
@@ -422,14 +421,4 @@ __np_spotify() {
422421
np=$("${TMUX_POWERLINE_DIR_SEGMENTS}/np_spotify_mac.script")
423422
fi
424423
echo "$np"
425-
}
426-
427-
__np_spotify_wine() {
428-
! shell_is_linux && return 1
429-
spotify_id=$(xwininfo -root -tree | grep '("spotify' | cut -f1 -d'"' | sed 's/ //g')
430-
echo "$spotify_id"
431-
if [ -n "$spotify_id" ]; then
432-
np=$(xwininfo -id "$spotify_id" | grep "xwininfo.*Spotify -" | grep -Po "(?<=\"Spotify - ).*(?=\"$)")
433-
echo "$np"
434-
fi
435-
}
424+
}

0 commit comments

Comments
 (0)