nixos-config

NixOS configs for my systems
Log | Files | Refs

commit 8d42e47952b290cfb0cecd67a8eadcc50f3b47fa
parent 3799daa99376ae753bcd41992006b0e234508417
Author: vin <vin@vineetk.net>
Date:   Mon,  6 Oct 2025 22:51:25 -0400

try using bspwm as current wm

Diffstat:
Mhome.nix | 115++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
Mmodules/desktop.nix | 2+-
2 files changed, 115 insertions(+), 2 deletions(-)

diff --git a/home.nix b/home.nix @@ -569,7 +569,6 @@ in # recoll? # remmina? # screen-locker - # sxhkd if using bspwm and not i3 # unison poweralertd.enable = true; @@ -588,6 +587,72 @@ in temperature.night = 4500; }; + sxhkd = { + enable = true; + keybindings = { + # reload sxhkd + "super + Escape" = "pkill -USR1 -x sxhkd"; + + # BSPWM + # quit/restart bspwm + "super + alt + shift + ctrl + {e,r}" = "bspc {quit,wm -r}"; + # close/kill window + "super + shift + {q,k}" = "bspc node -{c,k}"; + # toggle between tiled and monocle layout + "super + m" = "bspc desktop -l next"; + # send newest marked node to newest preselected node + "super + y" = "bspc node newest.marked.local -n newest.!automatic.local"; + # swap current and biggest window + "super + g" = "bspc node -s biggest.window"; + + # STATE/FLAGS + # set the window state + "super + {t,shift + t,s,f}" = "bspc node -t {tiled,pseudo_tiled,floating,fullscreen}"; + # set the node flags + "super + ctrl + {m,x,y,z}" = "bspc node -g {marked,locked,sticky,private}"; + + # FOCUS/SWAP + # focus the node in the given direction + "super + {_,shift + }{n,e,o,i}" = "bspc node -{f,s} {west,south,north,east}"; + # focus the node for the given path jump + "super + {p,b,comma,period}" = "bspc node -f @{parent,brother,first,second}"; + # focus the next/previous window in the current desktop + "super + {_,shift + }c" = "bspc node -f {next,prev}.local.!hidden.window"; + # focus the next/previous desktop in the current monitor + "super + bracket{left,right}" = "bspc desktop -f {prev,next}.local"; + # focus the last node/desktop + "super + {grave,Tab}" = "bspc {node,desktop} -f last"; + # focus or send to the given desktop + "super + {_,shift + }{1-9,0}" = "bspc {desktop -f,node -d} '^{1-9,10}'"; + + # PRESELECT + # preselect the direction + "super + ctrl + {n,e,o,i}" = "bspc node -p {west,south,north,east}"; + # preselect the ratio + "super + ctrl + {1-9}" = "bspc node -o 0.{1-9}"; + # cancel the preselection for the focused node + "super + ctrl + space" = "bspc node -p cancel"; + # cancel the preselection for the focused desktop + "super + ctrl + shift + space" = "bspc query -N -d | xargs -I id -n 1 bspc node id -p cancel"; + + # MOVE/RESIZE + # expand a window by moving one of its side outward + "super + alt + {n,e,o,i}" = "bspc node -z {left -20 0,bottom 0 20,top 0 -20,right 20 0}"; + # contract a window by moving one of its side inward + "super + alt + shift + {n,e,o,i}" = "bspc node -z {right -20 0,top 0 20,bottom 0 -20,left 20 0}"; + # move a floating window + "super + {Left,Down,Up,Right}" = "bspc node -v {-20 0,0 20,0 -20,20 0}"; + + # program keybinds + "super + Return" = "emacsclient -c"; + "super + shift + Return" = "qutebrowser"; + "super + p" = "dmenu_run"; + "super + shift + b" = "kasimenu"; + "super + shift + u" = "kasimenu user"; + "super + shift + t" = "kasimenu_totp"; + }; + }; + syncthing = { enable = true; settings = { @@ -895,4 +960,52 @@ in videos = "$HOME/"; }; }; + + xsession = { + enable = true; + profileExtra = '' + export _JAVA_AWT_WM_NONREPARENTING=1 + ''; + windowManager.bspwm = { + enable = true; + monitors = { + DP-4 = [ + "I" + "II" + "III" + "IV" + "V" + "VI" + "VII" + "VIII" + "IX" + "X" + ]; + eDP-1 = [ + "I" + "II" + "III" + "IV" + "V" + "VI" + "VII" + "VIII" + "IX" + "X" + ]; + }; + settings = { + border_width = 2; + window_gap = 0; + gapless_monocle = true; + split_ratio = 0.52; + }; + startupPrograms = [ + "emacsclient -r" + "qutebrowser" + "xwallpaper --zoom ~/pics/wp/elite_milky_way_below2.png" + "xsetwacom set \"Wacom One by Wacom S Pen stylus\" MapToOutput 2304x1440+560+0" + ]; + }; + }; } diff --git a/modules/desktop.nix b/modules/desktop.nix @@ -119,7 +119,7 @@ }; xserver = { - enable = false; + enable = true; autorun = false; displayManager.setupCommands = '' xinput set-prop "Logitech USB Receiver Mouse" "libinput Accel Profile Enabled" 0 1 0