nirdi 2
This commit is contained in:
138
dots/niri.nix
138
dots/niri.nix
@@ -62,7 +62,9 @@ in
|
|||||||
{ proportion = 0.9; }
|
{ proportion = 0.9; }
|
||||||
];
|
];
|
||||||
|
|
||||||
default-column-width = { proportion = 0.95; };
|
default-column-width = {
|
||||||
|
proportion = 0.95;
|
||||||
|
};
|
||||||
|
|
||||||
focus-ring = {
|
focus-ring = {
|
||||||
enable = true; # Hyprland doesn't have separate focus ring
|
enable = true; # Hyprland doesn't have separate focus ring
|
||||||
@@ -76,7 +78,10 @@ in
|
|||||||
enable = true;
|
enable = true;
|
||||||
softness = 30;
|
softness = 30;
|
||||||
spread = 5;
|
spread = 5;
|
||||||
offset = { x = 0; y = 5; };
|
offset = {
|
||||||
|
x = 0;
|
||||||
|
y = 5;
|
||||||
|
};
|
||||||
color = "#00000070";
|
color = "#00000070";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -84,12 +89,36 @@ in
|
|||||||
# Startup programs (aligned with hyprland exec-once)
|
# Startup programs (aligned with hyprland exec-once)
|
||||||
spawn-at-startup = [
|
spawn-at-startup = [
|
||||||
{ command = [ "xwayland-satellite" ]; }
|
{ command = [ "xwayland-satellite" ]; }
|
||||||
{ command = [ "${pkgs.kdePackages.polkit-kde-agent-1}/libexec/polkit-kde-authentication-agent-1" ]; }
|
{
|
||||||
|
command = [ "${pkgs.kdePackages.polkit-kde-agent-1}/libexec/polkit-kde-authentication-agent-1" ];
|
||||||
|
}
|
||||||
{ command = [ "${pkgs.kdePackages.kwallet-pam}/libexec/pam_kwallet_init" ]; }
|
{ command = [ "${pkgs.kdePackages.kwallet-pam}/libexec/pam_kwallet_init" ]; }
|
||||||
{ command = [ "fcitx5" "-d" ]; }
|
{
|
||||||
{ command = [ "foot" "-s" ]; }
|
command = [
|
||||||
{ command = [ "sh" "-c" "systemctl --user import-environment DBUS_SESSION_BUS_ADDRESS WAYLAND_DISPLAY XDG_SESSION_TYPE XDG_CURRENT_DESKTOP XDG_SESSION_DESKTOP QT_QPA_PLATFORMTHEME GTK_THEME" ]; }
|
"fcitx5"
|
||||||
{ command = [ "dbus-update-activation-environment" "--systemd" "--all" ]; }
|
"-d"
|
||||||
|
];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
command = [
|
||||||
|
"foot"
|
||||||
|
"-s"
|
||||||
|
];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
command = [
|
||||||
|
"sh"
|
||||||
|
"-c"
|
||||||
|
"systemctl --user import-environment DBUS_SESSION_BUS_ADDRESS WAYLAND_DISPLAY XDG_SESSION_TYPE XDG_CURRENT_DESKTOP XDG_SESSION_DESKTOP QT_QPA_PLATFORMTHEME GTK_THEME"
|
||||||
|
];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
command = [
|
||||||
|
"dbus-update-activation-environment"
|
||||||
|
"--systemd"
|
||||||
|
"--all"
|
||||||
|
];
|
||||||
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
# Prefer server-side decorations
|
# Prefer server-side decorations
|
||||||
@@ -112,24 +141,68 @@ in
|
|||||||
"${mod}+Return".action.spawn = [ terminal ];
|
"${mod}+Return".action.spawn = [ terminal ];
|
||||||
"${mod}+B".action.spawn = [ browser ];
|
"${mod}+B".action.spawn = [ browser ];
|
||||||
"${mod}+F".action.spawn = [ fileManager ];
|
"${mod}+F".action.spawn = [ fileManager ];
|
||||||
"${mod}+D".action.spawn = [ "sh" "-c" runner ];
|
"${mod}+D".action.spawn = [
|
||||||
"${mod}+E".action.spawn = [ "sh" "-c" editor ];
|
"sh"
|
||||||
|
"-c"
|
||||||
|
runner
|
||||||
|
];
|
||||||
|
"${mod}+E".action.spawn = [
|
||||||
|
"sh"
|
||||||
|
"-c"
|
||||||
|
editor
|
||||||
|
];
|
||||||
|
|
||||||
# Audio control (using pamixer like hyprland)
|
# Audio control (using pamixer like hyprland)
|
||||||
"XF86AudioRaiseVolume".action.spawn = [ "pamixer" "-i" "5" ];
|
"XF86AudioRaiseVolume".action.spawn = [
|
||||||
"XF86AudioLowerVolume".action.spawn = [ "pamixer" "-d" "5" ];
|
"pamixer"
|
||||||
"XF86AudioMute".action.spawn = [ "pamixer" "--toggle-mute" ];
|
"-i"
|
||||||
"XF86AudioMicMute".action.spawn = [ "wpctl" "set-mute" "@DEFAULT_AUDIO_SOURCE@" "toggle" ];
|
"5"
|
||||||
|
];
|
||||||
|
"XF86AudioLowerVolume".action.spawn = [
|
||||||
|
"pamixer"
|
||||||
|
"-d"
|
||||||
|
"5"
|
||||||
|
];
|
||||||
|
"XF86AudioMute".action.spawn = [
|
||||||
|
"pamixer"
|
||||||
|
"--toggle-mute"
|
||||||
|
];
|
||||||
|
"XF86AudioMicMute".action.spawn = [
|
||||||
|
"wpctl"
|
||||||
|
"set-mute"
|
||||||
|
"@DEFAULT_AUDIO_SOURCE@"
|
||||||
|
"toggle"
|
||||||
|
];
|
||||||
|
|
||||||
# Media controls (matching hyprland)
|
# Media controls (matching hyprland)
|
||||||
"XF86AudioNext".action.spawn = [ "playerctl" "next" ];
|
"XF86AudioNext".action.spawn = [
|
||||||
"XF86AudioPrev".action.spawn = [ "playerctl" "previous" ];
|
"playerctl"
|
||||||
"XF86AudioPlay".action.spawn = [ "playerctl" "play-pause" ];
|
"next"
|
||||||
"XF86AudioPause".action.spawn = [ "playerctl" "play-pause" ];
|
];
|
||||||
|
"XF86AudioPrev".action.spawn = [
|
||||||
|
"playerctl"
|
||||||
|
"previous"
|
||||||
|
];
|
||||||
|
"XF86AudioPlay".action.spawn = [
|
||||||
|
"playerctl"
|
||||||
|
"play-pause"
|
||||||
|
];
|
||||||
|
"XF86AudioPause".action.spawn = [
|
||||||
|
"playerctl"
|
||||||
|
"play-pause"
|
||||||
|
];
|
||||||
|
|
||||||
# Brightness control
|
# Brightness control
|
||||||
"XF86MonBrightnessUp".action.spawn = [ "sh" "-c" "dms ipc call brightness increment 5" ];
|
"XF86MonBrightnessUp".action.spawn = [
|
||||||
"XF86MonBrightnessDown".action.spawn = [ "sh" "-c" "dms ipc call brightness decrement 5" ];
|
"sh"
|
||||||
|
"-c"
|
||||||
|
"dms ipc call brightness increment 5"
|
||||||
|
];
|
||||||
|
"XF86MonBrightnessDown".action.spawn = [
|
||||||
|
"sh"
|
||||||
|
"-c"
|
||||||
|
"dms ipc call brightness decrement 5"
|
||||||
|
];
|
||||||
|
|
||||||
# Window management (matching hyprland)
|
# Window management (matching hyprland)
|
||||||
"${mod}+Q".action.close-window = { };
|
"${mod}+Q".action.close-window = { };
|
||||||
@@ -138,9 +211,20 @@ in
|
|||||||
"${mod}+T".action.fullscreen-window = { }; # Match hyprland fullscreen
|
"${mod}+T".action.fullscreen-window = { }; # Match hyprland fullscreen
|
||||||
|
|
||||||
# Screenshots (using dms like hyprland)
|
# Screenshots (using dms like hyprland)
|
||||||
"Print".action.spawn = [ "dms" "screenshot" ];
|
"Print".action.spawn = [
|
||||||
"${mod}+F1".action.spawn = [ "sh" "-c" "dms ipc call keybinds toggle niri" ];
|
"dms"
|
||||||
"${mod}+Backslash".action.spawn = [ "sh" "-c" "dms ipc call notepad toggle" ];
|
"screenshot"
|
||||||
|
];
|
||||||
|
"${mod}+F1".action.spawn = [
|
||||||
|
"sh"
|
||||||
|
"-c"
|
||||||
|
"dms ipc call keybinds toggle niri"
|
||||||
|
];
|
||||||
|
"${mod}+Backslash".action.spawn = [
|
||||||
|
"sh"
|
||||||
|
"-c"
|
||||||
|
"dms ipc call notepad toggle"
|
||||||
|
];
|
||||||
|
|
||||||
# Focus navigation (vim-style, with workspace wraparound for j/k)
|
# Focus navigation (vim-style, with workspace wraparound for j/k)
|
||||||
"${mod}+H".action.focus-column-or-monitor-left = { };
|
"${mod}+H".action.focus-column-or-monitor-left = { };
|
||||||
@@ -228,12 +312,16 @@ in
|
|||||||
window-rules = [
|
window-rules = [
|
||||||
# Float file dialogs
|
# Float file dialogs
|
||||||
{
|
{
|
||||||
matches = [{ title = "^Open File$"; }];
|
matches = [
|
||||||
|
{ title = "^Open File$"; }
|
||||||
|
{ title = "^Save File$"; }
|
||||||
|
];
|
||||||
open-floating = true;
|
open-floating = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
matches = [{ title = "^Save File$"; }];
|
matches = [ { app-id = "vesktop"; } ];
|
||||||
open-floating = true;
|
block-out-from = "screencast";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user