diff options
| author | 2015-09-03 16:20:45 +0200 | |
|---|---|---|
| committer | 2015-09-03 16:20:45 +0200 | |
| commit | 54f1b34a10aa7815afe27e30f9377d5a68a2d04a (patch) | |
| tree | 3fb1883ddd0a301b353fb7f977d69022ac95e863 /herbstluftwm/.config | |
| parent | b488df4f931c990ee2f754ed359605e5763a833f (diff) | |
| download | dotfiles-54f1b34a10aa7815afe27e30f9377d5a68a2d04a.tar.gz dotfiles-54f1b34a10aa7815afe27e30f9377d5a68a2d04a.tar.bz2 dotfiles-54f1b34a10aa7815afe27e30f9377d5a68a2d04a.zip | |
Added better theming infrastructure to HLWM
Diffstat (limited to 'herbstluftwm/.config')
| -rwxr-xr-x | herbstluftwm/.config/herbstluftwm/autostart | 42 | ||||
| -rw-r--r-- | herbstluftwm/.config/herbstluftwm/hlwm-keybindings | 2 | ||||
| -rw-r--r-- | herbstluftwm/.config/herbstluftwm/hlwm-theming | 42 | ||||
| -rwxr-xr-x | herbstluftwm/.config/herbstluftwm/panel_indicators.sh | 10 | ||||
| -rwxr-xr-x | herbstluftwm/.config/herbstluftwm/populate_panel.sh | 14 | ||||
| -rwxr-xr-x | herbstluftwm/.config/herbstluftwm/popup.sh | 4 | ||||
| -rwxr-xr-x | herbstluftwm/.config/herbstluftwm/start_panel.sh | 12 | ||||
| -rw-r--r-- | herbstluftwm/.config/herbstluftwm/themes/purpur | 44 | ||||
| -rw-r--r-- | herbstluftwm/.config/herbstluftwm/wallpapers/poligons.png (renamed from herbstluftwm/.config/herbstluftwm/poligons.png) | bin | 4592375 -> 4592375 bytes |
9 files changed, 98 insertions, 72 deletions
diff --git a/herbstluftwm/.config/herbstluftwm/autostart b/herbstluftwm/.config/herbstluftwm/autostart index 78a81b4..a436283 100755 --- a/herbstluftwm/.config/herbstluftwm/autostart +++ b/herbstluftwm/.config/herbstluftwm/autostart | |||
| @@ -9,37 +9,38 @@ export -f hc | |||
| 9 | # The current directory | 9 | # The current directory |
| 10 | export HLWM_CONF_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) | 10 | export HLWM_CONF_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) |
| 11 | 11 | ||
| 12 | #Include the theming script | 12 | source "$HLWM_CONF_DIR/hlwm-theming" |
| 13 | source "$HLWM_CONF_DIR/themes/current" | ||
| 14 | |||
| 15 | #Detect monitors | ||
| 16 | hc set auto_detect_monitors 1 | ||
| 17 | hc detect_monitors | ||
| 18 | 13 | ||
| 19 | #Panel and window_p | 14 | #Panel and HLWM_WINDOW_PADDING |
| 20 | monitor_w=($(hc list_monitors | sed 's/^[0-9]: \([0-9]*\)x.*$/\1/')) | 15 | monitor_w=($(hc list_monitors | sed 's/^[0-9]: \([0-9]*\)x.*$/\1/')) |
| 21 | panel_w=$(echo "$monitor_w - (2 * $window_p)" | bc) | 16 | panel_w=$(echo "$monitor_w - (2 * $HLWM_WINDOW_PADDING)" | bc) |
| 22 | dmenu_opts="-h $panel_h -w $panel_w -x $window_p -y $window_p -p Run: -nb $color_bg -nf $color_fg -sb $color_accent -sf $color_bg" | 17 | dmenu_opts="-h $HLWM_PANEL_HEIGHT -w $panel_w -x $HLWM_WINDOW_PADDING -y $HLWM_WINDOW_PADDING -p Run: -nb $HLWM_BG_COLOR -nf $HLWM_FG_COLOR -sb $HLWM_ACCENT_COLOR -sf $HLWM_BG_COLOR" |
| 23 | 18 | ||
| 24 | # Tags | 19 | # Tags |
| 25 | tag_names=() | 20 | tag_names=() |
| 26 | tag_keys=({1..9} 0) | 21 | tag_keys=({1..9} 0) |
| 27 | for key in ${tag_keys[@]}; do | 22 | for key in ${tag_keys[@]}; do |
| 28 | if [ $key -eq 0 ]; then key=10; fi | 23 | if [ $key -eq 0 ]; then |
| 29 | key=$(echo "$key - 1" | bc) | 24 | key=10 |
| 25 | else | ||
| 26 | key=$(echo "$key - 1" | bc) | ||
| 27 | fi | ||
| 28 | |||
| 30 | name=$(echo "obase=2;$key" | bc | awk '{ printf "%04d", $0 }') | 29 | name=$(echo "obase=2;$key" | bc | awk '{ printf "%04d", $0 }') |
| 31 | tag_names+=($name) | 30 | tag_names+=($name) |
| 32 | done; | 31 | done; |
| 33 | 32 | ||
| 34 | # Source hlwm-config-files | 33 | # Source hlwm-config-files |
| 35 | source "$HLWM_CONF_DIR/hlwm-keybindings" | 34 | source "$HLWM_CONF_DIR/hlwm-keybindings" |
| 36 | source "$HLWM_CONF_DIR/hlwm-theming" | ||
| 37 | source "$HLWM_CONF_DIR/hlwm-rules" | 35 | source "$HLWM_CONF_DIR/hlwm-rules" |
| 38 | 36 | ||
| 39 | # Unlock, just to be sure | 37 | # Unlock, just to be sure |
| 40 | hc unlock | 38 | hc unlock |
| 41 | 39 | ||
| 42 | herbstclient set tree_style '╾│ ├└╼─┐' | 40 | |
| 41 | #Detect monitors | ||
| 42 | hc set auto_detect_monitors 1 | ||
| 43 | hc detect_monitors | ||
| 43 | 44 | ||
| 44 | # Start panel in all monitors | 45 | # Start panel in all monitors |
| 45 | panel=$HLWM_CONF_DIR/start_panel.sh | 46 | panel=$HLWM_CONF_DIR/start_panel.sh |
| @@ -51,11 +52,16 @@ done | |||
| 51 | pulseaudio --start | 52 | pulseaudio --start |
| 52 | 53 | ||
| 53 | $HLWM_CONF_DIR/start.sh "xautolock -time 5 -locker $HLWM_CONF_DIR/lock.sh" | 54 | $HLWM_CONF_DIR/start.sh "xautolock -time 5 -locker $HLWM_CONF_DIR/lock.sh" |
| 54 | $HLWM_CONF_DIR/start.sh "feh --bg-fill $wallpaper" | 55 | |
| 55 | $HLWM_CONF_DIR/start.sh "compton --config $HOME/.compton" | 56 | if $HLWM_COMPOSITING; then |
| 56 | $HLWM_CONF_DIR/start.sh "xrdb -load $HOME/.Xresources" | 57 | $HLWM_CONF_DIR/start.sh "compton --config $HOME/.compton" |
| 57 | $HLWM_CONF_DIR/start.sh "xset +fp /usr/share/fonts/local" | 58 | else |
| 58 | $HLWM_CONF_DIR/start.sh "xset fp rehash" | 59 | pkill compton |
| 60 | fi | ||
| 61 | |||
| 62 | xset +fp /usr/share/fonts/local | ||
| 63 | xset fp rehash | ||
| 64 | |||
| 59 | #$HLWM_CONF_DIR/start.sh "$HLWM_CONF_DIR/notify.sh $HLWM_CONF_DIR/popup.sh" | 65 | #$HLWM_CONF_DIR/start.sh "$HLWM_CONF_DIR/notify.sh $HLWM_CONF_DIR/popup.sh" |
| 60 | 66 | ||
| 61 | # vim: set ts=4 sw=4 tw=0 et : | 67 | # vim: set ts=4 sw=4 tw=0 et : |
diff --git a/herbstluftwm/.config/herbstluftwm/hlwm-keybindings b/herbstluftwm/.config/herbstluftwm/hlwm-keybindings index 4a6a614..cc40515 100644 --- a/herbstluftwm/.config/herbstluftwm/hlwm-keybindings +++ b/herbstluftwm/.config/herbstluftwm/hlwm-keybindings | |||
| @@ -7,7 +7,7 @@ hc keyunbind --all | |||
| 7 | Mod=Mod4 # Use the super key as the main modifier | 7 | Mod=Mod4 # Use the super key as the main modifier |
| 8 | 8 | ||
| 9 | hc keybind $Mod-Shift-q quit | 9 | hc keybind $Mod-Shift-q quit |
| 10 | hc keybind $Mod-Shift-r reload | 10 | hc keybind $Mod-Shift-r chain , spawn echo "!! HLWM reload config !!" , reload |
| 11 | hc keybind $Mod-Shift-c close | 11 | hc keybind $Mod-Shift-c close |
| 12 | hc keybind $Mod-Return spawn xterm | 12 | hc keybind $Mod-Return spawn xterm |
| 13 | hc keybind $Mod-grave spawn dmenu_run $dmenu_opts | 13 | hc keybind $Mod-grave spawn dmenu_run $dmenu_opts |
diff --git a/herbstluftwm/.config/herbstluftwm/hlwm-theming b/herbstluftwm/.config/herbstluftwm/hlwm-theming index 0ffd366..aca737f 100644 --- a/herbstluftwm/.config/herbstluftwm/hlwm-theming +++ b/herbstluftwm/.config/herbstluftwm/hlwm-theming | |||
| @@ -1,6 +1,29 @@ | |||
| 1 | #!/usr/bin/env bash | 1 | #!/usr/bin/env bash |
| 2 | 2 | ||
| 3 | # Add alpha channel to a hexadecimal color | ||
| 4 | add_alpha_channel(){ | ||
| 5 | echo "$1" | \ | ||
| 6 | sed "s/.*#\([0-9a-fA-F]*\).*/#ff\1/" | ||
| 7 | } | ||
| 8 | |||
| 9 | #Include the theming script | ||
| 10 | source "$HLWM_CONF_DIR/themes/current" | ||
| 11 | |||
| 12 | feh --bg-scale "$HLWM_WALLPAPER" | ||
| 13 | |||
| 3 | # Theme | 14 | # Theme |
| 15 | xrdb -load $HOME/.Xresources | ||
| 16 | |||
| 17 | for color in "${!colors[@]}"; do | ||
| 18 | echo "*$color: ${colors[$color]}" | xrdb -override | ||
| 19 | done | ||
| 20 | |||
| 21 | echo "XTerm*background: $HLWM_BG_COLOR" | xrdb -override | ||
| 22 | |||
| 23 | export HLWM_FG_ACOLOR=$(add_alpha_channel $HLWM_FG_COLOR) | ||
| 24 | export HLWM_ACCENT_ACOLOR=$(add_alpha_channel $HLWM_ACCENT_COLOR) | ||
| 25 | export HLWM_BG_ACOLOR=$(add_alpha_channel $HLWM_BG_COLOR) | ||
| 26 | |||
| 4 | hc attr theme.tiling.reset 1 | 27 | hc attr theme.tiling.reset 1 |
| 5 | hc attr theme.floating.reset 1 | 28 | hc attr theme.floating.reset 1 |
| 6 | hc set frame_border_width 0 | 29 | hc set frame_border_width 0 |
| @@ -11,21 +34,24 @@ hc set frame_active_opacity 0 | |||
| 11 | hc set frame_transparent_width 0 | 34 | hc set frame_transparent_width 0 |
| 12 | hc set frame_gap 0 | 35 | hc set frame_gap 0 |
| 13 | 36 | ||
| 14 | hc attr theme.active.color $color_accent | 37 | hc attr theme.active.color $HLWM_ACCENT_COLOR |
| 15 | hc attr theme.normal.color $color_bg | 38 | hc attr theme.normal.color $HLWM_BG_COLOR |
| 16 | hc attr theme.urgent.color orange | 39 | hc attr theme.urgent.color orange |
| 17 | hc attr theme.inner_width 1 | 40 | hc attr theme.inner_width 1 |
| 18 | hc attr theme.inner_color $color_bg | 41 | hc attr theme.inner_color $HLWM_BG_COLOR |
| 19 | hc attr theme.border_width 3 | 42 | hc attr theme.border_width 3 |
| 20 | hc attr theme.floating.border_width 4 | 43 | hc attr theme.floating.border_width 4 |
| 21 | hc attr theme.floating.outer_width 1 | 44 | hc attr theme.floating.outer_width 1 |
| 22 | hc attr theme.floating.outer_color $color_bg | 45 | hc attr theme.floating.outer_color $HLWM_BG_COLOR |
| 23 | hc attr theme.active.inner_color $color_bg | 46 | hc attr theme.active.inner_color $HLWM_BG_COLOR |
| 24 | hc attr theme.active.outer_color $color_bg | 47 | hc attr theme.active.outer_color $HLWM_BG_COLOR |
| 25 | hc attr theme.background_color $color_bg | 48 | hc attr theme.background_color $HLWM_BG_COLOR |
| 26 | 49 | ||
| 27 | hc set window_gap $window_p | 50 | hc set window_gap $HLWM_WINDOW_PADDING |
| 28 | hc set frame_padding 0 | 51 | hc set frame_padding 0 |
| 29 | hc set smart_window_surroundings 0 | 52 | hc set smart_window_surroundings 0 |
| 30 | hc set smart_frame_surroundings 1 | 53 | hc set smart_frame_surroundings 1 |
| 31 | hc set mouse_recenter_gap 1 | 54 | hc set mouse_recenter_gap 1 |
| 55 | hc set tree_style '╾│ ├└╼─┐' | ||
| 56 | |||
| 57 | # vim: set ts=4 sw=4 tw=0 et : | ||
diff --git a/herbstluftwm/.config/herbstluftwm/panel_indicators.sh b/herbstluftwm/.config/herbstluftwm/panel_indicators.sh index a9e71da..487cda3 100755 --- a/herbstluftwm/.config/herbstluftwm/panel_indicators.sh +++ b/herbstluftwm/.config/herbstluftwm/panel_indicators.sh | |||
| @@ -46,11 +46,11 @@ volume() | |||
| 46 | if [ -z $vol ] ; then | 46 | if [ -z $vol ] ; then |
| 47 | vol_status="off" | 47 | vol_status="off" |
| 48 | elif [ $vol -eq 0 ]; then | 48 | elif [ $vol -eq 0 ]; then |
| 49 | vol_status="%{F$acolor_fg}${volume_icon[0]} $vol%%{F-}" | 49 | vol_status="%{F$HLWM_FG_ACOLOR}${volume_icon[0]} $vol%%{F-}" |
| 50 | elif [ $vol -lt 33 ]; then | 50 | elif [ $vol -lt 33 ]; then |
| 51 | vol_status="%{F$acolor_fg}${volume_icon[1]} $vol%%{F-}" | 51 | vol_status="%{F$HLWM_FG_ACOLOR}${volume_icon[1]} $vol%%{F-}" |
| 52 | else | 52 | else |
| 53 | vol_status="%{F$acolor_fg}${volume_icon[2]} $vol%%{F-}" | 53 | vol_status="%{F$HLWM_FG_ACOLOR}${volume_icon[2]} $vol%%{F-}" |
| 54 | fi | 54 | fi |
| 55 | echo -e "volume\t$vol_status" | 55 | echo -e "volume\t$vol_status" |
| 56 | else | 56 | else |
| @@ -116,7 +116,7 @@ battery() | |||
| 116 | if [ $bat_state == "Charging" ] ; then | 116 | if [ $bat_state == "Charging" ] ; then |
| 117 | bat_status="${battery_icon[5]}" | 117 | bat_status="${battery_icon[5]}" |
| 118 | elif [ $bat_lvl -lt 10 ] ; then | 118 | elif [ $bat_lvl -lt 10 ] ; then |
| 119 | bat_status="${F$acolor_accent}${battery_icon[0]}${F-}" | 119 | bat_status="${F$HLWM_ACCENT_ACOLOR}${battery_icon[0]}${F-}" |
| 120 | elif [ $bat_ -lt 25 ] ; then | 120 | elif [ $bat_ -lt 25 ] ; then |
| 121 | bat_status="${battery_icon[1]}" | 121 | bat_status="${battery_icon[1]}" |
