diff options
| -rw-r--r-- | home.nix | 9 | ||||
| -rw-r--r-- | htop/default.nix | 6 | ||||
| -rw-r--r-- | stylix/default.nix | 2 | ||||
| -rw-r--r-- | sxhkd/default.nix | 72 |
4 files changed, 60 insertions, 29 deletions
@@ -14,6 +14,7 @@ ./nvim/default.nix ./lf/default.nix ./rofi/default.nix + ./htop/default.nix ]; # Home Manager needs a bit of information about you and the paths it should # manage. @@ -30,14 +31,6 @@ home.stateVersion = "23.11"; # Please read the comment before changing. home.packages = with pkgs; [ - git - alacritty - sxhkd - bspwm - polybar - zsh - lf - rofi (nerdfonts.override { fonts = [ "FiraCode" ]; }) ]; diff --git a/htop/default.nix b/htop/default.nix new file mode 100644 index 0000000..30315d4 --- /dev/null +++ b/htop/default.nix @@ -0,0 +1,6 @@ +{ pkgs, ... }: + +{ + programs.htop.enable = true; + programs.htop.package = pkgs.htop-vim; +} diff --git a/stylix/default.nix b/stylix/default.nix index ed30880..166aa3f 100644 --- a/stylix/default.nix +++ b/stylix/default.nix @@ -2,4 +2,6 @@ { stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/classic-dark.yaml"; + + stylix.polarity = "dark"; } diff --git a/sxhkd/default.nix b/sxhkd/default.nix index 8a987b1..cdb012a 100644 --- a/sxhkd/default.nix +++ b/sxhkd/default.nix @@ -3,37 +3,67 @@ { services.sxhkd.enable = true; - services.sxhkd.keybindings = { - "super + r" = "rofi -show run"; - "super + t" = "alacritty"; - "super + f" = "alacritty -t 'File Explorer' --class 'File Explorer' -e lf"; - "super + q" = "bspc node -c"; + services.sxhkd.keybindings = + let + withDescription = keybinding: description: "# ${description}\n${keybinding}"; + in { + ${(withDescription + "super + h" + "Show keybindings.")} = ''awk '/^#/{desc=substr($0, 3)} /^[a-z]/ { cmd=$0; print cmd " : " desc }' ~/.config/sxhkd/sxhkdrc | rofi -dmenu -i -p "Keybindings"''; + + ${(withDescription + "super + r" + "Launch rofi.")} = "rofi -show run"; + + ${(withDescription + "super + t" + "Launch terminal.")} = "alacritty"; + + ${(withDescription + "super + f" + "Launch File Explorer.")} = "alacritty -t 'File Explorer' --class 'File Explorer' -e lf"; + + ${(withDescription + "super + q" + "Kill current window.")} = "bspc node -c"; # switch desktops - "super + {1-9,0}" = "bspc desktop -f {1-9,10}"; + ${(withDescription + "super + {1-9,0}" + "Switch workspace.")} = "bspc desktop -f {1-9,10}"; # move window to desktop - "super + shift + {1-9,0}" = "bspc node -d {1-9,10} --follow"; + ${(withDescription + "super + shift + {1-9,0}" + "Move window to workspace.")} = "bspc node -d {1-9,10} --follow"; # tiled - "super + n" = "bspc node focused -t tiled"; + ${(withDescription + "super + n" + "Set current window to tiled mode.")} = "bspc node focused -t tiled"; # floating - "super + d" = "bspc node focused -t floating"; + ${(withDescription + "super + d" + "Set current window to floating mode.")} = "bspc node focused -t floating"; # fullscreen - "super + m" = "bspc node focused -t fullscreen"; - - # resize windows - "super + alt + {h,j,k,l}" = '' - {bspc node @parent/second -z left -20 0; \ - bspc node @parent/first -z right -20 0, \ - bspc node @parent/second -z top 0 +20; \ - bspc node @parent/first -z bottom 0 +20, \ - bspc node @parent/first -z bottom 0 -20; \ - bspc node @parent/second -z top 0 -20, \ - bspc node @parent/first -z right +20 0; \ - bspc node @parent/second -z left +20 0} + ${(withDescription + "super + m" + "Set current window to full screen mode.")} = "bspc node focused -t fullscreen"; + + # resize windows (the indentation for each line is required to work with the help prompt) + ${(withDescription + "super + alt + {h,j,k,l}" + "Resize current window.")} = '' + {bspc node @parent/second -z left -20 0; \ + bspc node @parent/first -z right -20 0, \ + bspc node @parent/second -z top 0 +20; \ + bspc node @parent/first -z bottom 0 +20, \ + bspc node @parent/first -z bottom 0 -20; \ + bspc node @parent/second -z top 0 -20, \ + bspc node @parent/first -z right +20 0; \ + bspc node @parent/second -z left +20 0} ''; }; } |
