From 1f222800b76b9f3d819c42ee58f194de5c8cde7a Mon Sep 17 00:00:00 2001 From: esche Date: Mon, 20 Nov 2023 13:33:50 +0100 Subject: [PATCH] switched from pactl to wpctl --- .config/sway/config | 10 +++++----- .config/sway/status.sh | 7 +++---- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/.config/sway/config b/.config/sway/config index 6897b4f..b2828e1 100644 --- a/.config/sway/config +++ b/.config/sway/config @@ -55,7 +55,7 @@ Font "Noto Sans" Regular 14 timeout 180 'swaymsg "output * power off"' resume 'swaymsg "output * power on"' \ timeout 185 'systemctl suspend' \ before-sleep '$lock' \ - + # You can get the names of your inputs by running: swaymsg -t get_outputs ### Input configuration input type:keyboard { @@ -106,10 +106,10 @@ Font "Noto Sans" Regular 14 # Multimedia keys # # Pulse Audio controls - bindsym --locked XF86AudioRaiseVolume exec wpctl set-sink-volume @DEFAULT_SINK@ +5% - bindsym --locked XF86AudioLowerVolume exec wpctl set-sink-volume @DEFAULT_SINK@ -5% - bindsym --locked XF86AudioMute exec wpctl set-sink-mute @DEFAULT_SINK@ toggle - bindsym --locked XF86AudioMicMute exec wpctl set-source-mute @DEFAULT_SOURCE@ toggle + bindsym --locked XF86AudioRaiseVolume exec wpctl set-volume @DEFAULT_SINK@ 5%+ -l 1.2 + bindsym --locked XF86AudioLowerVolume exec wpctl set-volume @DEFAULT_SINK@ 5%- -l 1.2 + bindsym --locked XF86AudioMute exec wpctl set-mute @DEFAULT_SINK@ toggle + bindsym --locked XF86AudioMicMute exec wpctl set-mute @DEFAULT_SOURCE@ toggle # Display controls bindsym --locked XF86MonBrightnessDown exec brightnessctl set 5%- bindsym --locked XF86MonBrightnessUp exec brightnessctl set +5% diff --git a/.config/sway/status.sh b/.config/sway/status.sh index c69ea9b..6088cda 100644 --- a/.config/sway/status.sh +++ b/.config/sway/status.sh @@ -8,8 +8,8 @@ audio_muted=$( pactl get-sink-mute @DEFAULT_SINK@ | awk '{ print $2=="yes" ? "🔇":"🔉" }') audio_volume=$( - pactl get-sink-volume @DEFAULT_SINK@ | - awk '{ print $5 }') + wpctl get-volume @DEFAULT_SINK@ | + awk '{ print $2 }') is_wayland=$( swaymsg -t get_tree | @@ -29,5 +29,4 @@ battery=$( output="" if [[ $is_wayland != "" ]]; then output="$is_wayland | "; fi -if [[ $battery != "" ]]; then ouptut="$output$battery | "; fi -echo $output $audio_volume $audio_muted "|" $date_formatted +echo $output $battery "|" $audio_volume $audio_muted "|" $date_formatted