#!/bin/sh

herbstclient emit_hook reload

# Use the super key as the main modifier
Mod=Mod4
resizestep=0.02
commands="
	keyunbind --all ,
	keybind $Mod-Shift-q quit ,
	keybind $Mod-Shift-r reload ,
	keybind $Mod-Shift-c close ,
	keybind $Mod-Return spawn ${TERMINAL} ,
	rename default 0 ,
	add 1 , add 2 , add 3 , add 4 ,
	add 5 , add 6 , add 7 , add 8 ,
	keybind $Mod-1 use_index 1 ,
	keybind $Mod-2 use_index 2 ,
	keybind $Mod-3 use_index 3 ,
	keybind $Mod-4 use_index 4 ,
	keybind $Mod-5 use_index 5 ,
	keybind $Mod-6 use_index 6 ,
	keybind $Mod-7 use_index 7 ,
	keybind $Mod-8 use_index 8 ,
	keybind $Mod-9 use_index 0 ,
	keybind $Mod-Shift-1 move_index 1 ,
	keybind $Mod-Shift-2 move_index 2 ,
	keybind $Mod-Shift-3 move_index 3 ,
	keybind $Mod-Shift-4 move_index 4 ,
	keybind $Mod-Shift-5 move_index 5 ,
	keybind $Mod-Shift-6 move_index 6 ,
	keybind $Mod-Shift-7 move_index 7 ,
	keybind $Mod-Shift-8 move_index 8 ,
	keybind $Mod-Shift-9 move_index 0 ,
	keybind $Mod-Left focus left ,
	keybind $Mod-Down focus down ,
	keybind $Mod-Up focus up ,
	keybind $Mod-Right focus right ,
	keybind $Mod-h focus left ,
	keybind $Mod-j focus down ,
	keybind $Mod-k focus up ,
	keybind $Mod-l focus right ,
	keybind $Mod-Shift-Left shift left ,
	keybind $Mod-Shift-Down shift down ,
	keybind $Mod-Shift-Up shift up ,
	keybind $Mod-Shift-Right shift right ,
	keybind $Mod-Shift-h shift left ,
	keybind $Mod-Shift-j shift down ,
	keybind $Mod-Shift-k shift up ,
	keybind $Mod-Shift-l shift right ,
	keybind $Mod-u split bottom 0.5 ,
	keybind $Mod-o split right 0.5 ,
	keybind $Mod-Control-space split explode ,
	keybind $Mod-Control-h resize left +$resizestep ,
	keybind $Mod-Control-j resize down +$resizestep ,
	keybind $Mod-Control-k resize up +$resizestep ,
	keybind $Mod-Control-l resize right +$resizestep ,
	keybind $Mod-Control-Left resize left +$resizestep ,
	keybind $Mod-Control-Down resize down +$resizestep ,
	keybind $Mod-Control-Up resize up +$resizestep ,
	keybind $Mod-Control-Right resize right +$resizestep ,
	keybind $Mod-period use_index +1 --skip-visible ,
	keybind $Mod-comma use_index -1 --skip-visible ,
	keybind $Mod-r remove ,
	keybind $Mod-s floating toggle ,
	keybind $Mod-f fullscreen toggle ,
	keybind $Mod-Shift-f set_attr clients.focus.floating toggle ,
	keybind $Mod-Shift-d set_attr clients.focus.decorated toggle ,
	keybind $Mod-Shift-m set_attr clients.focus.minimized true ,
	keybind $Mod-Control-m jumpto last-minimized ,
	keybind $Mod-p pseudotile toggle ,
	keybind $Mod-BackSpace cycle_monitor ,
	keybind $Mod-Tab cycle_all +1 ,
	keybind $Mod-Shift-Tab cycle_all -1 ,
	keybind $Mod-c cycle ,
	keybind $Mod-i jumpto urgent ,
	set show_frame_decorations none ,
	set frame_gap 0 ,
	set frame_border_width 0 ,
	"
herbstclient chain , $commands
/usr/libexec/pipewire-launcher
