From 4abb8a5ce65c0f61c7463757b051a3d1cdf16fd5 Mon Sep 17 00:00:00 2001 From: FredzyW Date: Mon, 27 May 2024 10:11:13 +0200 Subject: [PATCH] =?UTF-8?q?St=C3=B6d=20f=C3=B6r=20add=20=C3=B6ka=20och=20m?= =?UTF-8?q?inska=20volymen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 ++ scripts/decrease.sh | 3 +++ scripts/increase.sh | 3 +++ spotify.tmux | 2 ++ 4 files changed, 10 insertions(+) create mode 100755 scripts/decrease.sh create mode 100755 scripts/increase.sh diff --git a/README.md b/README.md index a6ccb4c..245201c 100644 --- a/README.md +++ b/README.md @@ -7,3 +7,5 @@ Ett enkelt tmux-plugin för att styra spotify-player från tmux. - `prefix + Space` - Pausa/Spela upp låt - `prefix + N` - Nästa låt - `prefix + P` - Föregående låt +- `prefix + +` - Höj volymen +- `prefix + -` - Sänk volymen diff --git a/scripts/decrease.sh b/scripts/decrease.sh new file mode 100755 index 0000000..523a89d --- /dev/null +++ b/scripts/decrease.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +$(spotify_player playback volume --offset -- -5) diff --git a/scripts/increase.sh b/scripts/increase.sh new file mode 100755 index 0000000..77f6156 --- /dev/null +++ b/scripts/increase.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +$(spotify_player playback volume --offset +5) diff --git a/spotify.tmux b/spotify.tmux index e0a0f4e..ebc21a5 100755 --- a/spotify.tmux +++ b/spotify.tmux @@ -4,3 +4,5 @@ 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" +tmux bind-key + run-shell "$CURRENT_DIR/scripts/increase.sh" +tmux bind-key - run-shell "$CURRENT_DIR/scripts/decrease.sh"