From c46ccff5c972e90681510b338fa6d3ee1b644fc6 Mon Sep 17 00:00:00 2001 From: Max Koon Date: Thu, 19 Feb 2026 12:05:51 -0500 Subject: [PATCH] feat: hypr changes, notifications, power button, vpn --- home/common/optional/desktop/hyprland.nix | 1 + .../optional/desktop/hyprland/hyprland.nix | 34 +++++++++++++++---- .../optional/desktop/hyprland/hyprlock.nix | 4 +-- .../desktop/hyprland/notifications.nix | 31 +++++++++++++++++ host/common/optional/desktop/hyprland.nix | 2 ++ host/max/default.nix | 8 ++++- host/max/user.nix | 2 +- secrets | 2 +- 8 files changed, 73 insertions(+), 11 deletions(-) create mode 100644 home/common/optional/desktop/hyprland/notifications.nix diff --git a/home/common/optional/desktop/hyprland.nix b/home/common/optional/desktop/hyprland.nix index 4c03fb2..23de6f6 100644 --- a/home/common/optional/desktop/hyprland.nix +++ b/home/common/optional/desktop/hyprland.nix @@ -8,6 +8,7 @@ in (import ./hyprland/wallpaper.nix { inherit pkgs scripts; }) (import ./hyprland/hyprlock.nix { inherit pkgs scripts; }) (import ./hyprland/hypridle.nix { inherit pkgs scripts; }) + ./hyprland/notifications.nix ]; home.file.".config/waybar/config.jsonc".source = ./hyprland/waybar/config.jsonc; diff --git a/home/common/optional/desktop/hyprland/hyprland.nix b/home/common/optional/desktop/hyprland/hyprland.nix index a67c25f..9b03add 100644 --- a/home/common/optional/desktop/hyprland/hyprland.nix +++ b/home/common/optional/desktop/hyprland/hyprland.nix @@ -55,13 +55,18 @@ ]; env = [ - "XCURSOR_SIZE,20" - "XCURSOR_THEME,macOS" + "HYPRCURSOR_THEME,macOS" + "HYPRCURSOR_SIZE,20" ]; + # env = [ + # "XCURSOR_SIZE,20" + # "XCURSOR_THEME,macOS" + # ]; + general = { - gaps_in = 5; - gaps_out = 20; + gaps_in = 0; + gaps_out = 0; border_size = 2; @@ -222,8 +227,8 @@ "$mainMod SHIFT, K, swapwindow, u" "$mainMod SHIFT, J, swapwindow, d" - "$mainMod ALT, H, resizeactive, -40 0" - "$mainMod ALT, L, resizeactive, 40 0" + # "$mainMod ALT, H, resizeactive, -40 0" + # "$mainMod ALT, L, resizeactive, 40 0" # Switch workspaces with mainMod + [0-9] "$mainMod, 1, workspace, 1" @@ -256,8 +261,15 @@ # Scroll through existing workspaces with mainMod + scroll # "$mainMod, mouse_down, workspace, e+1" # "$mainMod, mouse_up, workspace, e-1" + + ", Prior, exec, ${pkgs.ydotool}/bin/ydotool click --next-delay 0 0x40" + ", Next, exec, ${pkgs.ydotool}/bin/ydotool click --next-delay 0 0x41" ]; + bindr = [ + ", Prior, exec, ${pkgs.ydotool}/bin/ydotool click --next-delay 0 0x80" + ", Next, exec, ${pkgs.ydotool}/bin/ydotool click --next-delay 0 0x81" + ]; # Move/resize windows with mainMod + LMB/RMB and dragging bindm = [ @@ -295,6 +307,16 @@ "$mainMod, X, Universal cut, sendshortcut, CTRL, X," "$mainMod, A, Universal select all, sendshortcut, CTRL, A," "$mainMod, T, Universal new tab, sendshortcut, CTRL, T," + + "$mainMod ALT, H, Universal left, sendshortcut, , Left," + "$mainMod ALT, J, Universal down, sendshortcut, , Down," + "$mainMod ALT, K, Universal up, sendshortcut, , Up," + "$mainMod ALT, L, Universal right, sendshortcut, , Right," + + "$mainMod SHIFT ALT, H, Universal left, sendshortcut, SHIFT, Left," + "$mainMod SHIFT ALT, J, Universal down, sendshortcut, SHIFT, Down," + "$mainMod SHIFT ALT, K, Universal up, sendshortcut, SHIFT, Up," + "$mainMod SHIFT ALT, L, Universal right, sendshortcut, SHIFT, Right," ]; windowrule = [ diff --git a/home/common/optional/desktop/hyprland/hyprlock.nix b/home/common/optional/desktop/hyprland/hyprlock.nix index 5f369ab..0f6f1ce 100644 --- a/home/common/optional/desktop/hyprland/hyprlock.nix +++ b/home/common/optional/desktop/hyprland/hyprlock.nix @@ -17,12 +17,12 @@ background = { monitor = ""; color = "$color"; - path = "~/Downloads/wallpaper.png"; + # path = "~/Downloads/wallpaper.png"; blur_passes = 3; }; animations = { - enabled = false; + enabled = true; }; input-field = { diff --git a/home/common/optional/desktop/hyprland/notifications.nix b/home/common/optional/desktop/hyprland/notifications.nix new file mode 100644 index 0000000..684c3e4 --- /dev/null +++ b/home/common/optional/desktop/hyprland/notifications.nix @@ -0,0 +1,31 @@ +{ + services.swaync = { + enable = true; + + settings = { + notification-window-width = 350; + }; + + # Taken from: + # https://github.com/ErikReider/SwayNotificationCenter/blob/2083415ee6441acc272f46f8a43ebccae215f69a/data/style/style.scss#L4 + style = '' + :root { + --cc-bg: rgba(46, 46, 46, 0.7); + + --noti-border-color: rgba(255, 255, 255, 0.15); + --noti-bg: 48, 48, 48; + --noti-bg-alpha: 1; + + --border-radius: 0; + + --font-size-body: 13px; + --font-size-summary: 14px; + } + + .close-button { + min-width: 18px; + min-height: 18px; + } + ''; + }; +} diff --git a/host/common/optional/desktop/hyprland.nix b/host/common/optional/desktop/hyprland.nix index ccb09ba..0e268d3 100644 --- a/host/common/optional/desktop/hyprland.nix +++ b/host/common/optional/desktop/hyprland.nix @@ -12,4 +12,6 @@ withUWSM = true; xwayland.enable = true; }; + + programs.ydotool.enable = true; } diff --git a/host/max/default.nix b/host/max/default.nix index 0a304e8..1c5dd53 100644 --- a/host/max/default.nix +++ b/host/max/default.nix @@ -39,8 +39,14 @@ }; services.upower.enable = true; + services.logind.settings.Login.HandlePowerKey = "ignore"; - networking.networkmanager.enable = true; + networking.networkmanager = { + enable = true; + plugins = with pkgs; [ + networkmanager-openconnect + ]; + }; hardware.bluetooth = { enable = true; diff --git a/host/max/user.nix b/host/max/user.nix index 87c628e..0ea771a 100644 --- a/host/max/user.nix +++ b/host/max/user.nix @@ -6,7 +6,7 @@ users.users.max = { isNormalUser = true; hashedPasswordFile = config.sops.secrets.max-password.path; - extraGroups = [ "wheel" "networkmanager" "video" "kvm" "docker" ]; + extraGroups = [ "wheel" "networkmanager" "video" "kvm" "docker" "ydotool" ]; packages = with pkgs; [ tree ]; shell = pkgs.zsh; }; diff --git a/secrets b/secrets index 7bf9979..b5647c0 160000 --- a/secrets +++ b/secrets @@ -1 +1 @@ -Subproject commit 7bf9979dacb92902fef2b6849b83edcb35b64bbd +Subproject commit b5647c00944ba45f00db6de52d3b29c085c67974