feat: replace waybar/mako/anyrun/wlogout/swaylock with noctolia-shell, remove hyprland (#240)

This commit is contained in:
Ryan Yin
2026-01-03 23:36:54 +08:00
committed by GitHub
parent 847adc7d63
commit fb7a0cd178
74 changed files with 684 additions and 1721 deletions

View File

@@ -8,6 +8,7 @@ include "./keybindings.kdl"
include "./windowrules.kdl"
include "./spawn-at-startup.kdl"
include "./niri-hardware.kdl"
include "./noctalia-shell.kdl"
// Input device configuration.
// Find the full list of options on the wiki:
@@ -225,8 +226,3 @@ animations {
// Window rules let you adjust behavior for individual windows.
// Find more information on the wiki:
// https://yalter.github.io/niri/Configuration:-Window-Rules
layer-rule {
match namespace="waybar"
opacity 0.800000
}

View File

@@ -16,8 +16,14 @@ binds {
// Suggested binds for running programs: terminal, app launcher, screen locker.
Mod+Return { spawn "foot"; }
Mod+Shift+Return { spawn "alacritty"; }
Mod+D { spawn "anyrun"; }
CTRL+Alt+L { spawn "swaylock"; }
// Launcher
Mod+D { spawn "noctalia-shell" "ipc" "call" "launcher" "toggle"; }
Mod+Space { spawn "noctalia-shell" "ipc" "call" "launcher" "toggle"; }
XF86Search { spawn "noctalia-shell" "ipc" "call" "launcher" "toggle"; }
// Locker
CTRL+Alt+L { spawn "noctalia-shell" "ipc" "call" "lockScreen" "lock"; }
// 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`.
@@ -28,36 +34,44 @@ binds {
// 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.
// "-l 1.0" limits the volume to 100%.
XF86AudioRaiseVolume allow-when-locked=true { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.01+ --limit 1.0"; }
XF86AudioLowerVolume allow-when-locked=true { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.01-"; }
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"; }
// XF86AudioRaiseVolume allow-when-locked=true { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.01+ --limit 1.0"; }
// XF86AudioLowerVolume allow-when-locked=true { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.01-"; }
// 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"; }
XF86AudioRaiseVolume allow-when-locked=true { spawn "noctalia-shell" "ipc" "call" "volume" "increase"; }
XF86AudioLowerVolume allow-when-locked=true { spawn "noctalia-shell" "ipc" "call" "volume" "decrease"; }
XF86AudioMute allow-when-locked=true { spawn "noctalia-shell" "ipc" "call" "volume" "muteOutput"; }
XF86AudioMicMute allow-when-locked=true { spawn "noctalia-shell" "ipc" "call" "volume" "muteInput"; }
// Example media keys mapping using playerctl.
// This will work with any MPRIS-enabled media player.
XF86AudioPlay allow-when-locked=true { spawn-sh "playerctl play-pause"; }
XF86AudioStop allow-when-locked=true { spawn-sh "playerctl stop"; }
XF86AudioPrev allow-when-locked=true { spawn-sh "playerctl previous"; }
XF86AudioNext allow-when-locked=true { spawn-sh "playerctl next"; }
// XF86AudioPlay allow-when-locked=true { spawn-sh "playerctl play-pause"; }
// XF86AudioStop allow-when-locked=true { spawn-sh "playerctl stop"; }
// XF86AudioPrev allow-when-locked=true { spawn-sh "playerctl previous"; }
// XF86AudioNext allow-when-locked=true { spawn-sh "playerctl next"; }
XF86AudioPlay allow-when-locked=true { spawn-sh "noctalia-shell ipc call media playPause"; }
XF86AudioStop allow-when-locked=true { spawn-sh "noctalia-shell ipc call media pause"; }
XF86AudioPrev allow-when-locked=true { spawn-sh "octalia-shell ipc call media previous"; }
XF86AudioNext allow-when-locked=true { spawn-sh "noctalia-shell ipc call media next"; }
// 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" "1%+"; }
XF86MonBrightnessDown allow-when-locked=true { spawn "brightnessctl" "--class=backlight" "set" "1%-"; }
// XF86MonBrightnessUp allow-when-locked=true { spawn "brightnessctl" "--class=backlight" "set" "1%+"; }
// XF86MonBrightnessDown allow-when-locked=true { spawn "brightnessctl" "--class=backlight" "set" "1%-"; }
XF86MonBrightnessUp allow-when-locked=true { spawn "noctalia-shell" "ipc" "call" "brightness" "increase"; }
XF86MonBrightnessDown allow-when-locked=true { spawn "noctalia-shell" "ipc" "call" "brightness" "decrease"; }
// keyboard backlight
XF86KbdBrightnessUp allow-when-locked=true { spawn "brightnessctl" "--device=kbd_backlight" "set" "10%+"; }
XF86KbdBrightnessDown allow-when-locked=true { spawn "brightnessctl" "--device=kbd_backlight" "set" "10%-"; }
// for apple-silicon touchbar
XF86Search { spawn "anyrun"; }
// Open/close the Overview: a zoomed-out view of workspaces and windows.
// You can also move the mouse into the top-left hot corner,
// or do a four-finger swipe up on a touchpad.
// Mod+O repeat=false { toggle-overview; }
Mod+Q repeat=false { close-window; }
Mod+Left { focus-column-left; }
Mod+Down { focus-window-down; }
Mod+Up { focus-window-up; }
@@ -184,8 +198,6 @@ binds {
// Makes the column "fill the rest of the space".
Mod+Ctrl+F { expand-column-to-available-width; }
Mod+C { center-column; }
// Center all fully visible columns on screen.
Mod+Ctrl+C { center-visible-columns; }
@@ -206,7 +218,6 @@ binds {
// Move the focused window between the floating and the tiling layout.
Mod+V { toggle-window-floating; }
Mod+Shift+V { switch-focus-between-floating-and-tiling; }
// Toggle tabbed column display mode.
// Windows in this column will appear as vertical tabs,
@@ -235,11 +246,18 @@ binds {
// which ensures niri always processes them, even when an inhibitor is active.
Mod+Escape allow-inhibiting=false { toggle-keyboard-shortcuts-inhibit; }
Mod+Shift+E { spawn "wlogout"; }
// The quit action will show a confirmation dialog to avoid accidental exits.
Ctrl+Alt+Delete { quit; }
Mod+Q repeat=false { close-window; }
// Powers off the monitors. To turn them back on, do any input like
// moving the mouse or pressing any other key.
Mod+Shift+P { power-off-monitors; }
// Utility shortcuts
Mod+Shift+V { spawn "noctalia-shell" "ipc" "call" "launcher" "clipboard"; }
Mod+C { spawn "noctalia-shell" "ipc" "call" "launcher" "calculator"; }
Mod+S { spawn "noctalia-shell" "ipc" "call" "controlCenter" "toggle"; }
Mod+E { spawn "noctalia-shell" "ipc" "call" "sessionMenu" "toggle"; }
}

View File

@@ -0,0 +1,20 @@
// https://docs.noctalia.dev/getting-started/compositor-settings/niri/
window-rule {
// Rounded corners for a modern look.
geometry-corner-radius 20
// Clips window contents to the rounded corner boundaries.
clip-to-geometry true
}
debug {
// Allows notification actions and window activation from Noctalia.
honor-xdg-activation-with-invalid-serial
}
// Set the overview wallpaper on the backdrop.
layer-rule {
match namespace="^noctalia-overview*"
place-within-backdrop true
}

View File

@@ -3,12 +3,6 @@
// which may be more convenient to use.
// See the binds section below for more spawn examples.
// This line starts waybar, a commonly used bar for Wayland compositors.
// spawn-at-startup "waybar"
// To run a shell command (with variables, pipes, etc.), use spawn-sh-at-startup:
// spawn-sh-at-startup "qs -c ~/source/qs/MyAwesomeShell"
// Terminal applications
spawn-at-startup "foot"
spawn-at-startup "alacritty"

View File

@@ -28,6 +28,7 @@ in
{
"niri/config.kdl".source = mkSymlink "${confPath}/config.kdl";
"niri/keybindings.kdl".source = mkSymlink "${confPath}/keybindings.kdl";
"niri/noctalia-shell.kdl".source = mkSymlink "${confPath}/noctalia-shell.kdl";
"niri/spawn-at-startup.kdl".source = mkSymlink "${confPath}/spawn-at-startup.kdl";
"niri/windowrules.kdl".source = mkSymlink "${confPath}/windowrules.kdl";
};