way too many changes for one commit

This commit is contained in:
Thomas Ruoff
2018-10-03 23:05:11 +02:00
parent ca57483a78
commit 71a28173de
6 changed files with 136 additions and 104 deletions

View File

@@ -1,39 +1,44 @@
#!/usr/bin/env bash #!/usr/bin/env bash
exec 2>&1 > >(tee -i /tmp/hlwm-autostart.log)
CFGDIR=$HOME/.config/herbstluftwm PIDS_FILE=/tmp/hlwm-autostart-pids
# kill old instances, perhaps I should do this with pids? hc() {
pkill dzen2 herbstclient "$@"
pkill lemonbar }
pkill stalonetray
pkill conky
pkill urxvtd
pkill udiskie
herbstclient emit_hook reload store_pid() {
echo $! >> $PIDS_FILE
}
${CFGDIR}/bindings.sh OLD_PIDS=$(cat $PIDS_FILE)
${CFGDIR}/rules.sh rm $PIDS_FILE
${CFGDIR}/styling.sh
herbstclient set tree_style '╾│ ├└╼─┐' kill $OLD_PIDS
herbstclient unlock
herbstclient detect_monitors hc emit_hook reload
~/.config/herbstluftwm/bindings.sh
~/.config/herbstluftwm/rules.sh
~/.config/herbstluftwm/styling.sh
hc set tree_style '╾│ ├└╼─┐'
hc unlock
hc detect_monitors
panel_height=20 panel_height=20
statusbar_height=20 statusbar_height=20
for monitor in $(herbstclient list_monitors | cut -d: -f1) ; do for monitor in $(hc list_monitors | cut -d: -f1) ; do
# start it on each monitor # start it on each monitor
herbstclient pad $monitor $panel_height 0 $statusbar_height 0 hc pad $monitor $panel_height 0 $statusbar_height 0
${CFGDIR}/panel.sh $monitor & ~/.config/herbstluftwm/panel.sh $monitor & store_pid
${CFGDIR}/statusbar.sh $monitor & ~/.config/herbstluftwm/statusbar.sh $monitor & store_pid
done done
${CFGDIR}/tray.sh & ~/.config/herbstluftwm/tray.sh & store_pid
udiskie --tray & store_pid
urxvtd &
udiskie --tray &
systemctl --user restart sxhkd systemctl --user restart sxhkd
systemctl --user restart xautolock systemctl --user restart xautolock

View File

