From addd8fa66f67a8e45d88910455596b989f09c5eb Mon Sep 17 00:00:00 2001 From: Louis Vallat Date: Mon, 22 Nov 2021 14:08:55 +0100 Subject: [PATCH] Changed from pulseaudio modules to alsa ones Signed-off-by: Louis Vallat --- .config/polybar/config | 7 +++---- .config/sxhkd/sxhkdrc | 17 +++++++++++++---- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/.config/polybar/config b/.config/polybar/config index e28d36b..6b0b8f2 100644 --- a/.config/polybar/config +++ b/.config/polybar/config @@ -142,7 +142,7 @@ module-margin-right = 2 font-0 = FiraCode Nerd Font:style=medium:size=10 -modules-center = pulseaudio memory cpu wlan eth battery +modules-center = alsa memory cpu wlan eth battery tray-position = right tray-padding = 2 @@ -276,9 +276,8 @@ format-prefix-foreground = ${colors.foreground-alt} format-underline = #0a6cf5 label = %date% - -[module/pulseaudio] -type = internal/pulseaudio +[module/alsa] +type = internal/alsa format-volume = format-volume-prefix = "蓼 " diff --git a/.config/sxhkd/sxhkdrc b/.config/sxhkd/sxhkdrc index 5ae333e..31c7d8b 100644 --- a/.config/sxhkd/sxhkdrc +++ b/.config/sxhkd/sxhkdrc @@ -51,16 +51,16 @@ super + {Left,Down,Up,Right} bspc node -v {-20 0,0 20,0 -20,20 0} XF86AudioMute - pactl set-sink-mute @DEFAULT_SINK@ toggle + amixer set Master toggle XF86AudioRaiseVolume - if [ (pacmd list-sinks| grep -A 15 '* index'| awk '/volume: front/\{ print $5 \}' | sed 's/[%|,]//g') -le "98" ] ; pactl set-sink-volume @DEFAULT_SINK@ +2%; end; + amixer set Master 2%+ XF86AudioLowerVolume - pactl set-sink-volume @DEFAULT_SINK@ -2% + amixer set Master 2%- XF86AudioMicMute - pactl set-source-mute @DEFAULT_SOURCE@ toggle + amixer set Capture toggle XF86MonBrightnessDown echo (math (cat /sys/class/backlight/amdgpu_bl0/brightness) - 5) > /sys/class/backlight/amdgpu_bl0/brightness @@ -73,3 +73,12 @@ Print ctrl + Print set FILE_NAME "/home/louis/Pictures/Screenshots/Screeshot-"(date +'%d-%m-%Y-%H-%M-%S')".png" && import ${FILE_NAME} && dunstify "Screenshot taken: ${FILE_NAME}" + +XF86AudioPlay + dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause + +XF86AudioPrev + dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous + +XF86AudioNext + dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next