From 6f07cf2b902d253718284997c5b9e8d324f3648c Mon Sep 17 00:00:00 2001 From: Asaki Yuki Date: Mon, 13 Apr 2026 01:29:05 +0700 Subject: [PATCH] fixed capslock with modifier keys not trigger popup --- devices/ideapad-slim-5/configuration.nix | 43 ++++--- home/asakiyuki/configuration.nix | 15 ++- modules/features/home/vscode.nix | 13 +- modules/features/system/packages.nix | 5 +- .../programs/hyprland/settings/key-bind.nix | 119 +++++++++--------- 5 files changed, 106 insertions(+), 89 deletions(-) diff --git a/devices/ideapad-slim-5/configuration.nix b/devices/ideapad-slim-5/configuration.nix index 324b837..16c2066 100755 --- a/devices/ideapad-slim-5/configuration.nix +++ b/devices/ideapad-slim-5/configuration.nix @@ -6,7 +6,7 @@ }: let ENABLE_HDR = false; -in +in { imports = [ ./hardware-configuration.nix @@ -50,29 +50,32 @@ in wm.niri.enable = false; wm.hyprland.enable = true; wm.hyprland.monitors = [ - ({ - output = "eDP-1"; - mode = "1920x1200@60"; - position = "0x0"; - scale = 1; - } // lib.optionalAttrs ENABLE_HDR { - bitdepth = 10; - cm = "hdr"; - supports_wide_color = 1; - supports_hdr = 1; + ( + { + output = "eDP-1"; + mode = "1920x1200@60"; + position = "0x0"; + scale = 1; + } + // lib.optionalAttrs ENABLE_HDR { + bitdepth = 10; + cm = "hdr"; + supports_wide_color = 1; + supports_hdr = 1; - sdrbrightness = 1.0; - sdrsaturation = 1.0; + sdrbrightness = 1.0; + sdrsaturation = 1.0; - sdr_min_luminance = 0.005; - sdr_max_luminance = 200; + sdr_min_luminance = 0.005; + sdr_max_luminance = 200; - min_luminance = 0.0005; - max_luminance = 400; - max_avg_luminance = 250; + min_luminance = 0.0005; + max_luminance = 400; + max_avg_luminance = 250; - sdr_eotf = 2; - }) + sdr_eotf = 2; + } + ) ]; bluetooth.enable = true; diff --git a/home/asakiyuki/configuration.nix b/home/asakiyuki/configuration.nix index 8af15c1..4dc6fbf 100644 --- a/home/asakiyuki/configuration.nix +++ b/home/asakiyuki/configuration.nix @@ -17,19 +17,27 @@ in }; home-manager.users.asakiyuki = { - _module.args = { inherit inputs unstable osconfig custom libs; }; + _module.args = { + inherit + inputs + unstable + osconfig + custom + libs + ; + }; imports = [ ./modules/programs.nix ./modules/files.nix ./modules/env.nix - + ../../modules/features/home/theme.nix inputs.nixvim.homeModules.nixvim inputs.nixcord.homeModules.nixcord inputs.niri.homeModules.niri ]; - + home = { username = "asakiyuki"; stateVersion = "25.11"; @@ -42,4 +50,3 @@ in }; }; } - diff --git a/modules/features/home/vscode.nix b/modules/features/home/vscode.nix index 29000a0..a5af7c9 100644 --- a/modules/features/home/vscode.nix +++ b/modules/features/home/vscode.nix @@ -1,6 +1,7 @@ -{ unstable, ... }: { - programs.vscode = { - enable = true; - package = unstable.vscode; - }; -} \ No newline at end of file +{ unstable, ... }: +{ + programs.vscode = { + enable = true; + package = unstable.vscode; + }; +} diff --git a/modules/features/system/packages.nix b/modules/features/system/packages.nix index d45e6a7..dea3737 100644 --- a/modules/features/system/packages.nix +++ b/modules/features/system/packages.nix @@ -7,7 +7,7 @@ { environment.systemPackages = with pkgs; - [ + [ git vim wget @@ -23,12 +23,13 @@ unzip python3 jdk25 + nixfmt wine wine64 winetricks protontricks - + quickshell papirus-icon-theme ] diff --git a/modules/programs/hyprland/settings/key-bind.nix b/modules/programs/hyprland/settings/key-bind.nix index 624f81a..3e50488 100644 --- a/modules/programs/hyprland/settings/key-bind.nix +++ b/modules/programs/hyprland/settings/key-bind.nix @@ -1,71 +1,76 @@ { osconfig, config, ... }: { - wayland.windowManager.hyprland.settings.bind = [ - "CTRL ALT, T, exec, ${osconfig.device.programs.terminal}" + wayland.windowManager.hyprland.settings = { + bind = [ + "CTRL ALT, T, exec, ${osconfig.device.programs.terminal}" - "SUPER SHIFT, L, exit," - "SUPER SHIFT, TAB, togglefloating," - "SUPER SHIFT, S, exec, hyprshot -m region -o '${config.home.homeDirectory}/Pictures/Screenshots/' -z" - "SUPER, J, togglesplit," - "SUPER, E, exec, dolphin" + "SUPER SHIFT, L, exit," + "SUPER SHIFT, TAB, togglefloating," + "SUPER SHIFT, S, exec, hyprshot -m region -o '${config.home.homeDirectory}/Pictures/Screenshots/' -z" + "SUPER, J, togglesplit," + "SUPER, E, exec, dolphin" - "SUPER, C, killactive" + "SUPER, C, killactive" - "SUPER SHIFT, LEFT, resizeactive, -25 0" - "SUPER SHIFT, RIGHT, resizeactive, 25 0" - "SUPER SHIFT, UP, resizeactive, 0 -25" - "SUPER SHIFT, DOWN, resizeactive, 0 25" + "SUPER SHIFT, LEFT, resizeactive, -25 0" + "SUPER SHIFT, RIGHT, resizeactive, 25 0" + "SUPER SHIFT, UP, resizeactive, 0 -25" + "SUPER SHIFT, DOWN, resizeactive, 0 25" - "SUPER, LEFT, movefocus, l" - "SUPER, RIGHT, movefocus, r" - "SUPER, UP, movefocus, u" - "SUPER, DOWN, movefocus, d" + "SUPER, LEFT, movefocus, l" + "SUPER, RIGHT, movefocus, r" + "SUPER, UP, movefocus, u" + "SUPER, DOWN, movefocus, d" - "SUPER CTRL, LEFT, movewindow, l" - "SUPER CTRL, RIGHT, movewindow, r" - "SUPER CTRL, UP, movewindow, u" - "SUPER CTRL, DOWN, movewindow, d" - - "SUPER SHIFT, h, resizeactive, -25 0" - "SUPER SHIFT, l, resizeactive, 25 0" - "SUPER SHIFT, k, resizeactive, 0 -25" - "SUPER SHIFT, j, resizeactive, 0 25" + "SUPER CTRL, LEFT, movewindow, l" + "SUPER CTRL, RIGHT, movewindow, r" + "SUPER CTRL, UP, movewindow, u" + "SUPER CTRL, DOWN, movewindow, d" - "SUPER, h, movefocus, l" - "SUPER, l, movefocus, r" - "SUPER, k, movefocus, u" - "SUPER, j, movefocus, d" + "SUPER SHIFT, h, resizeactive, -25 0" + "SUPER SHIFT, l, resizeactive, 25 0" + "SUPER SHIFT, k, resizeactive, 0 -25" + "SUPER SHIFT, j, resizeactive, 0 25" - "SUPER CTRL, h, movewindow, l" - "SUPER CTRL, l, movewindow, r" - "SUPER CTRL, k, movewindow, u" - "SUPER CTRL, j, movewindow, d" + "SUPER, h, movefocus, l" + "SUPER, l, movefocus, r" + "SUPER, k, movefocus, u" + "SUPER, j, movefocus, d" - "SUPER, TAB, workspace, e+1" - "SUPER ALT, TAB, workspace, e-1" - "SUPER, MOUSE_DOWN, workspace, e-1" - "SUPER, MOUSE_UP, workspace, e+1" + "SUPER CTRL, h, movewindow, l" + "SUPER CTRL, l, movewindow, r" + "SUPER CTRL, k, movewindow, u" + "SUPER CTRL, j, movewindow, d" - "ALT, SPACE, global, asakiyuki:launcher" - ", XF86TouchpadToggle, global, asakiyuki:touchpadtoggle" - ", Caps_Lock, global, asakiyuki:capslock" + "SUPER, TAB, workspace, e+1" + "SUPER ALT, TAB, workspace, e-1" + "SUPER, MOUSE_DOWN, workspace, e-1" + "SUPER, MOUSE_UP, workspace, e+1" - ",XF86MonBrightnessDown, exec, brightnessctl s 5%-" - ",XF86MonBrightnessUp, exec, brightnessctl s +5%" - ] - ++ builtins.concatLists ( - builtins.genList (i: [ - "SUPER, ${toString (i + 1)}, workspace,${toString (i + 1)}" - "SUPER SHIFT, ${toString (i + 1)}, movetoworkspace,${toString (i + 1)}" - ]) 9 - ) - ++ [ - "SUPER, 0, workspace, 10" - "SUPER SHIFT, 0, movetoworkspace, 10" - ]; + ", XF86TouchpadToggle, global, asakiyuki:touchpadtoggle" + "ALT, SPACE, global, asakiyuki:launcher" - wayland.windowManager.hyprland.settings.bindm = [ - "SUPER, mouse:272, movewindow" - "SUPER, mouse:273, resizewindow" - ]; + ",XF86MonBrightnessDown, exec, brightnessctl s 5%-" + ",XF86MonBrightnessUp, exec, brightnessctl s +5%" + ] + ++ builtins.concatLists ( + builtins.genList (i: [ + "SUPER, ${toString (i + 1)}, workspace,${toString (i + 1)}" + "SUPER SHIFT, ${toString (i + 1)}, movetoworkspace,${toString (i + 1)}" + ]) 9 + ) + ++ [ + "SUPER, 0, workspace, 10" + "SUPER SHIFT, 0, movetoworkspace, 10" + ]; + + bindi = [ + ", Caps_Lock, global, asakiyuki:capslock" + ]; + + bindm = [ + "SUPER, mouse:272, movewindow" + "SUPER, mouse:273, resizewindow" + ]; + }; }