From 85ff8ad17c1456dcd9fbb2c27ee07679bc48e7a9 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Fri, 12 Jul 2024 11:48:33 +0800 Subject: changes --- dot-config/bspwm/scripts/bsplayer | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 dot-config/bspwm/scripts/bsplayer (limited to 'dot-config/bspwm/scripts/bsplayer') 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 -- cgit v1.2.3