Skip to content

Commit fb043e3

Browse files
committed
Added the plugin spotify-tui
1 parent a966029 commit fb043e3

File tree

3 files changed

+30
-0
lines changed

3 files changed

+30
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ Configuration and options can be found at [draculatheme.com/tmux](https://dracul
2929
* When prefix is enabled smiley face turns from green to yellow
3030
* When charging, 'AC' is displayed
3131
* If forecast information is available, a ☀, ☁, ☂, or ❄ unicode character corresponding with the forecast is displayed alongside the temperature
32+
* Spotify playback (needs the tool spotify-tui installed)
3233

3334
## Compatibility
3435

scripts/dracula.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,11 @@ main()
168168
script="#($current_dir/network_ping.sh)"
169169
fi
170170

171+
if [ $plugin = "spotify-tui" ]; then
172+
IFS=' ' read -r -a colors <<<$(get_tmux_option "@dracula-spotify-tui-colors" "green dark_gray")
173+
script="#($current_dir/spotify-tui.sh)"
174+
fi
175+
171176
if [ $plugin = "weather" ]; then
172177
# wait unit $datafile exists just to avoid errors
173178
# this should almost never need to wait unless something unexpected occurs

scripts/spotify-tui.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/usr/bin/env bash
2+
# setting the locale, some users have issues with different locales, this forces the correct one
3+
export LC_ALL=en_US.UTF-8
4+
5+
current_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
6+
source $current_dir/utils.sh
7+
8+
main()
9+
{
10+
# storing the refresh rate in the variable RATE, default is 5
11+
RATE=$(get_tmux_option "@dracula-refresh-rate" 5)
12+
13+
if ! command -v spt &> /dev/null
14+
then
15+
exit 1
16+
fi
17+
18+
spotify_playback=$(spt playback)
19+
echo ${spotify_playback}
20+
21+
}
22+
23+
# run the main driver
24+
main

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy