dotfiles/modules/niri/settings.nix

151 lines
3.2 KiB
Nix
Raw Normal View History

2025-09-09 23:49:00 +02:00
{ lib
, pkgs
, inputs
, ...
2025-09-09 18:03:42 +02:00
}:
let
makeCommand = command: {
command = [ command ];
};
qs = "${pkgs.quickshell}/bin/qs";
wl-paste = "${pkgs.wl-clipboard}/bin/wl-paste";
2025-09-09 22:06:57 +02:00
wallpapers = inputs.self.packages.${pkgs.system}.wallpapers;
2025-09-09 21:20:12 +02:00
2025-09-09 18:03:42 +02:00
in
{
programs.niri.settings = {
2025-09-09 23:43:59 +02:00
cursor = {
theme = "Hello-Kitty"; # Set the cursor theme
size = 48; # Set the cursor size in logical pixels
hide-after-inactive-ms = 1000; # Hide cursor after 1 second of inactivity
hide-when-typing = true; # Hide cursor when typing
};
2025-09-09 18:03:42 +02:00
environment = {
CLUTTER_BACKEND = "wayland";
DISPLAY = ":0";
GDK_BACKEND = "wayland,x11";
MOZ_ENABLE_WAYLAND = "1";
NIXOS_OZONE_WL = "1";
QT_QPA_PLATFORM = "wayland;xcb";
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
SDL_VIDEODRIVER = "wayland";
};
2025-09-09 22:06:57 +02:00
2025-09-09 18:03:42 +02:00
spawn-at-startup = [
(makeCommand "${lib.getExe pkgs.hyprlock}")
2025-09-09 22:06:57 +02:00
{
command = [
"${lib.getExe pkgs.mpvpaper}"
"-vs"
"-o"
"'no-audio loop' ALL ${wallpapers}/share/wallpapers/*.mp4"
];
}
2025-09-09 18:03:42 +02:00
{
command = [
"${wl-paste}"
"--watch"
"cliphist"
"store"
];
}
{
command = [
"${wl-paste}"
"--type text"
"--watch"
"cliphist"
"store"
];
}
{
command = [
"${qs}"
"-c"
"DankMaterialShell"
];
}
];
input = {
touchpad = {
click-method = "button-areas";
dwt = true;
dwtp = true;
natural-scroll = true;
scroll-method = "two-finger";
tap = true;
tap-button-map = "left-right-middle";
middle-emulation = true;
accel-profile = "adaptive";
};
focus-follows-mouse = {
enable = true;
max-scroll-amount = "90%";
};
warp-mouse-to-focus.enable = true;
workspace-auto-back-and-forth = true;
};
2025-09-09 22:06:57 +02:00
2025-09-09 18:03:42 +02:00
outputs = {
"eDP-1" = {
scale = 1.0;
position = {
x = 0;
y = 0;
};
};
};
2025-09-09 22:06:57 +02:00
2025-09-09 18:03:42 +02:00
overview = {
workspace-shadow.enable = false;
backdrop-color = "transparent";
};
gestures = {
hot-corners.enable = true;
};
layout = {
focus-ring.enable = false;
border = {
enable = true;
width = 2;
2025-09-09 18:38:16 +02:00
active.color = "#ff69b4";
inactive.color = "#7d0d2d";
2025-09-09 18:03:42 +02:00
};
shadow = {
2025-09-09 18:38:16 +02:00
enable = true;
2025-09-09 18:03:42 +02:00
};
preset-column-widths = [
{ proportion = 0.25; }
{ proportion = 0.5; }
{ proportion = 0.75; }
{ proportion = 1.0; }
];
default-column-width = {
proportion = 0.5;
};
2025-09-09 22:06:57 +02:00
2025-09-09 18:03:42 +02:00
gaps = 6;
struts = {
left = 0;
right = 0;
top = 0;
bottom = 0;
};
2025-09-09 22:06:57 +02:00
2025-09-09 18:03:42 +02:00
tab-indicator = {
hide-when-single-tab = true;
place-within-column = true;
position = "left";
corner-radius = 20.0;
gap = -12.0;
gaps-between-tabs = 10.0;
width = 4.0;
length.total-proportion = 0.1;
};
};
2025-09-09 22:06:57 +02:00
2025-09-09 18:03:42 +02:00
prefer-no-csd = true;
hotkey-overlay.skip-at-startup = true;
};
}