updates niri config

This commit is contained in:
Dennis Schoepf 2026-03-04 20:46:15 +01:00
parent f5111eeadf
commit 4ae45b7dde
2 changed files with 52 additions and 44 deletions

View file

@ -64,14 +64,6 @@
{
services.polkit-gnome.enable = true;
services.mpris-proxy.enable = true;
services.udiskie = {
enable = true;
settings = {
program_options = {
file_manager = "${pkgs.nautilus}/bin/nautilus";
};
};
};
xdg.desktopEntries = {
screenshot = {
@ -180,7 +172,7 @@
};
xdg.configFile."niri" = {
source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/dev/nix-config/modules/wm/niri/config";
source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/dev/nix-config/modules/scrolling-desktop/niri";
};
};
}

View file

@ -4,7 +4,11 @@
// https://yalter.github.io/niri/Configuration:-Introduction
environment {
QT_QPA_PLATFORMTHEME "qt6ct"
XDG_CURRENT_DESKTOP "niri"
QT_QPA_PLATFORM "wayland"
ELECTRON_OZONE_PLATFORM_HINT "auto"
QT_QPA_PLATFORMTHEME "gtk3"
QT_QPA_PLATFORMTHEME_QT6 "gtk3"
}
// Input device configuration.
@ -71,7 +75,8 @@ cursor {
}
layout {
gaps 8
gaps 5
background-color "transparent"
// When to center a column when changing focus, options are:
// - "never", default behavior, focusing an off-screen column will keep at the left
@ -180,12 +185,17 @@ layout {
}
}
// STARTUP
spawn-at-startup "waybar"
spawn-at-startup "swaync"
spawn-at-startup "swww-daemon"
spawn-sh-at-startup "~/.config/awww/bin/random-bg.sh ~/Pictures/Wallpapers/safe/dark"
layer-rule {
match namespace="^quickshell$"
place-within-backdrop true
}
layer-rule {
match namespace="dms:blurwallpaper"
place-within-backdrop true
}
// STARTUP
hotkey-overlay {
// Uncomment this line to disable the "Important Hotkeys" pop-up at startup.
skip-at-startup
@ -269,11 +279,6 @@ window-rule {
clip-to-geometry true
}
debug {
// Allows notification actions and window activation from Noctalia.
honor-xdg-activation-with-invalid-serial
}
binds {
// Keys consist of modifiers separated by + signs, followed by an XKB key name
// in the end. To find an XKB name for a particular key, you may use a program
@ -289,33 +294,44 @@ binds {
// shows a list of important hotkeys.
Mod+Shift+Slash { show-hotkey-overlay; }
// Suggested binds for running programs: terminal, app launcher, screen locker.
Mod+Return hotkey-overlay-title="Open a terminal" { spawn "ghostty"; }
Mod+Space hotkey-overlay-title="Launcher" { spawn-sh "noctalia-shell ipc call launcher toggle"; }
Mod+B hotkey-overlay-title="Browser" { spawn "zen-beta"; }
Mod+M hotkey-overlay-title="System Monitor" { spawn-sh "noctalia-shell ipc call systemMonitor toggle"; }
Mod+B hotkey-overlay-title="Browser" { spawn "helium"; }
Mod+N hotkey-overlay-title="File Manager" { spawn "nautilus"; }
Mod+Shift+V hotkey-overlay-title="Clipboard" { spawn-sh "noctalia-shell ipc call launcher clipboard"; }
Mod+Shift+M hotkey-overlay-title="Emoji" { spawn-sh "noctalia-shell ipc call launcher emoji"; }
Mod+Alt+L hotkey-overlay-title="Open session menu" { spawn-sh "noctalia-shell ipc call sessionMenu toggle"; }
Mod+Comma hotkey-overlay-title="Open system settings" { spawn-sh "noctalia-shell ipc call settings toggle"; }
Mod+Return hotkey-overlay-title="Open a terminal" { spawn "ghostty"; }
Mod+Space hotkey-overlay-title="Application Launcher" {
spawn "dms" "ipc" "call" "spotlight" "toggle";
}
Mod+V hotkey-overlay-title="Clipboard Manager" {
spawn "dms" "ipc" "call" "clipboard" "toggle";
}
Mod+M hotkey-overlay-title="Task Manager" {
spawn "dms" "ipc" "call" "processlist" "focusOrToggle";
}
Mod+Comma hotkey-overlay-title="Settings" {
spawn "dms" "ipc" "call" "settings" "focusOrToggle";
}
Mod+N hotkey-overlay-title="Notification Center" {
spawn "dms" "ipc" "call" "notifications" "toggle";
}
Mod+Y hotkey-overlay-title="Browse Wallpapers" {
spawn "dms" "ipc" "call" "dankdash" "wallpaper";
}
// Use spawn-sh to run a shell command. Do this if you need pipes, multiple commands, etc.
// Note: the entire command goes as a single argument. It's passed verbatim to `sh -c`.
// For example, this is a standard bind to toggle the screen reader (orca).
// Super+Alt+S allow-when-locked=true hotkey-overlay-title=null { spawn-sh "pkill orca || exec orca"; }
// Security
Mod+Alt+L hotkey-overlay-title="Lock Screen" {
spawn "dms" "ipc" "call" "lock" "lock";
}
// Example volume keys mappings for PipeWire & WirePlumber.
// The allow-when-locked=true property makes them work even when the session is locked.
// Using spawn-sh allows to pass multiple arguments together with the command.
XF86AudioRaiseVolume allow-when-locked=true { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.1+"; }
XF86AudioLowerVolume allow-when-locked=true { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.1-"; }
XF86AudioMute allow-when-locked=true { spawn-sh "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"; }
XF86AudioMicMute allow-when-locked=true { spawn-sh "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"; }
// Audio Controls
XF86AudioRaiseVolume allow-when-locked=true {
spawn "dms" "ipc" "call" "audio" "increment" "3";
}
XF86AudioLowerVolume allow-when-locked=true {
spawn "dms" "ipc" "call" "audio" "decrement" "3";
}
XF86AudioMute allow-when-locked=true {
spawn "dms" "ipc" "call" "audio" "mute";
}
// Example brightness key mappings for brightnessctl.
// You can use regular spawn with multiple arguments too (to avoid going through "sh"),
// but you need to manually put each argument in separate "" quotes.
XF86MonBrightnessUp allow-when-locked=true { spawn "brightnessctl" "--class=backlight" "set" "+10%"; }
XF86MonBrightnessDown allow-when-locked=true { spawn "brightnessctl" "--class=backlight" "set" "10%-"; }