From 84ba4efd106f5398ae96fb0b5200b1be97e2eb2e Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Tue, 5 Jan 2016 15:09:47 +0100 Subject: change audio setup to use pulseaudio 1) change media key commands to pamixer 2) change conky settings * use pamixer to get volume and mute * remove 'Volume:' String * display default pa sink --- i3/config | 6 +++--- i3/conkyrc.json | 7 +++++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/i3/config b/i3/config index 531c404..5d6da20 100644 --- a/i3/config +++ b/i3/config @@ -174,9 +174,9 @@ bar { # Audio shortcuts # # Volume -bindsym XF86AudioLowerVolume exec amixer -q set Master 10%- -bindsym XF86AudioRaiseVolume exec amixer -q set Master 10%+ -bindsym XF86AudioMute exec amixer -q set Master toggle +bindsym XF86AudioLowerVolume exec pamixer -d 5 +bindsym XF86AudioRaiseVolume exec pamixer -i 5 +bindsym XF86AudioMute exec pamixer -t # # Music bindsym XF86AudioPrev exec bash ~/.dotfiles/scripts/media_control.sh prev bindsym XF86AudioPlay exec bash ~/.dotfiles/scripts/media_control.sh toggle diff --git a/i3/conkyrc.json b/i3/conkyrc.json index 74a84db..bea7884 100644 --- a/i3/conkyrc.json +++ b/i3/conkyrc.json @@ -86,11 +86,14 @@ TEXT ################ Volume ######################## {"name": "symbol", "color": "\#ffffff", "full_text": - ${if_match "${exec amixer sget Master | grep "\[on\]"}"==""}"M"${else}"U"${endif}, + ${if_match "${exec pamixer --get-mute}"=="true"}"M"${else}"U"${endif}, "separator": false}, + + {"name": "card", "color": "\#ffffff", "separator": false, + "full_text": "${exec pacmd info | grep 'Default sink' | grep -o '[^.]*$'}"}, {"name": "Volume", "color": "\#ffffff", "full_text": - "Volume: [${exec amixer sget Master | grep Mono: | sed -e 's/[ \t]*Mono: Playback [0-9]* \[\([0-9]*%\)\].*/\1/'}]"}, + "[${exec pamixer --get-volume}%]"}, -- cgit v1.2.3