summaryrefslogtreecommitdiff
path: root/.config/herbstluftwm/autostart
diff options
context:
space:
mode:
Diffstat (limited to '.config/herbstluftwm/autostart')
-rwxr-xr-x.config/herbstluftwm/autostart112
1 files changed, 112 insertions, 0 deletions
diff --git a/.config/herbstluftwm/autostart b/.config/herbstluftwm/autostart
new file mode 100755
index 0000000..7bc7a02
--- /dev/null
+++ b/.config/herbstluftwm/autostart
@@ -0,0 +1,112 @@
+#!/usr/bin/env bash
+
+# this is a simple config for herbstluftwm
+
+hc() {
+ herbstclient "$@"
+}
+
+hc emit_hook reload
+
+# set background color / wallpaper
+xsetroot -solid '#000000'
+feh --bg-scale /mnt/files/Pictures/background.png
+
+# remove all existing keybindings
+hc keyunbind --all
+
+# keybindings
+Mod=Mod1 # Alt as Mod key
+Super=Mod4 # Super as Super key
+
+# reload window manager
+hc keybind $Mod-Shift-r reload
+# close focused client
+hc keybind $Mod-F4 close
+# open terminal (alacritty)
+hc keybind $Mod-Control-t spawn alacritty
+
+# moving clients in tiling and floating mode
+hc keybind $Mod-Shift-Left shift left
+hc keybind $Mod-Shift-Down shift down
+hc keybind $Mod-Shift-Up shift up
+hc keybind $Mod-Shift-Right shift right
+hc keybind $Mod-Shift-h shift left
+hc keybind $Mod-Shift-j shift down
+hc keybind $Mod-Shift-k shift up
+hc keybind $Mod-Shift-l shift right
+
+# tags
+tag_names=( {1..9} )
+tag_keys=( {1..9} 0 )
+
+hc rename default "${tag_names[0]}" || true
+for i in "${!tag_names[@]}" ; do
+ hc add "${tag_names[$i]}"
+ key="${tag_keys[$i]}"
+ if ! [ -z "$key" ] ; then
+ # switch to tag i
+ hc keybind "$Super-$key" use_index "$i"
+ # move focused client to tag i
+ hc keybind "$Super-Shift-$key" move_index "$i"
+ fi
+done
+
+# cycle through tags
+hc keybind $Super-Tab use_index +1 --skip-visible
+hc keybind $Super-Shift-Tab use_index -1 --skip-visible
+
+# fullscreen
+hc keybind $Mod-f fullscreen toggle
+
+# layout
+set default_frame_layout grid
+
+# cycle through layouts
+hc keybind $Super-l \
+ or , and . compare tags.focus.curframe_wcount = 2 \
+ . cycle_layout +1 vertical horizontal max vertical grid \
+ , cycle_layout +1
+
+# mouse
+hc mouseunbind --all
+
+# cycle through clients
+hc keybind $Mod-Tab cycle
+hc keybind $Mod-Shift-Tab cycle -1
+
+# theme
+hc attr theme.tiling.reset 1
+hc attr theme.floating.reset 1
+hc attr theme.title_height 0
+hc attr theme.active.color '#929be5'
+hc attr theme.normal.color '#222432'
+hc attr theme.urgent.color '#490404'
+hc attr theme.inner_width 0
+hc attr theme.border_width 1
+hc attr theme.background_color '#141414'
+
+hc set window_gap 10
+hc set frame_padding 0
+hc set smart_window_surroundings off
+hc set smart_frame_surroundings on
+hc set mouse_recenter_gap 0
+hc set frame_bg_transparent true
+
+# rules
+hc unrule -F
+hc rule focus=on # normally focus new clients
+hc rule windowtype~'_NET_WM_WINDOW_TYPE_(DIALOG|UTILITY|SPLASH)' floating=on
+hc rule windowtype='_NET_WM_WINDOW_TYPE_DIALOG' focus=on
+hc rule windowtype~'_NET_WM_WINDOW_TYPE_(NOTIFICATION|DOCK|DESKTOP)' manage=off
+hc rule title="Origin" tag=9 focus=off
+hc rule title="Wine System Tray" tag=9 focus=off
+
+# unlock, just to be sure
+hc unlock
+
+# launch polybar
+~/.config/polybar/launch.sh
+
+xcompmgr -cfnS
+fcitx5 -d &