diff --git a/.githooks/pre-commit b/.githooks/pre-commit index 99083bcc..7e96a024 100755 --- a/.githooks/pre-commit +++ b/.githooks/pre-commit @@ -37,7 +37,10 @@ if [[ -n "$STAGED_CORE_FILES" ]]; then # Tests echo " Running tests..." - go test ./... >/dev/null + if ! go test ./... >/dev/null 2>&1; then + echo "Tests failed! Run 'go test ./...' for details." + exit 1 + fi # Build checks echo " Building..." diff --git a/core/internal/config/deployer.go b/core/internal/config/deployer.go index bd0f6913..a8f3b90b 100644 --- a/core/internal/config/deployer.go +++ b/core/internal/config/deployer.go @@ -110,7 +110,6 @@ func (cd *ConfigDeployer) DeployConfigurationsSelectiveWithReinstalls(ctx contex return results, nil } -// deployNiriConfig handles Niri configuration deployment with backup and merging func (cd *ConfigDeployer) deployNiriConfig(terminal deps.Terminal) (DeploymentResult, error) { result := DeploymentResult{ ConfigType: "Niri", @@ -123,6 +122,12 @@ func (cd *ConfigDeployer) deployNiriConfig(terminal deps.Terminal) (DeploymentRe return result, result.Error } + dmsDir := filepath.Join(configDir, "dms") + if err := os.MkdirAll(dmsDir, 0755); err != nil { + result.Error = fmt.Errorf("failed to create dms directory: %w", err) + return result, result.Error + } + var existingConfig string if _, err := os.Stat(result.Path); err == nil { cd.log("Found existing Niri configuration") @@ -143,14 +148,12 @@ func (cd *ConfigDeployer) deployNiriConfig(terminal deps.Terminal) (DeploymentRe cd.log(fmt.Sprintf("Backed up existing config to %s", result.BackupPath)) } - // Detect polkit agent path polkitPath, err := cd.detectPolkitAgent() if err != nil { cd.log(fmt.Sprintf("Warning: Could not detect polkit agent: %v", err)) - polkitPath = "/usr/lib/mate-polkit/polkit-mate-authentication-agent-1" // fallback + polkitPath = "/usr/lib/mate-polkit/polkit-mate-authentication-agent-1" } - // Determine terminal command based on choice var terminalCommand string switch terminal { case deps.TerminalGhostty: @@ -160,13 +163,12 @@ func (cd *ConfigDeployer) deployNiriConfig(terminal deps.Terminal) (DeploymentRe case deps.TerminalAlacritty: terminalCommand = "alacritty" default: - terminalCommand = "ghostty" // fallback to ghostty + terminalCommand = "ghostty" } newConfig := strings.ReplaceAll(NiriConfig, "{{POLKIT_AGENT_PATH}}", polkitPath) newConfig = strings.ReplaceAll(newConfig, "{{TERMINAL_COMMAND}}", terminalCommand) - // If there was an existing config, merge the output sections if existingConfig != "" { mergedConfig, err := cd.mergeNiriOutputSections(newConfig, existingConfig) if err != nil { @@ -182,11 +184,38 @@ func (cd *ConfigDeployer) deployNiriConfig(terminal deps.Terminal) (DeploymentRe return result, result.Error } + if err := cd.deployNiriDmsConfigs(dmsDir, terminalCommand); err != nil { + result.Error = fmt.Errorf("failed to deploy dms configs: %w", err) + return result, result.Error + } + result.Deployed = true cd.log("Successfully deployed Niri configuration") return result, nil } +func (cd *ConfigDeployer) deployNiriDmsConfigs(dmsDir, terminalCommand string) error { + configs := []struct { + name string + content string + }{ + {"colors.kdl", NiriColorsConfig}, + {"layout.kdl", NiriLayoutConfig}, + {"alttab.kdl", NiriAlttabConfig}, + {"binds.kdl", strings.ReplaceAll(NiriBindsConfig, "{{TERMINAL_COMMAND}}", terminalCommand)}, + } + + for _, cfg := range configs { + path := filepath.Join(dmsDir, cfg.name) + if err := os.WriteFile(path, []byte(cfg.content), 0644); err != nil { + return fmt.Errorf("failed to write %s: %w", cfg.name, err) + } + cd.log(fmt.Sprintf("Deployed %s", cfg.name)) + } + + return nil +} + func (cd *ConfigDeployer) deployGhosttyConfig() ([]DeploymentResult, error) { var results []DeploymentResult diff --git a/core/internal/config/deployer_test.go b/core/internal/config/deployer_test.go index cfb32ad3..36f4bec5 100644 --- a/core/internal/config/deployer_test.go +++ b/core/internal/config/deployer_test.go @@ -479,9 +479,10 @@ general { func TestNiriConfigStructure(t *testing.T) { assert.Contains(t, NiriConfig, "input {") assert.Contains(t, NiriConfig, "layout {") - assert.Contains(t, NiriConfig, "binds {") assert.Contains(t, NiriConfig, "{{POLKIT_AGENT_PATH}}") - assert.Contains(t, NiriConfig, `spawn "{{TERMINAL_COMMAND}}"`) + + assert.Contains(t, NiriBindsConfig, "binds {") + assert.Contains(t, NiriBindsConfig, `spawn "{{TERMINAL_COMMAND}}"`) } func TestHyprlandConfigStructure(t *testing.T) { diff --git a/core/internal/config/embedded/niri-alttab.kdl b/core/internal/config/embedded/niri-alttab.kdl new file mode 100644 index 00000000..91d83378 --- /dev/null +++ b/core/internal/config/embedded/niri-alttab.kdl @@ -0,0 +1,5 @@ +recent-windows { + highlight { + corner-radius 12 + } +} diff --git a/core/internal/config/embedded/niri-binds.kdl b/core/internal/config/embedded/niri-binds.kdl new file mode 100644 index 00000000..e88952ec --- /dev/null +++ b/core/internal/config/embedded/niri-binds.kdl @@ -0,0 +1,195 @@ +binds { + // === System & Overview === + Mod+D repeat=false { toggle-overview; } + Mod+Tab repeat=false { toggle-overview; } + Mod+Shift+Slash { show-hotkey-overlay; } + + // === Application Launchers === + Mod+T hotkey-overlay-title="Open Terminal" { spawn "{{TERMINAL_COMMAND}}"; } + 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+Y hotkey-overlay-title="Browse Wallpapers" { + spawn "dms" "ipc" "call" "dankdash" "wallpaper"; + } + Mod+N hotkey-overlay-title="Notification Center" { spawn "dms" "ipc" "call" "notifications" "toggle"; } + Mod+Shift+N hotkey-overlay-title="Notepad" { spawn "dms" "ipc" "call" "notepad" "toggle"; } + + // === Security === + Mod+Alt+L hotkey-overlay-title="Lock Screen" { + spawn "dms" "ipc" "call" "lock" "lock"; + } + Mod+Shift+E { quit; } + Ctrl+Alt+Delete hotkey-overlay-title="Task Manager" { + spawn "dms" "ipc" "call" "processlist" "focusOrToggle"; + } + + // === 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"; + } + XF86AudioMicMute allow-when-locked=true { + spawn "dms" "ipc" "call" "audio" "micmute"; + } + + // === Brightness Controls === + XF86MonBrightnessUp allow-when-locked=true { + spawn "dms" "ipc" "call" "brightness" "increment" "5" ""; + } + XF86MonBrightnessDown allow-when-locked=true { + spawn "dms" "ipc" "call" "brightness" "decrement" "5" ""; + } + + // === Window Management === + Mod+Q repeat=false { close-window; } + Mod+F { maximize-column; } + Mod+Shift+F { fullscreen-window; } + Mod+Shift+T { toggle-window-floating; } + Mod+Shift+V { switch-focus-between-floating-and-tiling; } + Mod+W { toggle-column-tabbed-display; } + + // === Focus Navigation === + Mod+Left { focus-column-left; } + Mod+Down { focus-window-down; } + Mod+Up { focus-window-up; } + Mod+Right { focus-column-right; } + Mod+H { focus-column-left; } + Mod+J { focus-window-down; } + Mod+K { focus-window-up; } + Mod+L { focus-column-right; } + + // === Window Movement === + Mod+Shift+Left { move-column-left; } + Mod+Shift+Down { move-window-down; } + Mod+Shift+Up { move-window-up; } + Mod+Shift+Right { move-column-right; } + Mod+Shift+H { move-column-left; } + Mod+Shift+J { move-window-down; } + Mod+Shift+K { move-window-up; } + Mod+Shift+L { move-column-right; } + + // === Column Navigation === + Mod+Home { focus-column-first; } + Mod+End { focus-column-last; } + Mod+Ctrl+Home { move-column-to-first; } + Mod+Ctrl+End { move-column-to-last; } + + // === Monitor Navigation === + Mod+Ctrl+Left { focus-monitor-left; } + //Mod+Ctrl+Down { focus-monitor-down; } + //Mod+Ctrl+Up { focus-monitor-up; } + Mod+Ctrl+Right { focus-monitor-right; } + Mod+Ctrl+H { focus-monitor-left; } + Mod+Ctrl+J { focus-monitor-down; } + Mod+Ctrl+K { focus-monitor-up; } + Mod+Ctrl+L { focus-monitor-right; } + + // === Move to Monitor === + Mod+Shift+Ctrl+Left { move-column-to-monitor-left; } + Mod+Shift+Ctrl+Down { move-column-to-monitor-down; } + Mod+Shift+Ctrl+Up { move-column-to-monitor-up; } + Mod+Shift+Ctrl+Right { move-column-to-monitor-right; } + Mod+Shift+Ctrl+H { move-column-to-monitor-left; } + Mod+Shift+Ctrl+J { move-column-to-monitor-down; } + Mod+Shift+Ctrl+K { move-column-to-monitor-up; } + Mod+Shift+Ctrl+L { move-column-to-monitor-right; } + + // === Workspace Navigation === + Mod+Page_Down { focus-workspace-down; } + Mod+Page_Up { focus-workspace-up; } + Mod+U { focus-workspace-down; } + Mod+I { focus-workspace-up; } + Mod+Ctrl+Down { move-column-to-workspace-down; } + Mod+Ctrl+Up { move-column-to-workspace-up; } + Mod+Ctrl+U { move-column-to-workspace-down; } + Mod+Ctrl+I { move-column-to-workspace-up; } + + // === Move Workspaces === + Mod+Shift+Page_Down { move-workspace-down; } + Mod+Shift+Page_Up { move-workspace-up; } + Mod+Shift+U { move-workspace-down; } + Mod+Shift+I { move-workspace-up; } + + // === Mouse Wheel Navigation === + Mod+WheelScrollDown cooldown-ms=150 { focus-workspace-down; } + Mod+WheelScrollUp cooldown-ms=150 { focus-workspace-up; } + Mod+Ctrl+WheelScrollDown cooldown-ms=150 { move-column-to-workspace-down; } + Mod+Ctrl+WheelScrollUp cooldown-ms=150 { move-column-to-workspace-up; } + + Mod+WheelScrollRight { focus-column-right; } + Mod+WheelScrollLeft { focus-column-left; } + Mod+Ctrl+WheelScrollRight { move-column-right; } + Mod+Ctrl+WheelScrollLeft { move-column-left; } + + Mod+Shift+WheelScrollDown { focus-column-right; } + Mod+Shift+WheelScrollUp { focus-column-left; } + Mod+Ctrl+Shift+WheelScrollDown { move-column-right; } + Mod+Ctrl+Shift+WheelScrollUp { move-column-left; } + + // === Numbered Workspaces === + Mod+1 { focus-workspace 1; } + Mod+2 { focus-workspace 2; } + Mod+3 { focus-workspace 3; } + Mod+4 { focus-workspace 4; } + Mod+5 { focus-workspace 5; } + Mod+6 { focus-workspace 6; } + Mod+7 { focus-workspace 7; } + Mod+8 { focus-workspace 8; } + Mod+9 { focus-workspace 9; } + + // === Move to Numbered Workspaces === + Mod+Shift+1 { move-column-to-workspace 1; } + Mod+Shift+2 { move-column-to-workspace 2; } + Mod+Shift+3 { move-column-to-workspace 3; } + Mod+Shift+4 { move-column-to-workspace 4; } + Mod+Shift+5 { move-column-to-workspace 5; } + Mod+Shift+6 { move-column-to-workspace 6; } + Mod+Shift+7 { move-column-to-workspace 7; } + Mod+Shift+8 { move-column-to-workspace 8; } + Mod+Shift+9 { move-column-to-workspace 9; } + + // === Column Management === + Mod+BracketLeft { consume-or-expel-window-left; } + Mod+BracketRight { consume-or-expel-window-right; } + Mod+Period { expel-window-from-column; } + + // === Sizing & Layout === + Mod+R { switch-preset-column-width; } + Mod+Shift+R { switch-preset-window-height; } + Mod+Ctrl+R { reset-window-height; } + Mod+Ctrl+F { expand-column-to-available-width; } + Mod+C { center-column; } + Mod+Ctrl+C { center-visible-columns; } + + // === Manual Sizing === + Mod+Minus { set-column-width "-10%"; } + Mod+Equal { set-column-width "+10%"; } + Mod+Shift+Minus { set-window-height "-10%"; } + Mod+Shift+Equal { set-window-height "+10%"; } + + // === Screenshots === + XF86Launch1 { screenshot; } + Ctrl+XF86Launch1 { screenshot-screen; } + Alt+XF86Launch1 { screenshot-window; } + Print { screenshot; } + Ctrl+Print { screenshot-screen; } + Alt+Print { screenshot-window; } + // === System Controls === + Mod+Escape allow-inhibiting=false { toggle-keyboard-shortcuts-inhibit; } + Mod+Shift+P { power-off-monitors; } +} \ No newline at end of file diff --git a/core/internal/config/embedded/niri-colors.kdl b/core/internal/config/embedded/niri-colors.kdl new file mode 100644 index 00000000..2c7ae328 --- /dev/null +++ b/core/internal/config/embedded/niri-colors.kdl @@ -0,0 +1,36 @@ +layout { + background-color "transparent" + + focus-ring { + active-color "#9dcbfb" + inactive-color "#8c9199" + urgent-color "#ffb4ab" + } + + border { + active-color "#9dcbfb" + inactive-color "#8c9199" + urgent-color "#ffb4ab" + } + + shadow { + color "#00000070" + } + + tab-indicator { + active-color "#9dcbfb" + inactive-color "#8c9199" + urgent-color "#ffb4ab" + } + + insert-hint { + color "#9dcbfb80" + } +} + +recent-windows { + highlight { + active-color "#124a73" + urgent-color "#ffb4ab" + } +} \ No newline at end of file diff --git a/core/internal/config/embedded/niri-layout.kdl b/core/internal/config/embedded/niri-layout.kdl new file mode 100644 index 00000000..36c08f3e --- /dev/null +++ b/core/internal/config/embedded/niri-layout.kdl @@ -0,0 +1,17 @@ +layout { + gaps 4 + + border { + width 2 + } + + focus-ring { + width 2 + } +} +window-rule { + geometry-corner-radius 12 + clip-to-geometry true + tiled-state true + draw-border-with-background false +} diff --git a/core/internal/config/embedded/niri.kdl b/core/internal/config/embedded/niri.kdl index 133ca52e..0cc6e786 100644 --- a/core/internal/config/embedded/niri.kdl +++ b/core/internal/config/embedded/niri.kdl @@ -214,210 +214,27 @@ window-rule { match app-id="zoom" open-floating true } -window-rule { - geometry-corner-radius 12 - clip-to-geometry true -} // Open dms windows as floating by default window-rule { match app-id=r#"org.quickshell$"# open-floating true } -binds { - // === System & Overview === - Mod+D { spawn "niri" "msg" "action" "toggle-overview"; } - Mod+Tab repeat=false { toggle-overview; } - Mod+Shift+Slash { show-hotkey-overlay; } - - // === Application Launchers === - Mod+T hotkey-overlay-title="Open Terminal" { spawn "{{TERMINAL_COMMAND}}"; } - 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+Y hotkey-overlay-title="Browse Wallpapers" { - spawn "dms" "ipc" "call" "dankdash" "wallpaper"; - } - Mod+N hotkey-overlay-title="Notification Center" { spawn "dms" "ipc" "call" "notifications" "toggle"; } - Mod+Shift+N hotkey-overlay-title="Notepad" { spawn "dms" "ipc" "call" "notepad" "toggle"; } - - // === Security === - Mod+Alt+L hotkey-overlay-title="Lock Screen" { - spawn "dms" "ipc" "call" "lock" "lock"; - } - Mod+Shift+E { quit; } - Ctrl+Alt+Delete hotkey-overlay-title="Task Manager" { - spawn "dms" "ipc" "call" "processlist" "focusOrToggle"; - } - - // === 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"; - } - XF86AudioMicMute allow-when-locked=true { - spawn "dms" "ipc" "call" "audio" "micmute"; - } - - // === Brightness Controls === - XF86MonBrightnessUp allow-when-locked=true { - spawn "dms" "ipc" "call" "brightness" "increment" "5" ""; - } - XF86MonBrightnessDown allow-when-locked=true { - spawn "dms" "ipc" "call" "brightness" "decrement" "5" ""; - } - - // === Window Management === - Mod+Q repeat=false { close-window; } - Mod+F { maximize-column; } - Mod+Shift+F { fullscreen-window; } - Mod+Shift+T { toggle-window-floating; } - Mod+Shift+V { switch-focus-between-floating-and-tiling; } - Mod+W { toggle-column-tabbed-display; } - - // === Focus Navigation === - Mod+Left { focus-column-left; } - Mod+Down { focus-window-down; } - Mod+Up { focus-window-up; } - Mod+Right { focus-column-right; } - Mod+H { focus-column-left; } - Mod+J { focus-window-down; } - Mod+K { focus-window-up; } - Mod+L { focus-column-right; } - - // === Window Movement === - Mod+Shift+Left { move-column-left; } - Mod+Shift+Down { move-window-down; } - Mod+Shift+Up { move-window-up; } - Mod+Shift+Right { move-column-right; } - Mod+Shift+H { move-column-left; } - Mod+Shift+J { move-window-down; } - Mod+Shift+K { move-window-up; } - Mod+Shift+L { move-column-right; } - - // === Column Navigation === - Mod+Home { focus-column-first; } - Mod+End { focus-column-last; } - Mod+Ctrl+Home { move-column-to-first; } - Mod+Ctrl+End { move-column-to-last; } - - // === Monitor Navigation === - Mod+Ctrl+Left { focus-monitor-left; } - //Mod+Ctrl+Down { focus-monitor-down; } - //Mod+Ctrl+Up { focus-monitor-up; } - Mod+Ctrl+Right { focus-monitor-right; } - Mod+Ctrl+H { focus-monitor-left; } - Mod+Ctrl+J { focus-monitor-down; } - Mod+Ctrl+K { focus-monitor-up; } - Mod+Ctrl+L { focus-monitor-right; } - - // === Move to Monitor === - Mod+Shift+Ctrl+Left { move-column-to-monitor-left; } - Mod+Shift+Ctrl+Down { move-column-to-monitor-down; } - Mod+Shift+Ctrl+Up { move-column-to-monitor-up; } - Mod+Shift+Ctrl+Right { move-column-to-monitor-right; } - Mod+Shift+Ctrl+H { move-column-to-monitor-left; } - Mod+Shift+Ctrl+J { move-column-to-monitor-down; } - Mod+Shift+Ctrl+K { move-column-to-monitor-up; } - Mod+Shift+Ctrl+L { move-column-to-monitor-right; } - - // === Workspace Navigation === - Mod+Page_Down { focus-workspace-down; } - Mod+Page_Up { focus-workspace-up; } - Mod+U { focus-workspace-down; } - Mod+I { focus-workspace-up; } - Mod+Ctrl+Down { move-column-to-workspace-down; } - Mod+Ctrl+Up { move-column-to-workspace-up; } - Mod+Ctrl+U { move-column-to-workspace-down; } - Mod+Ctrl+I { move-column-to-workspace-up; } - - // === Move Workspaces === - Mod+Shift+Page_Down { move-workspace-down; } - Mod+Shift+Page_Up { move-workspace-up; } - Mod+Shift+U { move-workspace-down; } - Mod+Shift+I { move-workspace-up; } - - // === Mouse Wheel Navigation === - Mod+WheelScrollDown cooldown-ms=150 { focus-workspace-down; } - Mod+WheelScrollUp cooldown-ms=150 { focus-workspace-up; } - Mod+Ctrl+WheelScrollDown cooldown-ms=150 { move-column-to-workspace-down; } - Mod+Ctrl+WheelScrollUp cooldown-ms=150 { move-column-to-workspace-up; } - - Mod+WheelScrollRight { focus-column-right; } - Mod+WheelScrollLeft { focus-column-left; } - Mod+Ctrl+WheelScrollRight { move-column-right; } - Mod+Ctrl+WheelScrollLeft { move-column-left; } - - Mod+Shift+WheelScrollDown { focus-column-right; } - Mod+Shift+WheelScrollUp { focus-column-left; } - Mod+Ctrl+Shift+WheelScrollDown { move-column-right; } - Mod+Ctrl+Shift+WheelScrollUp { move-column-left; } - - // === Numbered Workspaces === - Mod+1 { focus-workspace 1; } - Mod+2 { focus-workspace 2; } - Mod+3 { focus-workspace 3; } - Mod+4 { focus-workspace 4; } - Mod+5 { focus-workspace 5; } - Mod+6 { focus-workspace 6; } - Mod+7 { focus-workspace 7; } - Mod+8 { focus-workspace 8; } - Mod+9 { focus-workspace 9; } - - // === Move to Numbered Workspaces === - Mod+Shift+1 { move-column-to-workspace 1; } - Mod+Shift+2 { move-column-to-workspace 2; } - Mod+Shift+3 { move-column-to-workspace 3; } - Mod+Shift+4 { move-column-to-workspace 4; } - Mod+Shift+5 { move-column-to-workspace 5; } - Mod+Shift+6 { move-column-to-workspace 6; } - Mod+Shift+7 { move-column-to-workspace 7; } - Mod+Shift+8 { move-column-to-workspace 8; } - Mod+Shift+9 { move-column-to-workspace 9; } - - // === Column Management === - Mod+BracketLeft { consume-or-expel-window-left; } - Mod+BracketRight { consume-or-expel-window-right; } - Mod+Period { expel-window-from-column; } - - // === Sizing & Layout === - Mod+R { switch-preset-column-width; } - Mod+Shift+R { switch-preset-window-height; } - Mod+Ctrl+R { reset-window-height; } - Mod+Ctrl+F { expand-column-to-available-width; } - Mod+C { center-column; } - Mod+Ctrl+C { center-visible-columns; } - - // === Manual Sizing === - Mod+Minus { set-column-width "-10%"; } - Mod+Equal { set-column-width "+10%"; } - Mod+Shift+Minus { set-window-height "-10%"; } - Mod+Shift+Equal { set-window-height "+10%"; } - - // === Screenshots === - XF86Launch1 { screenshot; } - Ctrl+XF86Launch1 { screenshot-screen; } - Alt+XF86Launch1 { screenshot-window; } - Print { screenshot; } - Ctrl+Print { screenshot-screen; } - Alt+Print { screenshot-window; } - // === System Controls === - Mod+Escape allow-inhibiting=false { toggle-keyboard-shortcuts-inhibit; } - Mod+Shift+P { power-off-monitors; } -} debug { honor-xdg-activation-with-invalid-serial } + +// Override to disable super+tab +recent-windows { + binds { + Alt+Tab { next-window scope="output"; } + Alt+Shift+Tab { previous-window scope="output"; } + Alt+grave { next-window filter="app-id"; } + Alt+Shift+grave { previous-window filter="app-id"; } + } +} + +// Include dms files +include "dms/colors.kdl" +include "dms/layout.kdl" +include "dms/alttab.kdl" +include "dms/binds.kdl" diff --git a/core/internal/config/niri.go b/core/internal/config/niri.go index 78fb03ae..e68f77e0 100644 --- a/core/internal/config/niri.go +++ b/core/internal/config/niri.go @@ -4,3 +4,15 @@ import _ "embed" //go:embed embedded/niri.kdl var NiriConfig string + +//go:embed embedded/niri-colors.kdl +var NiriColorsConfig string + +//go:embed embedded/niri-layout.kdl +var NiriLayoutConfig string + +//go:embed embedded/niri-alttab.kdl +var NiriAlttabConfig string + +//go:embed embedded/niri-binds.kdl +var NiriBindsConfig string