From 335d89f87a27139cb6b65adbfcaee628eab3b498 Mon Sep 17 00:00:00 2001 From: FredzyW Date: Mon, 27 May 2024 10:02:41 +0200 Subject: [PATCH] PoC fungerar --- README.md | 0 scripts/next_song.sh | 3 +++ scripts/play-pause.sh | 4 ++++ scripts/prev_song.sh | 4 ++++ spotify.tmux | 6 ++++++ 5 files changed, 17 insertions(+) create mode 100644 README.md create mode 100755 scripts/next_song.sh create mode 100755 scripts/play-pause.sh create mode 100755 scripts/prev_song.sh create mode 100755 spotify.tmux diff --git a/README.md b/README.md new file mode 100644 index 0000000..e69de29 diff --git a/scripts/next_song.sh b/scripts/next_song.sh new file mode 100755 index 0000000..455287f --- /dev/null +++ b/scripts/next_song.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +$(spotify_player playback next) diff --git a/scripts/play-pause.sh b/scripts/play-pause.sh new file mode 100755 index 0000000..d92de44 --- /dev/null +++ b/scripts/play-pause.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +# fetching the value of "tpm_plugins" option +$(spotify_player playback play-pause) diff --git a/scripts/prev_song.sh b/scripts/prev_song.sh new file mode 100755 index 0000000..08dc108 --- /dev/null +++ b/scripts/prev_song.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +# fetching the value of "tpm_plugins" option +$(spotify_player playback previous) diff --git a/spotify.tmux b/spotify.tmux new file mode 100755 index 0000000..e0a0f4e --- /dev/null +++ b/spotify.tmux @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +tmux bind-key Space run-shell "$CURRENT_DIR/scripts/play-pause.sh" +tmux bind-key N run-shell "$CURRENT_DIR/scripts/next_song.sh" +tmux bind-key P run-shell "$CURRENT_DIR/scripts/prev_song.sh"