From 0f325f4511df576c6c82bcf244799413e91ce85c Mon Sep 17 00:00:00 2001 From: Tom van der Lee Date: Thu, 6 Nov 2014 17:15:39 +0100 Subject: Multiple monitors --- herbstluftwm/.config/herbstluftwm/autostart | 17 +++++++++++----- herbstluftwm/.config/herbstluftwm/panel.sh | 30 +++++++++++++---------------- 2 files changed, 25 insertions(+), 22 deletions(-) (limited to 'herbstluftwm/.config') diff --git a/herbstluftwm/.config/herbstluftwm/autostart b/herbstluftwm/.config/herbstluftwm/autostart index 109ea43..edb6361 100755 --- a/herbstluftwm/.config/herbstluftwm/autostart +++ b/herbstluftwm/.config/herbstluftwm/autostart @@ -15,7 +15,7 @@ get_x_color() { hlwm_scripts="$HOME/.config/herbstluftwm" #wallpaper -wallpaper=/home/tom/Pictures/fall1.jpg +wallpaper="/home/tom/Pictures/fall1.jpg" #Numix color palette export WM_LIGHT=$(get_x_color 15) @@ -24,9 +24,13 @@ export WM_ACCENT=$(get_x_color 9) export WM_LDARK=$(get_x_color 8) export WM_DARK=$(get_x_color 0) +#Detect monitors +hc set auto_detect_monitors 1 +hc detect_monitors + #Panel and window_p window_p=20 -monitor_w=$(hc list_monitors | sed 's/^[0-9]: \([0-9]*\)x.*$/\1/') +monitor_w=($(hc list_monitors | sed 's/^[0-9]: \([0-9]*\)x.*$/\1/')) panel_h=24 panel_w=$(echo "$monitor_w - (2 * $window_p)" | bc) dmenu_opts="-h $panel_h -w $panel_w -x $window_p -y $window_p -p Run: -nb $WM_DARK -nf $WM_LIGHT -sb $WM_ACCENT -sf $WM_DARK" @@ -44,8 +48,10 @@ hc keybind $Mod-Shift-r reload hc keybind $Mod-Shift-c close hc keybind $Mod-Return spawn xterm hc keybind $Mod-grave spawn dmenu_run $dmenu_opts -hc keybind XF86AudioLowerVolume spawn amixer set Master 5%- -hc keybind XF86AudioRaiseVolume spawn amixer set Master 5%+ +hc keybind XF86AudioLowerVolume spawn amixer -c 2 set Speaker 5%- +hc keybind XF86AudioRaiseVolume spawn amixer -c 2 set Speaker 5%+ + +echo "env DISPLAY=:0 /usr/bin/dmenu_run $dmenu_opts" # basic movement # focusing clients @@ -137,7 +143,8 @@ hc set frame_bg_normal_color $WM_LDARK hc set frame_bg_active_color $WM_DARK hc set frame_border_width 0 hc set always_show_frame 0 -hc set frame_bg_transparent 1 +hc set frame_normal_opacity 0 +hc set frame_active_opacity 0 hc set frame_transparent_width 0 hc set frame_gap 0 diff --git a/herbstluftwm/.config/herbstluftwm/panel.sh b/herbstluftwm/.config/herbstluftwm/panel.sh index 24d0e12..588e65e 100755 --- a/herbstluftwm/.config/herbstluftwm/panel.sh +++ b/herbstluftwm/.config/herbstluftwm/panel.sh @@ -62,24 +62,20 @@ fi while true ; do # Volume - if pgrep pulseaudio > /dev/null ; then - volumes=$(\ - amixer get Master | \ - grep "Mono: Playback"\ - ) - vol=$(\ - echo $volumes | \ - sed "s/.*\[\([0-9]*\)%\].*/\1/"\ - ) - if [ -z $vol ] ; then - echo -e "volume\toff" - elif [ $vol -le 0 ] ; then - echo -e "volume\t%{F$normal_txt}Volume muted" - else - echo -e "volume\t%{F$normal_txt}Volume: $vol%%%{F-}" - fi - else + volumes=$(\ + amixer get -c 2 get Speaker | \ + grep "Front Right: Playback"\ + ) + vol=$(\ + echo $volumes | \ + sed "s/.*\[\([0-9]*\)%\].*/\1/"\ + ) + if [ -z $vol ] ; then echo -e "volume\toff" + elif [ $vol -le 0 ] ; then + echo -e "volume\t%{F$normal_txt}Volume muted" + else + echo -e "volume\t%{F$normal_txt}Volume: $vol%%%{F-}" fi # Network -- cgit v1.2.3