diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2024-07-12 11:48:33 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2024-07-12 11:48:33 +0800 |
| commit | 85ff8ad17c1456dcd9fbb2c27ee07679bc48e7a9 (patch) | |
| tree | 3667ccc3211f4b001859dacf0e1e88aee26bb830 /dot-config/bspwm/scripts/bsplayer | |
| parent | 6952a9c67c68e5b4c8ae058bc72b578e1d701476 (diff) | |
changes
Diffstat (limited to 'dot-config/bspwm/scripts/bsplayer')
| -rwxr-xr-x | dot-config/bspwm/scripts/bsplayer | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/dot-config/bspwm/scripts/bsplayer b/dot-config/bspwm/scripts/bsplayer new file mode 100755 index 00000000..8529ef36 --- /dev/null +++ b/dot-config/bspwm/scripts/bsplayer @@ -0,0 +1,23 @@ +#!/usr/bin/env bash + +function play() { + playerctl -p spotify play +} + +function pause() { + playerctl -p spotify pause +} + +function play_pause() { + playerctl -p spotify play-pause +} + +function smart_pp() { + if [[ $(playerctl status -p spotify) == "Playing" ]]; then + pause + else + playerctl play-pause + fi +} + +smart_pp |
