me like nix
1# Sample hyprland.conf (save as e.g. /etc/nixos/hyprland.conf)
2# See https://wiki.hyprland.org/Configuring/Variables/ for more
3
4# Monitor setup (adjust to your needs)
5monitor=,preferred,auto,2 # preferred monitor, auto resolution, auto position, scale 1
6
7# Autostart some essential programs
8exec-once = waybar # Starts Waybar (if you configure it later)
9
10#exec-once = swaybg -m fill -i /path/to/your/wallpaper.png
11# You'll need to find/download a wallpaper
12# Or use `pkgs.swaybg` and specify a package path if you want
13
14# Swayidle: idle management
15# Locks the screen after 300 seconds (5 minutes) of inactivity
16# Turns off displays after 600 seconds (10 minutes) of inactivity
17# Locks the screen before the system goes to sleep/suspend
18exec-once = swayidle -w \
19 timeout 300 'hyprlock' \
20 timeout 600 'hyprctl dispatch dpms off' \
21 resume 'hyprctl dispatch dpms on' \
22 before-sleep 'hyprlock'
23 # Optional:
24 # lock 'hyprlock' \
25 # unlock 'pkill hyprlock' # Or a more specific unlock command if needed by your setup
26 # idlehint 30 # Show a hint that idle inhibitor is active for 30s if an app requests it
27
28exec-once = lxqt-policykit-agent # Starts the polkit agent for authentication
29exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP # For portals
30exec-once = systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP # For portals
31# exec-once = mako # Starts Mako notification daemon (if you configure it later)
32# exec-once = cliphist store # Start clipboard history
33
34# Environment variables that Hyprland itself should set
35env = XCURSOR_SIZE,24
36# env = GDK_BACKEND,wayland,x11 # Already in home.sessionVariables generally
37# env = QT_QPA_PLATFORM,wayland;xcb # Already in home.sessionVariables
38# env = SDL_VIDEODRIVER,wayland # Already in home.sessionVariables
39# env = CLUTTER_BACKEND,wayland # Already in home.sessionVariables
40# env = XDG_CURRENT_DESKTOP,Hyprland # Already in home.sessionVariables
41# env = XDG_SESSION_TYPE,wayland # Already in home.sessionVariables
42# env = XDG_SESSION_DESKTOP,Hyprland # Already in home.sessionVariables
43
44# Input settings
45input {
46 kb_layout = us
47 kb_variant =
48 kb_model =
49 kb_options =
50 kb_rules =
51
52 follow_mouse = 1
53
54 touchpad {
55 natural_scroll = no
56 }
57
58 sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
59}
60
61# General settings
62general {
63 gaps_in = 5
64 gaps_out = 10
65 border_size = 2
66 col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg
67 col.inactive_border = rgba(595959aa)
68
69 layout = dwindle # master or dwindle
70}
71
72# Decoration (window borders, shadows)
73decoration {
74 rounding = 5
75 blur {
76 enabled = true
77 size = 3
78 passes = 1
79 }
80
81}
82
83# Animations
84animations {
85 enabled = yes
86 bezier = myBezier, 0.05, 0.9, 0.1, 1.05
87 animation = windows, 1, 7, myBezier
88 animation = windowsOut, 1, 7, default, popin 80%
89 animation = border, 1, 10, default
90 animation = fade, 1, 7, default
91 animation = workspaces, 1, 6, default
92}
93
94# Dwindle layout specific
95dwindle {
96 pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
97 preserve_split = yes # you probably want this
98}
99
100
101# Gestures (for touchpads)
102gestures {
103 workspace_swipe = off
104}
105
106# Window rules (example)
107# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$ # Example to float kitty terminal
108
109# --- KEYBINDINGS ---
110$mainMod = SUPER # Sets the "Windows" key as the main modifier
111
112# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
113bind = $mainMod, RETURN, exec, kitty # Open terminal (kitty)
114bind = $mainMod, Q, exec, kitty # Alternative to open terminal
115bind = $mainMod, C, killactive, # Close active window
116bind = $mainMod SHIFT, Q, exit, # Exit Hyprland (ends session)
117bind = $mainMod, E, exec, nemo # Open file manager (nemo, install it if you want it)
118bind = $mainMod, V, togglefloating, # Toggle floating for active window
119bind = $mainMod, D, exec, wofi --show drun # Show application launcher (wofi)
120bind = $mainMod, P, pseudo, # dwindle
121bind = $mainMod, J, togglesplit, # dwindle
122
123# Move focus with mainMod + arrow keys
124bind = $mainMod, left, movefocus, l
125bind = $mainMod, right, movefocus, r
126bind = $mainMod, up, movefocus, u
127bind = $mainMod, down, movefocus, d
128
129# Switch workspaces with mainMod + [0-9]
130bind = $mainMod, 1, workspace, 1
131bind = $mainMod, 2, workspace, 2
132bind = $mainMod, 3, workspace, 3
133# ... up to 9 and 0
134
135# Move active window to a workspace with mainMod + SHIFT + [0-9]
136bind = $mainMod SHIFT, 1, movetoworkspace, 1
137bind = $mainMod SHIFT, 2, movetoworkspace, 2
138bind = $mainMod SHIFT, 3, movetoworkspace, 3
139# ... up to 9 and 0
140
141# Scroll through existing workspaces with mainMod + scroll
142bind = $mainMod, mouse_down, workspace, e+1
143bind = $mainMod, mouse_up, workspace, e-1
144
145# Move/resize windows with mainMod + LMB/RMB and dragging
146bindm = $mainMod, mouse:272, movewindow
147bindm = $mainMod, mouse:273, resizewindow