@@ -1,77 +1,84 @@
#!/bin/bash #!/usr/bin/env bash
herbstclient keyunbind --all set -e
hc() {
herbstclient "$@"
}
hc keyunbind --all
# keybindings # keybindings
Mod=Mod4 Mod=Mod4
herbstclient keybind $Mod-Control-q quit
herbstclient keybind $Mod-Shift-q close hc keybind $Mod-Control-q quit
herbstclient keybind $Mod-Shift-r reload hc keybind $Mod-Shift-q close
hc keybind $Mod-Shift-r reload
# tags # tags
TAG_NAMES=( {1..9} 0 ) TAG_NAMES=( {1..9} 0 )
TAG_KEYS=( {1..9} 0 ) TAG_KEYS=( {1..9} 0 )
herbstclient rename default "${TAG_NAMES[0]}" || true hc rename default "${TAG_NAMES[0]}" || true
for i in ${!TAG_NAMES[@]} ; do for i in ${!TAG_NAMES[@]} ; do
herbstclient add "${TAG_NAMES[$i]}" hc add "${TAG_NAMES[$i]}"
key="${TAG_KEYS[$i]}" key="${TAG_KEYS[$i]}"
if ! [ -z "$key" ] ; then if ! [ -z "$key" ] ; then
herbstclient keybind "$Mod-$key" use_index "$i" hc keybind "$Mod-$key" use_index "$i"
herbstclient keybind "$Mod-Shift-$key" move_index "$i" hc keybind "$Mod-Shift-$key" move_index "$i"
fi fi
done done
# cycle through tags # cycle through tags
herbstclient keybind $Mod-period use_index +1 --skip-visible hc keybind $Mod-period use_index +1 --skip-visible
herbstclient keybind $Mod-comma use_index -1 --skip-visible hc keybind $Mod-comma use_index -1 --skip-visible
herbstclient keybind $Mod-Right use_index +1 --skip-visible hc keybind $Mod-Right use_index +1 --skip-visible
herbstclient keybind $Mod-Left use_index -1 --skip-visible hc keybind $Mod-Left use_index -1 --skip-visible
herbstclient keybind $Mod-minus use_previous hc keybind $Mod-minus use_previous
# layouting # layouting
herbstclient keybind $Mod-r remove hc keybind $Mod-r remove
herbstclient keybind $Mod-space cycle_layout 1 hc keybind $Mod-space cycle_layout 1
herbstclient keybind $Mod-e split explode hc keybind $Mod-e split explode
herbstclient keybind $Mod-u split vertical 0.5 hc keybind $Mod-u split vertical 0.5
herbstclient keybind $Mod-Shift-u split vertical 0.66 hc keybind $Mod-Shift-u split vertical 0.66
herbstclient keybind $Mod-o split horizontal 0.5 hc keybind $Mod-o split horizontal 0.5
herbstclient keybind $Mod-Shift-o split horizontal 0.666 hc keybind $Mod-Shift-o split horizontal 0.666
herbstclient keybind $Mod-s floating toggle hc keybind $Mod-s floating toggle
herbstclient keybind $Mod-f fullscreen toggle hc keybind $Mod-f fullscreen toggle
herbstclient keybind $Mod-p pseudotile toggle hc keybind $Mod-p pseudotile toggle
# resizing # resizing
RESIZESTEP=0.02 RESIZESTEP=0.02
herbstclient keybind $Mod-Control-h resize left +$RESIZESTEP hc keybind $Mod-Control-h resize left +$RESIZESTEP
herbstclient keybind $Mod-Control-j resize down +$RESIZESTEP hc keybind $Mod-Control-j resize down +$RESIZESTEP
herbstclient keybind $Mod-Control-k resize up +$RESIZESTEP hc keybind $Mod-Control-k resize up +$RESIZESTEP
herbstclient keybind $Mod-Control-l resize right +$RESIZESTEP hc keybind $Mod-Control-l resize right +$RESIZESTEP
# mouse in floating mode # mouse in floating mode
herbstclient mouseunbind --all hc mouseunbind --all
herbstclient mousebind $Mod-Button1 move hc mousebind $Mod-Button1 move
herbstclient mousebind $Mod-Button2 zoom hc mousebind $Mod-Button2 zoom
herbstclient mousebind $Mod-Button3 resize hc mousebind $Mod-Button3 resize
# focus # focus
herbstclient set focus_follows_mouse 1 hc set focus_follows_mouse 1
herbstclient rule focus=on hc rule focus=on
herbstclient keybind $Mod-BackSpace cycle_monitor hc keybind $Mod-BackSpace cycle_monitor
herbstclient keybind $Mod-Tab cycle_all +1 hc keybind $Mod-Tab cycle_all +1
herbstclient keybind $Mod-Shift-Tab cycle_all -1 hc keybind $Mod-Shift-Tab cycle_all -1
herbstclient keybind $Mod-c cycle hc keybind $Mod-c cycle
herbstclient keybind $Mod-h focus left hc keybind $Mod-h focus left
herbstclient keybind $Mod-j focus down hc keybind $Mod-j focus down
herbstclient keybind $Mod-k focus up hc keybind $Mod-k focus up
herbstclient keybind $Mod-l focus right hc keybind $Mod-l focus right
herbstclient keybind $Mod-i jumpto urgent hc keybind $Mod-i jumpto urgent
herbstclient keybind $Mod-Shift-h shift left hc keybind $Mod-Shift-h shift left
herbstclient keybind $Mod-Shift-j shift down hc keybind $Mod-Shift-j shift down
herbstclient keybind $Mod-Shift-k shift up hc keybind $Mod-Shift-k shift up
herbstclient keybind $Mod-Shift-l shift right hc keybind $Mod-Shift-l shift right

View File

