niri stuff

This commit is contained in:
elwrcl committed 2026-06-09 14:56:33 +03:00
1 parent 948e63d1fb
commit 20ee3460c1
10 files changed
+289 -13

No files matched your search

+7 -2
View File
@@ -1,4 +1,9 @@
{ ... }:
{ pkgs, inputs, ... }:
{
xdg.configFile."niri/config.kdl".source = ./niri/config.kdl;
imports = [ ./niri/default.nix ];
programs.niri = {
enable = true;
package = inputs.niri.packages.${pkgs.stdenv.hostPlatform.system}.niri;
};
}
+2 -8
View File
@@ -10,14 +10,13 @@ input {
}
mouse {
accel-speed -0.5
accel-speed 0
accel-profile "adaptive"
}
touchpad {
tap
natural-scroll
disabled-on-typing
scroll-factor 0.5
click-method "clickfinger"
}
@@ -26,11 +25,6 @@ input {
warp-mouse-to-focus
}
cursor {
theme "Bibata-Modern-Classic"
size 24
}
environment {
XCURSOR_THEME "Bibata-Modern-Classic"
XCURSOR_SIZE "24"
@@ -45,8 +39,8 @@ environment {
DISPLAY ":0"
}
spawn-at-startup "noctalia"
spawn-at-startup "xwayland-satellite"
spawn-at-startup "noctalia-shell"
spawn-at-startup "sh" "-c" "wl-paste --type text --watch cliphist store"
spawn-at-startup "sh" "-c" "wl-paste --type image --watch cliphist store"
+10
View File
@@ -0,0 +1,10 @@
{ ... }:
{
imports = [
./niri/env.nix
./niri/execs.nix
./niri/general.nix
./niri/rules.nix
./niri/keybinds.nix
];
}
+19
View File
@@ -0,0 +1,19 @@
{ ... }:
{
programs.niri.settings = {
environment = {
DISPLAY = ":0";
XCURSOR_THEME = "Bibata-Modern-Classic";
XCURSOR_SIZE = "24";
QT_STYLE_OVERRIDE = "adwaita-dark";
GDK_BACKEND = "wayland,x11";
QT_QPA_PLATFORM = "wayland;xcb";
QT_QPA_PLATFORMTHEME = "gtk3";
ELECTRON_OZONE_PLATFORM_HINT = "auto";
TERMINAL = "ghostty";
MESA_GL_VERSION_OVERRIDE = "4.6";
MESA_GLSL_VERSION_OVERRIDE = "460";
};
};
}
+13
View File
@@ -0,0 +1,13 @@
{ ... }:
{
programs.niri.settings = {
"prefer-no-csd" = true;
spawn-at-startup = [
{ command = [ "noctalia" ]; }
{ command = [ "xwayland-satellite" ]; }
{ command = [ "sh" "-c" "wl-paste --type text --watch cliphist store" ]; }
{ command = [ "sh" "-c" "wl-paste --type image --watch cliphist store" ]; }
];
};
}
+52
View File
@@ -0,0 +1,52 @@
{ ... }:
{
programs.niri.settings = {
input = {
keyboard.xkb.layout = "tr";
"repeat-delay" = 250;
"repeat-rate" = 35;
mouse = {
"accel-speed" = 0.0;
"accel-profile" = "adaptive";
};
touchpad = {
tap = true;
"natural-scroll" = true;
"scroll-factor" = 0.5;
"click-method" = "clickfinger";
};
"focus-follows-mouse" = true;
"warp-mouse-to-focus" = true;
};
animations = {
slowdown = 0.8;
};
layout = {
gaps = 5;
struts = {
left = 7;
right = 7;
top = 7;
bottom = 7;
};
"center-focused-column" = "never";
"preset-column-widths" = [
{ proportion = 0.33333; }
{ proportion = 0.5; }
{ proportion = 0.66667; }
];
"default-column-width" = {
proportion = 0.5;
};
"focus-ring" = {
width = 2;
"active-color" = "#61afef";
"inactive-color" = "#444444";
};
border = {
off = true;
};
};
};
}
+131
View File
@@ -0,0 +1,131 @@
{ ... }:
{
programs.niri.settings = {
binds = {
# --- Workspace Navigation ---
"Ctrl+Mod+Right".action.focus-column-right = [];
"Ctrl+Mod+Left".action.focus-column-left = [];
"Ctrl+Mod+Down".action.focus-workspace-down = [];
"Ctrl+Mod+Up".action.focus-workspace-up = [];
"Ctrl+Mod+Shift+Right".action.move-column-right = [];
"Ctrl+Mod+Shift+Left".action.move-column-left = [];
"Ctrl+Mod+Shift+Down".action.move-window-to-workspace-down = [];
"Ctrl+Mod+Shift+Up".action.move-window-to-workspace-up = [];
# --- Interface ---
"Mod+Space".action.spawn = [ "noctalia" "msg" "panel-toggle" "launcher" ];
"Mod+P".action.spawn = [ "noctalia" "msg" "panel-toggle" "control-center" ];
"Mod+Tab".action.toggle-overview = [];
"Ctrl+Alt+Delete".action.spawn = [ "noctalia" "msg" "settings-toggle" ];
# --- Noctalia Plugins ---
"Mod+Shift+S".action.spawn = [ "noctalia" "msg" "plugin:screen-shot-and-record" "screenshot" ];
"Mod+Shift+Z".action.spawn = [ "noctalia" "msg" "plugin:screen-shot-and-record" "search" ];
"Mod+Shift+X".action.spawn = [ "noctalia" "msg" "plugin:screen-shot-and-record" "ocr" ];
"Mod+Shift+C".action.spawn = [ "noctalia" "msg" "panel-toggle" "music" ];
# --- Launchers ---
"Mod+Return".action.spawn = [ "ghostty" ];
"Mod+W".action.spawn = [ "zen-beta" ];
"Mod+E".action.spawn = [ "dolphin" ];
"Mod+Z".action.spawn = [ "code" ];
"Mod+Alt+V".action.spawn = [ "pavucontrol" ];
"Mod+Shift+V".action.spawn = [ "noctalia" "msg" "panel-toggle" "clipboard" ];
"Mod+Shift+L".action.spawn = [ "noctalia" "msg" "lock" ];
"Ctrl+Shift+Escape".action.spawn = [ "ghostty" "-e" "sudo" "btop" ];
# --- Window Management ---
"Mod+Q".action.close-window = [];
"Mod+Alt+Space".action.toggle-window-floating = [];
"Mod+F".action.fullscreen-window = [];
"Mod+D".action.maximize-column = [];
# --- Focus ---
"Mod+Left".action.focus-column-left = [];
"Mod+Right".action.focus-column-right = [];
"Mod+Up".action.focus-window-up = [];
"Mod+Down".action.focus-window-down = [];
# --- Move Windows ---
"Mod+Shift+Left".action.move-column-left = [];
"Mod+Shift+Right".action.move-column-right = [];
"Mod+Shift+Up".action.move-window-up = [];
"Mod+Shift+Down".action.move-window-down = [];
# --- Workspaces by Number ---
"Mod+1".action.focus-workspace = 1;
"Mod+2".action.focus-workspace = 2;
"Mod+3".action.focus-workspace = 3;
"Mod+4".action.focus-workspace = 4;
"Mod+5".action.focus-workspace = 5;
"Mod+6".action.focus-workspace = 6;
"Mod+7".action.focus-workspace = 7;
"Mod+8".action.focus-workspace = 8;
"Mod+9".action.focus-workspace = 9;
"Mod+0".action.focus-workspace = 10;
"Mod+Shift+1".action.move-window-to-workspace = 1;
"Mod+Shift+2".action.move-window-to-workspace = 2;
"Mod+Shift+3".action.move-window-to-workspace = 3;
"Mod+Shift+4".action.move-window-to-workspace = 4;
"Mod+Shift+5".action.move-window-to-workspace = 5;
"Mod+Shift+6".action.move-window-to-workspace = 6;
"Mod+Shift+7".action.move-window-to-workspace = 7;
"Mod+Shift+8".action.move-window-to-workspace = 8;
"Mod+Shift+9".action.move-window-to-workspace = 9;
"Mod+Shift+0".action.move-window-to-workspace = 10;
# --- Mouse Workspace Scroll ---
"Mod+WheelScrollDown" = {
"cooldown-ms" = 150;
action.focus-workspace-down = [];
};
"Mod+WheelScrollUp" = {
"cooldown-ms" = 150;
action.focus-workspace-up = [];
};
# --- Media & Hardware Keys ---
"Mod+Shift+N".action.spawn = [ "playerctl" "next" ];
"Mod+Shift+B".action.spawn = [ "playerctl" "previous" ];
"Mod+Shift+P".action.spawn = [ "playerctl" "play-pause" ];
"XF86AudioRaiseVolume" = {
"allow-when-locked" = true;
action.spawn = [ "noctalia" "msg" "volume-up" ];
};
"XF86AudioLowerVolume" = {
"allow-when-locked" = true;
action.spawn = [ "noctalia" "msg" "volume-down" ];
};
"XF86AudioMute" = {
"allow-when-locked" = true;
action.spawn = [ "noctalia" "msg" "volume-mute" ];
};
"XF86AudioMicMute" = {
"allow-when-locked" = true;
action.spawn = [ "wpctl" "set-mute" "@DEFAULT_SOURCE@" "toggle" ];
};
"XF86MonBrightnessUp".action.spawn = [ "noctalia" "msg" "brightness-up" ];
"XF86MonBrightnessDown".action.spawn = [ "noctalia" "msg" "brightness-down" ];
"XF86AudioNext" = {
"allow-when-locked" = true;
action.spawn = [ "playerctl" "next" ];
};
"XF86AudioPrev" = {
"allow-when-locked" = true;
action.spawn = [ "playerctl" "previous" ];
};
"XF86AudioPlay" = {
"allow-when-locked" = true;
action.spawn = [ "playerctl" "play-pause" ];
};
"XF86AudioPause" = {
"allow-when-locked" = true;
action.spawn = [ "playerctl" "play-pause" ];
};
};
};
}
+47
View File
@@ -0,0 +1,47 @@
{ ... }:
{
programs.niri.settings = {
window-rules = [
{
matches = [ { title = "Open File.*"; } ];
open-floating = true;
}
{
matches = [ { title = "Save As.*"; } ];
open-floating = true;
}
{
matches = [ { title = "File Upload.*"; } ];
open-floating = true;
}
{
matches = [ { "app-id" = "pavucontrol"; } ];
open-floating = true;
default-column-width = { fixed = 800; };
}
{
matches = [ { title = "(?i)picture.in.picture"; } ];
open-floating = true;
}
{
matches = [ { "app-id" = "steam"; } ];
open-floating = true;
}
{
matches = [ { "app-id" = "steam"; title = "Steam"; } ];
open-floating = false;
}
{
matches = [ { "app-id" = "steam"; title = "^notificationtoasts_.*"; } ];
open-floating = true;
open-focused = false;
default-floating-position = {
x = 20;
y = 20;
"relative-to" = "bottom-right";
};
}
];
};
}