Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 17 additions & 3 deletions docs/reference/hyprland.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ General docs for hyprland.
| `Super+E` | Launcher |
| `Super+P` | Noctalia session panel |
| `Super+Q` | Kill active |
| `Super+V` | Clipboard history |
| `Alt+Shift` | Switch keyboard layout |
| `Alt+Tab` | Window switcher |
| `Super+N` | Noctalia notification controls |
| `Super+N` | Enter Noctalia mode |
| `Super+.` | Noctalia emoji search |

## Window
Expand Down Expand Up @@ -65,6 +65,20 @@ General docs for hyprland.
| `Super+Shift+Z` | Mumble deaf |
| `Super+.` | Noctalia emoji search |

## Noctalia Mode

Enter: `Super+N`

| Key | Action |
|---|---|
| `N` | Notifications / Control Center |
| `M` | System monitor |
| `C` | Calendar |
| `S` | Screenshot region (Noctalia) |
| `Shift+S` | Screenshot fullscreen (Noctalia) |
| `A` | Annotated screenshot (Satty) |
| `Enter` / `Esc` | Exit |

## Resize Mode

Enter: `Super+R`
Expand All @@ -77,7 +91,7 @@ Enter: `Super+R`

## Window Mode

Enter: `Super+W`
Enter: `Super+G`

| Key | Action |
|---|---|
Expand Down
5 changes: 1 addition & 4 deletions docs/reference/noctalia.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,6 @@ Remove that marker only when the declarative migration should be run again.
|---|---|
| `Super+E` | Toggle launcher |
| `Super+P` | Toggle session panel |
| `Super+N` | Open notification controls |
| `Alt+V` / `AltGr+V` | Toggle clipboard history |
| `AltGr+C` | Toggle calendar |
| `AltGr+S` | Toggle system monitor |
| `Super+N` | Enter Noctalia mode (`n` notifications, `m` monitor, `c` calendar, `s` region capture, `S` full capture, `a` annotate with satty) |
| `Super+.` | Open emoji search |
| `Alt+Tab` | Open window switcher |
137 changes: 67 additions & 70 deletions modules/home/desktops/hyprland/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ in

wayland.windowManager.hyprland = {
enable = true;
configType = "hyprlang";
configType = "lua";

inherit (cfg) package;

Expand All @@ -59,75 +59,72 @@ in
variables = [ "--all" ];
};

settings = {
env = [
"XDG_CURRENT_DESKTOP,Hyprland"
"XDG_SESSION_DESKTOP,Hyprland"
"XDG_SESSION_TYPE,wayland"
];

general = {
gaps_in = 8;
gaps_out = 10;
border_size = 3;
"col.active_border" = "rgba(cba6f7ee) rgba(89b4faee) 45deg";
"col.inactive_border" = "rgba(585b70aa)";
};

dwindle = {
preserve_split = "yes";
special_scale_factor = 0.8;
};

input = {
kb_layout = "eu,de,de";
kb_variant = ",neo_qwertz,";
repeat_rate = 40;
repeat_delay = 250;
accel_profile = "flat";
sensitivity = 1;
};

xwayland = {
force_zero_scaling = true;
};

decoration = {
blur = {
enabled = true;
size = 3;
passes = 2;
ignore_opacity = true;
new_optimizations = true;
};

rounding = 5;
};

exec-once = [
"[ workspace special:scratchy silent ] alacritty -t scratchy"
# todoist app
"[ workspace special:aux silent ] sleep 2 && chromium --profile-directory=Default --app-id=dlgohinmglaoopaiplliaecdpmnepmga"
]
++ cfg.autostart;

workspace = [
"1, monitor:desc:Dell Inc. AW2725Q G2QC174, default:true"
"2, monitor:desc:Dell Inc. AW2725Q G2QC174"
"3, monitor:desc:Samsung Electric Company LC27G7xT H4ZNC00167, default:true"
"4, monitor:desc:Samsung Electric Company LC27G7xT H4ZNC00167"
];

windowrule = [
"match:class ^(firefox)$, workspace 3"
"match:class ^(chromium-browser)$, workspace 4"

"match:class ^(.*mumble.*)$, workspace special:aux silent"
"match:class ^(.*keepassxc.*)$, workspace special:aux silent"

"match:class steam, float yes"
"match:class ^(.*nextcloud.*)$, float yes"
];
extraLuaFiles = {
"settings" = ''
-- Environment
hl.env("XDG_CURRENT_DESKTOP", "Hyprland")
hl.env("XDG_SESSION_DESKTOP", "Hyprland")
hl.env("XDG_SESSION_TYPE", "wayland")

-- General, dwindle, input, xwayland, decoration configuration
hl.config({
general = {
gaps_in = 8,
gaps_out = 10,
border_size = 3,
["col.active_border"] = "rgba(cba6f7ee) rgba(89b4faee) 45deg",
["col.inactive_border"] = "rgba(585b70aa)",
},
dwindle = {
preserve_split = true,
special_scale_factor = 0.8,
},
input = {
kb_layout = "eu,de,de",
kb_variant = ",neo_qwertz,",
kb_options = "grp:alt_shift_toggle",
repeat_rate = 40,
repeat_delay = 250,
accel_profile = "flat",
sensitivity = 1,
},
xwayland = {
force_zero_scaling = true,
},
decoration = {
rounding = 5,
blur = {
enabled = true,
size = 3,
passes = 2,
ignore_opacity = true,
new_optimizations = true,
},
},
})
'';

"rules" = ''
-- Workspaces
hl.workspace("1, monitor:desc:Dell Inc. AW2725Q G2QC174, default:true")
hl.workspace("2, monitor:desc:Dell Inc. AW2725Q G2QC174")
hl.workspace("3, monitor:desc:Samsung Electric Company LC27G7xT H4ZNC00167, default:true")
hl.workspace("4, monitor:desc:Samsung Electric Company LC27G7xT H4ZNC00167")

-- Window rules
hl.windowrule("match:class ^(firefox)$, workspace 3")
hl.windowrule("match:class ^(chromium-browser)$, workspace 4")
hl.windowrule("match:class ^(.*mumble.*)$, workspace special:aux silent")
hl.windowrule("match:class ^(.*keepassxc.*)$, workspace special:aux silent")
hl.windowrule("match:class steam, float yes")
hl.windowrule("match:class ^(.*nextcloud.*)$, float yes")
'';

"autostart" = ''
hl.exec_once("[ workspace special:scratchy silent ] alacritty -t scratchy")
hl.exec_once("[ workspace special:aux silent ] sleep 2 && chromium --profile-directory=Default --app-id=dlgohinmglaoopaiplliaecdpmnepmga")
${lib.concatMapStringsSep "\n" (cmd: "hl.exec_once(\"${cmd}\")") cfg.autostart}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Escape autostart commands before embedding them in Lua

When a roles.desktop.hyprland.autostart entry contains quotes, backslashes, or a newline—for example, a command with a quoted shell argument—this interpolation inserts those characters directly into the Lua string, potentially changing the command or making the generated configuration invalid. The option accepts arbitrary strings and the previous Home Manager settings serializer escaped them, so serialize each command as a valid Lua-compatible quoted string instead of wrapping ${cmd} manually.

Useful? React with 👍 / 👎.

'';
};
};
}
Expand Down
Loading