Merge pull request #153 from JannoTjarks/spotify-tui
Added the plugin spotify-tui
This commit is contained in:
commit
3943288e0a
3 changed files with 29 additions and 0 deletions
|
@ -29,6 +29,7 @@ Configuration and options can be found at [draculatheme.com/tmux](https://dracul
|
||||||
- When prefix is enabled smiley face turns from green to yellow
|
- When prefix is enabled smiley face turns from green to yellow
|
||||||
- When charging, 'AC' is displayed
|
- When charging, 'AC' is displayed
|
||||||
- If forecast information is available, a ☀, ☁, ☂, or ❄ unicode character corresponding with the forecast is displayed alongside the temperature
|
- If forecast information is available, a ☀, ☁, ☂, or ❄ unicode character corresponding with the forecast is displayed alongside the temperature
|
||||||
|
- Spotify playback (needs the tool spotify-tui installed)
|
||||||
- Current kubernetes context
|
- Current kubernetes context
|
||||||
|
|
||||||
## Compatibility
|
## Compatibility
|
||||||
|
|
4
scripts/dracula.sh
Executable file → Normal file
4
scripts/dracula.sh
Executable file → Normal file
|
@ -169,6 +169,10 @@ main()
|
||||||
script="#($current_dir/network_ping.sh)"
|
script="#($current_dir/network_ping.sh)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ $plugin = "spotify-tui" ]; then
|
||||||
|
IFS=' ' read -r -a colors <<<$(get_tmux_option "@dracula-spotify-tui-colors" "green dark_gray")
|
||||||
|
script="#($current_dir/spotify-tui.sh)"
|
||||||
|
|
||||||
if [ $plugin = "kubernetes-context" ]; then
|
if [ $plugin = "kubernetes-context" ]; then
|
||||||
IFS=' ' read -r -a colors <<<$(get_tmux_option "@dracula-kubernetes-context-colors" "cyan dark_gray")
|
IFS=' ' read -r -a colors <<<$(get_tmux_option "@dracula-kubernetes-context-colors" "cyan dark_gray")
|
||||||
script="#($current_dir/kubernetes_context.sh $show_kubernetes_context_label)"
|
script="#($current_dir/kubernetes_context.sh $show_kubernetes_context_label)"
|
||||||
|
|
24
scripts/spotify-tui.sh
Executable file
24
scripts/spotify-tui.sh
Executable file
|
@ -0,0 +1,24 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
# setting the locale, some users have issues with different locales, this forces the correct one
|
||||||
|
export LC_ALL=en_US.UTF-8
|
||||||
|
|
||||||
|
current_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
source $current_dir/utils.sh
|
||||||
|
|
||||||
|
main()
|
||||||
|
{
|
||||||
|
# storing the refresh rate in the variable RATE, default is 5
|
||||||
|
RATE=$(get_tmux_option "@dracula-refresh-rate" 5)
|
||||||
|
|
||||||
|
if ! command -v spt &> /dev/null
|
||||||
|
then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
spotify_playback=$(spt playback)
|
||||||
|
echo ${spotify_playback}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
# run the main driver
|
||||||
|
main
|
Loading…
Reference in a new issue