diff options
Diffstat (limited to 'herbstluftwm')
| -rwxr-xr-x | herbstluftwm/.config/herbstluftwm/autostart | 61 | ||||
| -rw-r--r-- | herbstluftwm/.config/herbstluftwm/dependencylist | 4 | ||||
| -rwxr-xr-x | herbstluftwm/.config/herbstluftwm/panel_handler.sh | 17 | ||||
| -rwxr-xr-x[-rw-r--r--] | herbstluftwm/.config/herbstluftwm/panel_indicators.sh | 8 | ||||
| -rwxr-xr-x | herbstluftwm/.config/herbstluftwm/populate_panel.sh (renamed from herbstluftwm/.config/herbstluftwm/panel.sh) | 51 | ||||
| -rwxr-xr-x | herbstluftwm/.config/herbstluftwm/start.sh | 2 | ||||
| -rwxr-xr-x | herbstluftwm/.config/herbstluftwm/start_panel.sh | 33 | ||||
| l--------- | herbstluftwm/.config/herbstluftwm/themes/current | 1 | ||||
| -rw-r--r-- | herbstluftwm/.config/herbstluftwm/themes/purpur (renamed from herbstluftwm/.config/herbstluftwm/theme) | 4 |
9 files changed, 91 insertions, 90 deletions
diff --git a/herbstluftwm/.config/herbstluftwm/autostart b/herbstluftwm/.config/herbstluftwm/autostart index 7a80b1c..78a81b4 100755 --- a/herbstluftwm/.config/herbstluftwm/autostart +++ b/herbstluftwm/.config/herbstluftwm/autostart | |||
| @@ -1,17 +1,16 @@ | |||
| 1 | #!/usr/bin/env bash | 1 | #!/usr/bin/env bash |
| 2 | 2 | ||
| 3 | # this is a simple config for herbstluftwm | ||
| 4 | |||
| 5 | # The current directory | ||
| 6 | dir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) | ||
| 7 | |||
| 8 | # Herbstclient shortcut | 3 | # Herbstclient shortcut |
| 9 | hc() { | 4 | hc() { |
| 10 | herbstclient "$@" | 5 | herbstclient "$@" |
| 11 | } | 6 | } |
| 7 | export -f hc | ||
| 8 | |||
| 9 | # The current directory | ||
| 10 | export HLWM_CONF_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) | ||
| 12 | 11 | ||
| 13 | #Include the theming script | 12 | #Include the theming script |
| 14 | source "$dir/theme" | 13 | source "$HLWM_CONF_DIR/themes/current" |
| 15 | 14 | ||
| 16 | #Detect monitors | 15 | #Detect monitors |
| 17 | hc set auto_detect_monitors 1 | 16 | hc set auto_detect_monitors 1 |
| @@ -26,17 +25,16 @@ dmenu_opts="-h $panel_h -w $panel_w -x $window_p -y $window_p -p Run: -nb $color | |||
| 26 | tag_names=() | 25 | tag_names=() |
| 27 | tag_keys=({1..9} 0) | 26 | tag_keys=({1..9} 0) |
| 28 | for key in ${tag_keys[@]}; do | 27 | for key in ${tag_keys[@]}; do |
| 29 | if [ $key -eq 0 ]; then key=10; fi | 28 | if [ $key -eq 0 ]; then key=10; fi |
| 30 | key=$(echo "$key - 1" | bc) | 29 | key=$(echo "$key - 1" | bc) |
| 31 | echo $key | 30 | name=$(echo "obase=2;$key" | bc | awk '{ printf "%04d", $0 }') |
| 32 | name=$(echo "obase=2;$key" | bc | awk '{ printf "%04d", $0 }') | 31 | tag_names+=($name) |
| 33 | tag_names+=($name) | ||
| 34 | done; | 32 | done; |
| 35 | 33 | ||
| 36 | # Source hlwm-config-files | 34 | # Source hlwm-config-files |
| 37 | source "$dir/hlwm-keybindings" | 35 | source "$HLWM_CONF_DIR/hlwm-keybindings" |
| 38 | source "$dir/hlwm-theming" | 36 | source "$HLWM_CONF_DIR/hlwm-theming" |
| 39 | source "$dir/hlwm-rules" | 37 | source "$HLWM_CONF_DIR/hlwm-rules" |
| 40 | 38 | ||
| 41 | # Unlock, just to be sure | 39 | # Unlock, just to be sure |
| 42 | hc unlock | 40 | hc unlock |
| @@ -44,29 +42,20 @@ hc unlock | |||
| 44 | herbstclient set tree_style '╾│ ├└╼─┐' | 42 | herbstclient set tree_style '╾│ ├└╼─┐' |
| 45 | 43 | ||
| 46 | # Start panel in all monitors | 44 | # Start panel in all monitors |
| 47 | start_panel() { | 45 | panel=$HLWM_CONF_DIR/start_panel.sh |
| 48 | for monitor in $(herbstclient list_monitors | cut -d: -f1) ; do | ||
| 49 | "$1" $monitor& | ||
| 50 | done | ||
| 51 | } | ||
| 52 | |||
| 53 | # Find the panel | ||
| 54 | panel=$dir/panel.sh | ||
| 55 | [ -x "$panel" ] || panel=/etc/xdg/herbstluftwm/panel.sh | 46 | [ -x "$panel" ] || panel=/etc/xdg/herbstluftwm/panel.sh |
| 56 | if pgrep panel.sh >> /dev/null | 47 | for monitor in $(herbstclient list_monitors | cut -d: -f1) ; do |
| 57 | then | 48 | $panel $monitor& |
| 58 | kill $(pgrep panel.sh) | 49 | done |
| 59 | start_panel $panel | ||
| 60 | else | ||
| 61 | start_panel $panel | ||
| 62 | fi | ||
| 63 | 50 | ||
| 64 | pulseaudio --start | 51 | pulseaudio --start |
| 65 | 52 | ||
| 66 | $dir/start.sh "xautolock -time 5 -locker $dir/lock.sh" | 53 | $HLWM_CONF_DIR/start.sh "xautolock -time 5 -locker $HLWM_CONF_DIR/lock.sh" |
| 67 | $dir/start.sh "feh --bg-fill $wallpaper" | 54 | $HLWM_CONF_DIR/start.sh "feh --bg-fill $wallpaper" |
| 68 | $dir/start.sh "compton --config $HOME/.compton" | 55 | $HLWM_CONF_DIR/start.sh "compton --config $HOME/.compton" |
| 69 | $dir/start.sh "xrdb -load $HOME/.Xresources" | 56 | $HLWM_CONF_DIR/start.sh "xrdb -load $HOME/.Xresources" |
| 70 | $dir/start.sh "xset +fp /usr/share/fonts/local" | 57 | $HLWM_CONF_DIR/start.sh "xset +fp /usr/share/fonts/local" |
| 71 | $dir/start.sh "xset fp rehash" | 58 | $HLWM_CONF_DIR/start.sh "xset fp rehash" |
| 72 | #$dir/start.sh "$dir/notify.sh $dir/popup.sh" | 59 | #$HLWM_CONF_DIR/start.sh "$HLWM_CONF_DIR/notify.sh $HLWM_CONF_DIR/popup.sh" |
| 60 | |||
| 61 | # vim: set ts=4 sw=4 tw=0 et : | ||
diff --git a/herbstluftwm/.config/herbstluftwm/dependencylist b/herbstluftwm/.config/herbstluftwm/dependencylist index e62c3af..34c9bf9 100644 --- a/herbstluftwm/.config/herbstluftwm/dependencylist +++ b/herbstluftwm/.config/herbstluftwm/dependencylist | |||
| @@ -4,12 +4,12 @@ compton | |||
| 4 | dmenu2 | 4 | dmenu2 |
| 5 | feh | 5 | feh |
| 6 | i3lock | 6 | i3lock |
| 7 | lemonbar-git | 7 | lemonbar-xft-git |
| 8 | playerctl | 8 | playerctl |
| 9 | pulseaudio | 9 | pulseaudio |
| 10 | pulseaudio-alsa | 10 | pulseaudio-alsa |
| 11 | scrot | 11 | scrot |
| 12 | sed | 12 | sed |
| 13 | stlarch_font | 13 | ttf-font-awesome |
| 14 | wireless_tools | 14 | wireless_tools |
| 15 | xautolock | 15 | xautolock |
diff --git a/herbstluftwm/.config/herbstluftwm/panel_handler.sh b/herbstluftwm/.config/herbstluftwm/panel_handler.sh new file mode 100755 index 0000000..6bff693 --- /dev/null +++ b/herbstluftwm/.config/herbstluftwm/panel_handler.sh | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | #!/usr/bin/env bash | ||
| 2 | |||
| 3 | #Handle clickable areas | ||
| 4 | while read line; do | ||
| 5 | IFS=',' read -a c <<< $(echo $line) | ||
| 6 | case "${c[0]}" in | ||
| 7 | tag) | ||
| 8 | herbstclient use "${c[1]}" | ||
| 9 | echo "herbstclient use \"${c[1]}\"" | ||
| 10 | ;; | ||
| 11 | *) | ||
| 12 | echo "${c[0]}: not valid command" | ||
| 13 | ;; | ||
| 14 | esac | ||
| 15 | done | ||
| 16 | |||
| 17 | # 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 a433e3a..ad45d75 100644..100755 --- a/herbstluftwm/.config/herbstluftwm/panel_indicators.sh +++ b/herbstluftwm/.config/herbstluftwm/panel_indicators.sh | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | #!/bin/bash | 1 | #!/usr/bin/env bash |
| 2 | icon_font="-*-stlarch-medium-*-*-*-10-*-*-*-*-*-*-*" | 2 | icon_font="FontAwesome-10" |
| 3 | battery_icon=("\ue113" "\ue114" "\ue115" "\ue116" "\ue042") | 3 | battery_icon=("\ue113" "\ue114" "\ue115" "\ue116" "\ue042") |
| 4 | network_icon=("\ue0f1" "\ue0f2" "\ue0f3" "%{T2}\ue0af%{T-}") | 4 | network_icon=("\ue0f1" "\ue0f2" "\ue0f3" "\ue0af") |
| 5 | music_icon="\ue05c" | 5 | music_icon="\ue05c" |
| 6 | 6 | ||
| 7 | music() | 7 | music() |
| @@ -43,7 +43,7 @@ volume() | |||
| 43 | if [ -z $vol ] ; then | 43 | if [ -z $vol ] ; then |
| 44 | echo -e "volume\toff" | 44 | echo -e "volume\toff" |
| 45 | else | 45 | else |
| 46 | echo -e "volume\t%{F$acolor_fg}\ue05d $vol%%%{F-}" | 46 | echo -e "volume\t%{F$acolor_fg}\ue05d $vol%%{F-}" |
| 47 | fi | 47 | fi |
| 48 | else | 48 | else |
| 49 | echo -e "volume\toff" | 49 | echo -e "volume\toff" |
diff --git a/herbstluftwm/.config/herbstluftwm/panel.sh b/herbstluftwm/.config/herbstluftwm/populate_panel.sh index 70e8154..07ecafd 100755 --- a/herbstluftwm/.config/herbstluftwm/panel.sh +++ b/herbstluftwm/.config/herbstluftwm/populate_panel.sh | |||
| @@ -1,30 +1,7 @@ | |||
| 1 | #!/bin/bash | 1 | #!/usr/bin/env bash |
| 2 | 2 | ||
| 3 | dir=$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd) | 3 | source "$HLWM_CONF_DIR/themes/current" |
| 4 | 4 | source "$HLWM_CONF_DIR/panel_indicators.sh" | |
| 5 | hc() { | ||
| 6 | "${herbstclient_command[@]:-herbstclient}" "$@" | ||
| 7 | } | ||
| 8 | |||
| 9 | source "$dir/theme" | ||
| 10 | source "$dir/panel_indicators.sh" | ||
| 11 | |||
| 12 | monitor=${1:-0} | ||
| 13 | |||
| 14 | geometry=($(herbstclient monitor_rect "$monitor")) | ||
| 15 | if [ -z "$geometry" ] ;then | ||
| 16 | echo "Invalid monitor $monitor" | ||
| 17 | exit 1 | ||
| 18 | fi | ||
| 19 | |||
| 20 | # Geometry has the format W H X Y | ||
| 21 | x=$(echo "${geometry[0]} + $window_p" | bc) | ||
| 22 | y=$(echo "${geometry[1]} + $window_p" | bc) | ||
| 23 | |||
| 24 | panel_width=$(echo "${geometry[2]} - (2 * $window_p)" | bc) | ||
| 25 | bar_opts="-g ${panel_width}x${panel_h}+${x}+${y} -f $font -f $icon_font -u 2 -B $acolor_bg -F $acolor_fg" | ||
| 26 | |||
| 27 | hc pad $monitor $(echo "$panel_h + $window_p" | bc) | ||
| 28 | 5 | ||
| 29 | if awk -Wv 2>/dev/null | head -1 | grep -q '^mawk'; then | 6 | if awk -Wv 2>/dev/null | head -1 | grep -q '^mawk'; then |
| 30 | # mawk needs "-W interactive" to line-buffer stdout correctly | 7 | # mawk needs "-W interactive" to line-buffer stdout correctly |
| @@ -99,7 +76,7 @@ fi | |||
| 99 | echo -n "$separator%{F-}%{B-} " | 76 | echo -n "$separator%{F-}%{B-} " |
| 100 | echo -n "${windowtitle//^/^^}" | 77 | echo -n "${windowtitle//^/^^}" |
| 101 | 78 | ||
| 102 | # Right part of panel | 79 | # Right part of panel |
| 103 | right="$music$volume$net$battery$date " | 80 | right="$music$volume$net$battery$date " |
| 104 | echo -n "%{r}$right" | 81 | echo -n "%{r}$right" |
| 105 | 82 | ||
| @@ -155,22 +132,6 @@ fi | |||
| 155 | esac | 132 | esac |
| 156 | done | 133 | done |
| 157 | 134 | ||
| 158 | } 2> /dev/null | lemonbar $bar_opts | { | ||
