From 2df71dc2d8e9efc0e4109d49fbda83a33fcd65c3 Mon Sep 17 00:00:00 2001 From: Natasha Moongrave Date: Mon, 2 Feb 2026 16:46:46 +0100 Subject: added base hyprland config --- modules/home/hyprland/chernobyl/hyprland.nix | 142 ++++++++++++++++++++++++++- modules/nixos/des/hyprland.nix | 10 ++ modules/nixos/hyprland.nix | 7 -- 3 files changed, 151 insertions(+), 8 deletions(-) create mode 100644 modules/nixos/des/hyprland.nix delete mode 100644 modules/nixos/hyprland.nix (limited to 'modules') diff --git a/modules/home/hyprland/chernobyl/hyprland.nix b/modules/home/hyprland/chernobyl/hyprland.nix index 8712df9..51cf379 100644 --- a/modules/home/hyprland/chernobyl/hyprland.nix +++ b/modules/home/hyprland/chernobyl/hyprland.nix @@ -1,7 +1,147 @@ { pkgs, ... }: { - programs.hyprland = { + wayland.windowManager.hyprland = { enable = true; + plugins = with pkgs.hyprlandPlugins; [ + hyprbars + borders-plus-plus + hyprexpo + hyprfocus + ]; + settings = { + "$mod" = "SUPER"; + + # Startup commands + exec-once = [ + "dunst" + "nm-applet" + "blueman-applet" + ]; + + # Regular keybindings + bind = [ + # Applications + "$mod, N, exec, firefox" + "$mod, RETURN, exec, kitty" + "$mod, M, exec, rofi -show drun" + "$mod SHIFT, M, exec, kitty nnn" + "$mod SHIFT, S, exec, flameshot gui" + "$mod CTRL, L, exec, hyprlock" + + # Window management + "$mod SHIFT, Q, killactive," + "$mod, F, fullscreen, 0" + "$mod SHIFT, SPACE, togglefloating," + "$mod, SPACE, cyclenext," + + # Focus (h=left, j=down, k=up, l=right) + "$mod, H, movefocus, l" + "$mod, J, movefocus, d" + "$mod, K, movefocus, u" + "$mod, L, movefocus, r" + + # Move windows + "$mod SHIFT, H, movewindow, l" + "$mod SHIFT, J, movewindow, d" + "$mod SHIFT, K, movewindow, u" + "$mod SHIFT, L, movewindow, r" + + # Layout switching + "$mod, S, layoutmsg, togglesplit" + "$mod, W, layoutmsg, orientationcycle" + "$mod, E, layoutmsg, orientationcycle" + + # Reload + "$mod SHIFT, C, exec, hyprctl reload" + + # Workspaces (key codes for Czech layout) + "$mod, code:10, workspace, 1" + "$mod, code:11, workspace, 2" + "$mod, code:12, workspace, 3" + "$mod, code:13, workspace, 4" + "$mod, code:14, workspace, 5" + "$mod, code:15, workspace, 6" + "$mod, code:16, workspace, 7" + "$mod, code:17, workspace, 8" + "$mod, code:18, workspace, 9" + "$mod, code:19, workspace, 10" + + "$mod SHIFT, code:10, movetoworkspace, 1" + "$mod SHIFT, code:11, movetoworkspace, 2" + "$mod SHIFT, code:12, movetoworkspace, 3" + "$mod SHIFT, code:13, movetoworkspace, 4" + "$mod SHIFT, code:14, movetoworkspace, 5" + "$mod SHIFT, code:15, movetoworkspace, 6" + "$mod SHIFT, code:16, movetoworkspace, 7" + "$mod SHIFT, code:17, movetoworkspace, 8" + "$mod SHIFT, code:18, movetoworkspace, 9" + "$mod SHIFT, code:19, movetoworkspace, 10" + ]; + + # Brightness keys (repeat when held) + bindel = [ + ", XF86MonBrightnessUp, exec, brightnessctl set +10%" + ", XF86MonBrightnessDown, exec, brightnessctl set 10%-" + ]; + + # Audio keys (repeat when held) + bindle = [ + ", XF86AudioRaiseVolume, exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%+" + ", XF86AudioLowerVolume, exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%-" + ]; + + # Audio/Mic mute (no repeat) + bindl = [ + ", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle" + ", XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle" + ]; + + # Mouse bindings + bindm = [ + "$mod, mouse:272, movewindow" + "$mod, mouse:273, resizewindow" + ]; + + # Window decoration + general = { + gaps_in = 5; + gaps_out = 10; + border_size = 3; + "col.active_border" = "0xffb12cbf"; + "col.inactive_border" = "0xff4c4c4c"; + layout = "dwindle"; + }; + + decoration = { + rounding = 15; + shadow = { + enabled = true; + range = 4; + render_power = 3; + }; + }; + + animations = { + enabled = true; + animation = [ + "windows, 1, 7, default" + "windowsOut, 1, 7, default, popin 80%" + "border, 1, 10, default" + "fade, 1, 7, default" + ]; + }; + + input = { + kb_layout = "cz"; + kb_options = "eurosign:e,caps:escape"; + follow_mouse = 1; + }; + + dwindle = { + pseudotile = true; + preserve_split = true; + }; + }; }; } \ No newline at end of file diff --git a/modules/nixos/des/hyprland.nix b/modules/nixos/des/hyprland.nix new file mode 100644 index 0000000..6471bfd --- /dev/null +++ b/modules/nixos/des/hyprland.nix @@ -0,0 +1,10 @@ +{ config, lib, pkgs, ... }: + +{ + wayland.windowManager.hyprland = { + enable = true; + }; + + # hint Electron apps to use Wayland: + home.sessionVariables.NIXOS_OZONE_WL = "1"; +} \ No newline at end of file diff --git a/modules/nixos/hyprland.nix b/modules/nixos/hyprland.nix deleted file mode 100644 index a13aa20..0000000 --- a/modules/nixos/hyprland.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ config, lib, pkgs, ... }: - -{ - services.hyprland = { - enable = true; - }; -} \ No newline at end of file -- cgit v1.2.3