@@ -1,13 +1,16 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -e set -e
hc() {
herbstclient "$@"
}
# rules # rules
herbstclient unrule -F hc unrule -F
#herbstclient rule class=XTerm tag=3 # move all xterms to tag 3 #hc rule class=XTerm tag=3 # move all xterms to tag 3
herbstclient rule focus=off # normally do not focus new clients hc rule focus=off # normally do not focus new clients
# give focus to most common terminals # give focus to most common terminals
herbstclient rule class~'(.*[Rr]xvt.*|.*[Tt]erm|Konsole)' focus=on hc rule class~'(.*[Rr]xvt.*|.*[Tt]erm|Konsole)' focus=on
herbstclient rule windowtype~'_NET_WM_WINDOW_TYPE_(DIALOG|UTILITY|SPLASH)' pseudotile=on hc rule windowtype~'_NET_WM_WINDOW_TYPE_(DIALOG|UTILITY|SPLASH)' pseudotile=on
herbstclient rule windowtype='_NET_WM_WINDOW_TYPE_DIALOG' focus=on hc rule windowtype='_NET_WM_WINDOW_TYPE_DIALOG' focus=on
herbstclient rule windowtype~'_NET_WM_WINDOW_TYPE_(NOTIFICATION|DOCK)' manage=off hc rule windowtype~'_NET_WM_WINDOW_TYPE_(NOTIFICATION|DOCK)' manage=off

View File

@@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
#font="-*-fixed-medium-*-*-*-12-*-*-*-*-*-*-*" #font="-*-fixed-medium-*-*-*-12-*-*-*-*-*-*-*"
font="DejaVu Sans Mono for Powerline:pixelsize=11" font="DejaVu Sans Mono for Powerline:pixelsize=11"
@@ -12,8 +12,3 @@ activeOnMontior="2aa198"
notempty="#fdf6e3" notempty="#fdf6e3"
notused="#657b83" notused="#657b83"
urgent="#dc322f" urgent="#dc322f"
function uniq_linebuffered() {
awk -W interactive '$0 != l { print ; l=$0 ; fflush(); }' "$@"
}

View File

@@ -1,9 +1,12 @@
#!/usr/bin/env bash #!/usr/bin/env bash
source ~/.config/herbstluftwm/settings.sh source ~/.config/herbstluftwm/settings.sh
function uniq_linebuffered() {
awk -W interactive '$0 != l { print ; l=$0 ; fflush(); }' "$@"
}
# disable path name expansion or * will be expanded in the line # disable path name expansion or * will be expanded in the line
# cmd=( $line ) # cmd=( $line )
set -f
statusbar_height=20 statusbar_height=20
monitor=${1:-0} monitor=${1:-0}

View File

@@ -1,28 +1,47 @@
#!/bin/bash -x #!/usr/bin/env bash
CFGDIR=$HOME/.config/herbstluftwm set -e
$CFGDIR/wallpaper.sh hc() {
herbstclient "$@"
}
./wallpaper.sh
# frame/window styling # frame/window styling
hc attr theme.tiling.reset 1
hc attr theme.floating.reset 1
herbstclient set frame_border_active_color '#eee8d5' hc attr theme.active.color '#9fbc00'
herbstclient set frame_border_normal_color '#475152' hc attr theme.normal.color '#454545'
herbstclient set frame_bg_transparent 1 hc attr theme.urgent.color orange
herbstclient set frame_border_width 1 hc attr theme.inner_width 1
herbstclient set frame_active_opacity 80 hc attr theme.inner_color black
herbstclient set frame_normal_opacity 80 hc attr theme.border_width 3
herbstclient set frame_gap 4 hc attr theme.floating.border_width 4
herbstclient set frame_padding 0 hc attr theme.floating.outer_width 1
herbstclient set always_show_frame 1 hc attr theme.floating.outer_color black
herbstclient set smart_frame_surroundings 1 hc attr theme.active.inner_color '#3E4A00'
hc attr theme.active.outer_color '#3E4A00'
hc attr theme.background_color '#141414'
herbstclient set window_border_width 2 hc set frame_border_active_color '#eee8d5'
herbstclient set window_border_inner_width 0 hc set frame_border_normal_color '#475152'
herbstclient set window_border_normal_color '#0a1b22' hc set frame_bg_transparent 1
herbstclient set window_border_active_color '#d9e5e7' hc set frame_border_width 1
herbstclient set window_gap 0 hc set frame_active_opacity 80
herbstclient set smart_window_surroundings 1 hc set frame_normal_opacity 80
hc set frame_gap 4
hc set frame_padding 0
hc set always_show_frame 1
hc set smart_frame_surroundings 1
hc set window_border_width 2
hc set window_border_inner_width 0
hc set window_border_normal_color '#0a1b22'
hc set window_border_active_color '#d9e5e7'
hc set window_gap 0
hc set smart_window_surroundings 1
herbstclient set mouse_recenter_gap 0 hc set mouse_recenter_gap 0