From d9e91d35ffbbae3861710ffcf219bb9a0d00a9e9 Mon Sep 17 00:00:00 2001 From: Florian RICHER Date: Sat, 3 Sep 2022 21:50:49 +0200 Subject: [PATCH] Update dot_config/i3/config Add dot_config/i3/executable_set_volume.sh --- dot_config/i3/config | 4 ++-- dot_config/i3/executable_set_volume.sh | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 dot_config/i3/executable_set_volume.sh diff --git a/dot_config/i3/config b/dot_config/i3/config index 0cee1e3..6341928 100644 --- a/dot_config/i3/config +++ b/dot_config/i3/config @@ -58,8 +58,8 @@ exec --no-startup-id feh --bg-scale ~/.config/i3/i3-wall.png # Use pactl to adjust volume in PulseAudio. set $refresh_i3status killall -SIGUSR1 i3status -bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +5% && $refresh_i3status -bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -5% && $refresh_i3status +bindsym XF86AudioRaiseVolume exec --no-startup-id ~/.config/i3/set_volume.sh "+5%" && $refresh_i3status +bindsym XF86AudioLowerVolume exec --no-startup-id ~/.config/i3/set_volume.sh "-5%" && $refresh_i3status bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status diff --git a/dot_config/i3/executable_set_volume.sh b/dot_config/i3/executable_set_volume.sh new file mode 100644 index 0000000..6849bbd --- /dev/null +++ b/dot_config/i3/executable_set_volume.sh @@ -0,0 +1,2 @@ +#!/bin/bash +pactl set-sink-volume @DEFAULT_SINK@ $1 && $send_volume_notif notify-send "Volume" -h int:value:"$(pactl get-sink-volume @DEFAULT_SINK@ | cut -d ' ' -f6 | cut -d '%' -f1)"