diff --git a/.gitignore b/.gitignore index 0e14f3e..225c381 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -heetch.png +*.png +*.jpg diff --git a/home-manager/niri.nix b/home-manager/niri.nix index d7f8891..f7aebd6 100644 --- a/home-manager/niri.nix +++ b/home-manager/niri.nix @@ -1,18 +1,74 @@ -{ pkgs, config, ... }: { +{ pkgs, config, lib, ... }: { programs.niri = { enable = true; - package = pkgs.niri; + package = pkgs.niri; # follows nixpkgs version because i am lazy, probably more stable to use the flake one TODO settings = { - input.mod-key = "SUPER"; + prefer-no-csd = true; # no client-side-decorations + hotkey-overlay = { + skip-at-startup = true; + }; + input = { + mod-key = "SUPER"; + focus-follows-mouse = { + enable = true; + max-scroll-amount = "95%"; + }; + mouse.natural-scroll = false; + }; + outputs = { + "eDP-2" = { + focus-at-startup = true; + #name = "laptop_monitor"; + position = { + x = 0; + y = 0; + }; + }; + "Lenovo Group Limited LEN G24-10 U5B4ZAM2" = { + #name = "right_monitor"; + position = { + x = 960; + y = -1080; + }; + }; + "Lenovo Group Limited LEN G24-10 U5B4KL78" = { + #name = "left_monitor"; + position = { + x = -960; + y = -1080; + }; + }; + }; + workspaces = { + "main".open-on-output = "eDP-2"; + "comms".open-on-output = "Lenovo Group Limited LEN G24-10 U5B4KL78"; + "bg_noise".open-on-output = "Lenovo Group Limited LEN G24-10 U5B4ZAM2"; + }; + layout = { + gaps = 5; + struts = + let + r = 5; + in + { + left = r; + right = r; + bottom = r; + top = r; + }; + }; binds = with config.lib.niri.actions; { + # keybinds for spawning apps "Mod+1".action = spawn "kitty"; - "Mod+2".action = show-hotkey-overlay; - "Mod+F11".action = fullscreen-window; "Mod+F".action = spawn "librewolf"; "Mod+D".action = spawn "vesktop"; "Mod+Space".action = spawn "sh -c 'wofi --show drun, run'"; - "Print".action = screenshot; "Mod+Alt+L".action = spawn "hyprlock"; + "Print".action = screenshot; + "Mod+2".action = show-hotkey-overlay; + # window controls + #"Mod".action = toggle-overview; + "Mod+F11".action = fullscreen-window; "Mod+x".action = close-window; "Mod+Tab".action = toggle-window-floating; "Mod+h".action = focus-column-or-monitor-left; @@ -20,16 +76,45 @@ "Mod+k".action = focus-window-or-monitor-up; "Mod+l".action = focus-column-or-monitor-right; "Mod+Shift+h".action = consume-or-expel-window-left; # no idea if this should be swap-window-left instead - "Mod+Shift+j".action = move-window-down-or-to-workspace-down; - "Mod+Shift+k".action = move-window-up-or-to-workspace-up; + "Mod+Shift+j".action = move-window-down; + "Mod+Shift+k".action = move-window-up; "Mod+Shift+l".action = consume-or-expel-window-right; # see above comment "Mod+WheelScrollUp".action = focus-workspace-up; "Mod+WheelScrollDown".action = focus-workspace-down; # not sure if these mouse scroll keybinds are in the right direction "Mod+Up".action = focus-workspace-up; "Mod+Down".action = focus-workspace-down; # not sure how to do the "send window to workspace" keybinds from the hyprland config - + }; + window-rules = [ + { + geometry-corner-radius = + let + r = 10.0; + in + { + top-left = r; + top-right = r; + bottom-left = r; + bottom-right = r; + }; + clip-to-geometry = true; + } + { + excludes = [ + { + is-active = true; + } + ]; + opacity = 0.7; + } + ]; + xwayland-satellite = { + enable = true; + path = lib.getExe pkgs.xwayland-satellite; }; }; }; + # home.packages = with pkgs; [ + # xwayland-satellite-unstable + # ]; } diff --git a/home-manager/stylix.nix b/home-manager/stylix.nix index 811c44c..8b3d187 100644 --- a/home-manager/stylix.nix +++ b/home-manager/stylix.nix @@ -3,7 +3,7 @@ stylix = { enable = true; base16Scheme = "${pkgs.base16-schemes}/share/themes/heetch.yaml"; - image = ./wallpaper.png; + image = ./wallpaper.jpg; fonts = { serif = { package = pkgs.dejavu_fonts; diff --git a/home-manager/waybar.nix b/home-manager/waybar.nix index 8eb6fc4..c208ed5 100644 --- a/home-manager/waybar.nix +++ b/home-manager/waybar.nix @@ -8,7 +8,7 @@ layer = "top"; position = "top"; height = 30; - modules-left = [ "hyprland/workspaces" ]; + modules-left = [ "niri/workspaces" ]; modules-center = [ "clock" "custom/swaync"