diff options
| author | 2014-11-06 17:15:39 +0100 | |
|---|---|---|
| committer | 2014-11-06 17:15:39 +0100 | |
| commit | 0f325f4511df576c6c82bcf244799413e91ce85c (patch) | |
| tree | 8df16b46dd6da96306b408923999a734ad546a51 /herbstluftwm | |
| parent | 9582ae749f8b95b3d5a06fd6647376ec4656e694 (diff) | |
| download | dotfiles-0f325f4511df576c6c82bcf244799413e91ce85c.tar.gz dotfiles-0f325f4511df576c6c82bcf244799413e91ce85c.tar.bz2 dotfiles-0f325f4511df576c6c82bcf244799413e91ce85c.zip | |
Multiple monitors
Diffstat (limited to 'herbstluftwm')
| -rwxr-xr-x | herbstluftwm/.config/herbstluftwm/autostart | 17 | ||||
| -rwxr-xr-x | herbstluftwm/.config/herbstluftwm/panel.sh | 30 |
2 files changed, 25 insertions, 22 deletions
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() { | |||
| 15 | hlwm_scripts="$HOME/.config/herbstluftwm" | 15 | hlwm_scripts="$HOME/.config/herbstluftwm" |
| 16 | 16 | ||
| 17 | #wallpaper | 17 | #wallpaper |
| 18 | wallpaper=/home/tom/Pictures/fall1.jpg | 18 | wallpaper="/home/tom/Pictures/fall1.jpg" |
| 19 | 19 | ||
| 20 | #Numix color palette | 20 | #Numix color palette |
| 21 | export WM_LIGHT=$(get_x_color 15) | 21 | export WM_LIGHT=$(get_x_color 15) |
| @@ -24,9 +24,13 @@ export WM_ACCENT=$(get_x_color 9) | |||
| 24 | export WM_LDARK=$(get_x_color 8) | 24 | export WM_LDARK=$(get_x_color 8) |
| 25 | export WM_DARK=$(get_x_color 0) | 25 | export WM_DARK=$(get_x_color 0) |
| 26 | 26 | ||
| 27 | #Detect monitors | ||
| 28 | hc set auto_detect_monitors 1 | ||
| 29 | hc detect_monitors | ||
| 30 | |||
| 27 | #Panel and window_p | 31 | #Panel and window_p |
| 28 | window_p=20 | 32 | window_p=20 |
| 29 | monitor_w=$(hc list_monitors | sed 's/^[0-9]: \([0-9]*\)x.*$/\1/') | 33 | monitor_w=($(hc list_monitors | sed 's/^[0-9]: \([0-9]*\)x.*$/\1/')) |
| 30 | panel_h=24 | 34 | panel_h=24 |
| 31 | panel_w=$(echo "$monitor_w - (2 * $window_p)" | bc) | 35 | panel_w=$(echo "$monitor_w - (2 * $window_p)" | bc) |
| 32 | 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" | 36 | 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 | |||
| 44 | hc keybind $Mod-Shift-c close | 48 | hc keybind $Mod-Shift-c close |
| 45 | hc keybind $Mod-Return spawn xterm | 49 | hc keybind $Mod-Return spawn xterm |
| 46 | hc keybind $Mod-grave spawn dmenu_run $dmenu_opts | 50 | hc keybind $Mod-grave spawn dmenu_run $dmenu_opts |
| 47 | hc keybind XF86AudioLowerVolume spawn amixer set Master 5%- | 51 | hc keybind XF86AudioLowerVolume spawn amixer -c 2 set Speaker 5%- |
| 48 | hc keybind XF86AudioRaiseVolume spawn amixer set Master 5%+ | 52 | hc keybind XF86AudioRaiseVolume spawn amixer -c 2 set Speaker 5%+ |
| 53 | |||
| 54 | echo "env DISPLAY=:0 /usr/bin/dmenu_run $dmenu_opts" | ||
| 49 | 55 | ||
| 50 | # basic movement | 56 | # basic movement |
| 51 | # focusing clients | 57 | # focusing clients |
| @@ -137,7 +143,8 @@ hc set frame_bg_normal_color $WM_LDARK | |||
| 137 | hc set frame_bg_active_color $WM_DARK | 143 | hc set frame_bg_active_color $WM_DARK |
| 138 | hc set frame_border_width 0 | 144 | hc set frame_border_width 0 |
| 139 | hc set always_show_frame 0 | 145 | hc set always_show_frame 0 |
| 140 | hc set frame_bg_transparent 1 | 146 | hc set frame_normal_opacity 0 |
| 147 | hc set frame_active_opacity 0 | ||
| 141 | hc set frame_transparent_width 0 | 148 | hc set frame_transparent_width 0 |
| 142 | hc set frame_gap 0 | 149 | hc set frame_gap 0 |
| 143 | 150 | ||
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 | |||
| 62 | 62 | ||
| 63 | while true ; do | 63 | while true ; do |
| 64 | # Volume | 64 | # Volume |
| 65 | if pgrep pulseaudio > /dev/null ; then | 65 | volumes=$(\ |
| 66 | volumes=$(\ | 66 | amixer get -c 2 get Speaker | \ |
| 67 | amixer get Master | \ | 67 | grep "Front Right: Playback"\ |
| 68 | grep "Mono: Playback"\ | 68 | ) |
| 69 | ) | 69 | vol=$(\ |
| 70 | vol=$(\ | 70 | echo $volumes | \ |
| 71 | echo $volumes | \ | 71 | sed "s/.*\[\([0-9]*\)%\].*/\1/"\ |
| 72 | sed "s/.*\[\([0-9]*\)%\].*/\1/"\ | 72 | ) |
| 73 | ) | 73 | if [ -z $vol ] ; then |
| 74 | if [ -z $vol ] ; then | ||
| 75 | echo -e "volume\toff" | ||
| 76 | elif [ $vol -le 0 ] ; then | ||
| 77 | echo -e "volume\t%{F$normal_txt}Volume muted" | ||
| 78 | else | ||
| 79 | echo -e "volume\t%{F$normal_txt}Volume: $vol%%%{F-}" | ||
| 80 | fi | ||
| 81 | else | ||
| 82 | echo -e "volume\toff" | 74 | echo -e "volume\toff" |
| 75 | elif [ $vol -le 0 ] ; then | ||
| 76 | echo -e "volume\t%{F$normal_txt}Volume muted" | ||
| 77 | else | ||
| 78 | echo -e "volume\t%{F$normal_txt}Volume: $vol%%%{F-}" | ||
| 83 | fi | 79 | fi |
| 84 | 80 | ||
| 85 | # Network | 81 | # Network |
