From 1f580ca6d9c407d1aaa3db099b81ecfa8bce07c7 Mon Sep 17 00:00:00 2001 From: Ari Sosnovsky Date: Wed, 6 May 2026 12:59:27 -0400 Subject: [PATCH] noctalia --- configs/niri/config.kdl | 29 ++- configs/niri/config.kdl.backup1777323853 | 181 ------------------- configs/niri/dms/binds.kdl | 72 +------- configs/niri/dms/index.kdl | 6 + configs/niri/dms/outputs.kdl | 1 - configs/niri/noctalia/binds.kdl | 34 ++++ configs/niri/noctalia/index.kdl | 6 + configs/niri/{dms => shared}/alttab.kdl | 0 configs/niri/{dms => shared}/colors.kdl | 0 configs/niri/{dms => shared}/cursor.kdl | 0 configs/niri/{dms => shared}/general.kdl | 0 configs/niri/shared/index.kdl | 14 ++ configs/niri/{dms => shared}/layout.kdl | 0 configs/niri/{dms => shared}/windowrules.kdl | 0 configs/niri/{dms => shared}/wpblur.kdl | 0 flake.lock | 88 ++++++++- flake.nix | 7 + hosts/fwbook.nix | 7 +- modules/core/nix-substituters.nix | 2 + 19 files changed, 182 insertions(+), 265 deletions(-) delete mode 100644 configs/niri/config.kdl.backup1777323853 create mode 100644 configs/niri/dms/index.kdl delete mode 120000 configs/niri/dms/outputs.kdl create mode 100644 configs/niri/noctalia/binds.kdl create mode 100644 configs/niri/noctalia/index.kdl rename configs/niri/{dms => shared}/alttab.kdl (100%) rename configs/niri/{dms => shared}/colors.kdl (100%) rename configs/niri/{dms => shared}/cursor.kdl (100%) rename configs/niri/{dms => shared}/general.kdl (100%) create mode 100644 configs/niri/shared/index.kdl rename configs/niri/{dms => shared}/layout.kdl (100%) rename configs/niri/{dms => shared}/windowrules.kdl (100%) rename configs/niri/{dms => shared}/wpblur.kdl (100%) diff --git a/configs/niri/config.kdl b/configs/niri/config.kdl index 34f56a5..a6eaa3b 100644 --- a/configs/niri/config.kdl +++ b/configs/niri/config.kdl @@ -1,12 +1,21 @@ // ========================= -// DMS Configuration +// Niri Configuration // ========================= -include "dms/general.kdl" -include "dms/outputs.kdl" -include "dms/cursor.kdl" -include "dms/layout.kdl" -include "dms/colors.kdl" -include "dms/wpblur.kdl" -include "dms/alttab.kdl" -include "dms/binds.kdl" -include "dms/windowrules.kdl" +// Shared configuration for multiple shell environments + +// ========================= +// Shared Configuration +// ========================= +// General purpose configuration shared across all setups +include "shared/index.kdl" + +// ========================= +// Desktop Environment Selection +// ========================= +// Uncomment ONE of the following to use that environment: + +// For DankMaterialShell (DMS) +// include "dms/index.kdl" + +// For Noctalia +include "noctalia/index.kdl" diff --git a/configs/niri/config.kdl.backup1777323853 b/configs/niri/config.kdl.backup1777323853 deleted file mode 100644 index e5ddaba..0000000 --- a/configs/niri/config.kdl.backup1777323853 +++ /dev/null @@ -1,181 +0,0 @@ -include "dms/binds.kdl" -include "dms/outputs.kdl" -include "dms/cursor.kdl" -include "configs/window-rules.kdl" - -// https://github.com/YaLTeR/niri/wiki/Configuration:-Input -input { - touchpad { - tap - natural-scroll - } -} -overview { - backdrop-color "#777777" -} -cursor { - // xcursor-theme "breeze_cursors" - xcursor-size 48 - hide-when-typing -} - -environment { - QT_QPA_PLATFORM "wayland" - QT_WAYLAND_DISABLE_WINDOWDECORATION "1" - NIXOS_OZONE_WL "1" - DISPLAY ":0" - ELECTRON_OZONE_PLATFORM_HINT "auto" -} - - -// spawn-at-startup "/run/current-system/sw/bin/tailscale" "systray" - - -// ========================= -// General layout -// ========================= -layout { - gaps 8 - center-focused-column "never" - tab-indicator { - width 8 - gap 8 - length total-proportion=1.0 - hide-when-single-tab - position "top" - place-within-column - } - shadow {} - preset-column-widths { - proportion 0.33333 - proportion 0.5 - proportion 0.66667 - } - default-column-width { proportion 0.5; } - focus-ring { - width 4 - active-gradient from="#ff06" to="#af0f" angle=45 in="oklch longer hue" - inactive-color "#505050" - } - // border { - // off - // } - insert-hint { - color "#ffc87f80" - gradient from="#ffbb6680" to="#ffc88080" angle=45 relative-to="workspace-view" - } -} -prefer-no-csd -window-rule { - geometry-corner-radius 6 - tiled-state true -} -animations { - window-movement { - duration-ms 250 - } - workspace-switch { - duration-ms 250 - } - horizontal-view-movement { - duration-ms 250 - } -} - -// ========================= -// Screen Shots -// ========================= -screenshot-path "~/Pictures/Screenshots/Screenshot from %Y-%m-%d %H-%M-%S.png" - -// ========================= -// General Stuff -// ========================= -switch-events { - lid-close { spawn "notify-send" "The laptop lid is closed!"; } - lid-open { spawn "notify-send" "The laptop lid is open!"; } -} -hotkey-overlay { - skip-at-startup -} - -// ========================= -// General binds -// ========================= -binds { - Mod+Shift+H { show-hotkey-overlay; } - Mod+T { spawn "ghostty"; } - Mod+Space { spawn "dms" "ipc" "spotlight" "toggle"; } - Mod+Z { spawn "flatpak" "run" "app.zen_browser.zen"; } - Mod+B { spawn "chromium"; } - Mod+E { spawn "wofi-emoji"; } - - Mod+Left { focus-column-left; } - Mod+Down { focus-workspace-down; } - Mod+Up { focus-workspace-up; } - Mod+Right { focus-column-right; } - - Mod+Tab { toggle-overview; } - Mod+Shift+Tab { focus-monitor-next; } - - Mod+Ctrl+Right { swap-window-right; } - Mod+Ctrl+Left { swap-window-left; } - Mod+Ctrl+Up { move-window-to-workspace-up; } - Mod+Ctrl+Down { move-window-to-workspace-down; } - - Mod+W { toggle-column-tabbed-display; } - Mod+F { maximize-column; } - Mod+Shift+F { fullscreen-window; } - Mod+Ctrl+F { reset-window-height; } - Mod+V { toggle-window-floating; } - - Mod+C { center-column; } - - 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%"; } - - Mod+Escape allow-inhibiting=false { toggle-keyboard-shortcuts-inhibit; } - // Print { spawn "sh" "-c" "grim -g \"$(slurp)\" - | satty -f -"; } - // Mod+P { spawn "sh" "-c" "grim -g \"$(slurp)\" - | satty -f -"; } - Print { spawn "sh" "-c" "dms screenshot --stdout | satty -f -"; } - Mod+P { spawn "sh" "-c" "dms screenshot --stdout | satty -f -"; } - - Mod+R { spawn "/home/ari/.config/niri/screen-record.sh"; } - - Mod+Q { close-window; } -} - - - -recent-windows { - // off - debounce-ms 750 - - open-delay-ms 150 - - highlight { - active-color "#999999ff" - urgent-color "#ff9999ff" - padding 30 - corner-radius 0 - } - - previews { - max-height 480 - max-scale 0.5 - } - - binds { - Alt+Tab { next-window; } - Alt+Shift+Tab { previous-window; } - Alt+grave { next-window filter="app-id"; } - Alt+Shift+grave { previous-window filter="app-id"; } - - Mod+Tab { next-window; } - Mod+Shift+Tab { previous-window; } - Mod+grave { next-window filter="app-id"; } - Mod+Shift+grave { previous-window filter="app-id"; } - } -} diff --git a/configs/niri/dms/binds.kdl b/configs/niri/dms/binds.kdl index 2fd02c9..6be2de5 100644 --- a/configs/niri/dms/binds.kdl +++ b/configs/niri/dms/binds.kdl @@ -1,64 +1,13 @@ // ========================= -// DMS Keybindings +// DMS-Specific Keybindings // ========================= +// Configuration and integrations specific to DankMaterialShell binds { // ========================= - // General + // DMS Launcher & Spotlight // ========================= - Mod+Shift+H { show-hotkey-overlay; } - Mod+T { spawn "ghostty"; } Mod+Space { spawn "dms" "ipc" "spotlight" "toggle"; } - Mod+Z { spawn "flatpak" "run" "app.zen_browser.zen"; } - Mod+B { spawn "chromium"; } - Mod+E { spawn "wofi-emoji"; } - Mod+Q { close-window; } - - // ========================= - // Navigation - // ========================= - Mod+Left { focus-column-left; } - Mod+Down { focus-workspace-down; } - Mod+Up { focus-workspace-up; } - Mod+Right { focus-column-right; } - - Mod+Tab { toggle-overview; } - Mod+Shift+Tab { focus-monitor-next; } - - // ========================= - // Window Management - // ========================= - Mod+Ctrl+Right { swap-window-right; } - Mod+Ctrl+Left { swap-window-left; } - Mod+Ctrl+Up { move-window-to-workspace-up; } - Mod+Ctrl+Down { move-window-to-workspace-down; } - - Mod+W { toggle-column-tabbed-display; } - Mod+F { maximize-column; } - Mod+Shift+F { fullscreen-window; } - Mod+Ctrl+F { reset-window-height; } - Mod+V { toggle-window-floating; } - Mod+C { center-column; } - - // ========================= - // Resizing - // ========================= - 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 & Recording - // ========================= - Print { spawn "sh" "-c" "dms screenshot --stdout | satty -f -"; } - Mod+P { spawn "sh" "-c" "dms screenshot --stdout | satty -f -"; } - Mod+R { spawn "/home/ari/.config/niri/screen-record.sh"; } - - // ========================= - // Misc - // ========================= - Mod+Escape allow-inhibiting=false { toggle-keyboard-shortcuts-inhibit; } // ========================= // DMS Integration @@ -71,20 +20,7 @@ binds { Mod+Shift+Space hotkey-overlay-title="PlayerCtrl: Toggle" { spawn "playerctl" "play-pause"; } // ========================= - // Monitor Movement - // ========================= - Mod+Alt+Down hotkey-overlay-title="Move to Monitor Down" { move-column-to-monitor-down; } - Mod+Alt+Left hotkey-overlay-title="Move to Monitor Left" { move-column-to-monitor-left; } - Mod+Alt+Right hotkey-overlay-title="Move to Monitor Right" { move-column-to-monitor-right; } - Mod+Alt+Up hotkey-overlay-title="Move to Monitor Up" { move-column-to-monitor-up; } - - Mod+TouchpadScrollUp hotkey-overlay-title="Move Workspace to Monitor Down" { move-workspace-to-monitor-down; } - Mod+TouchpadScrollRight hotkey-overlay-title="Move Workspace to Monitor Left" { move-workspace-to-monitor-left; } - Mod+TouchpadScrollLeft hotkey-overlay-title="Move Workspace to Monitor Right" { move-workspace-to-monitor-right; } - Mod+TouchpadScrollDown hotkey-overlay-title="Move Workspace to Monitor Up" { move-workspace-to-monitor-up; } - - // ========================= - // Media & Brightness + // DMS Media & Brightness // ========================= Mod+Shift+Up hotkey-overlay-title="PlayerCtrl: Volume Up" { spawn "dms" "ipc" "audio" "increment" "1"; } Mod+Shift+Down hotkey-overlay-title="PlayerCtrl: Volume Down" { spawn "dms" "ipc" "audio" "decrement" "1"; } diff --git a/configs/niri/dms/index.kdl b/configs/niri/dms/index.kdl new file mode 100644 index 0000000..b929c1a --- /dev/null +++ b/configs/niri/dms/index.kdl @@ -0,0 +1,6 @@ +// ========================= +// DMS Configuration Index +// ========================= +// Configuration specific to DankMaterialShell (DMS) + +include "./binds.kdl" diff --git a/configs/niri/dms/outputs.kdl b/configs/niri/dms/outputs.kdl deleted file mode 120000 index c2d002b..0000000 --- a/configs/niri/dms/outputs.kdl +++ /dev/null @@ -1 +0,0 @@ -/home/ari/.config/niri/dms/profiles/profile_1777305011695_voqu6k.kdl \ No newline at end of file diff --git a/configs/niri/noctalia/binds.kdl b/configs/niri/noctalia/binds.kdl new file mode 100644 index 0000000..539b78d --- /dev/null +++ b/configs/niri/noctalia/binds.kdl @@ -0,0 +1,34 @@ +// ========================= +// Noctalia-Specific Keybindings +// ========================= +// Configuration and integrations specific to Noctalia shell + +binds { + // ========================= + // Core Noctalia Controls + // ========================= + Mod+Space { spawn-sh "noctalia-shell ipc call launcher toggle"; } + Mod+S { spawn-sh "noctalia-shell ipc call controlCenter toggle"; } + Mod+Comma { spawn-sh "noctalia-shell ipc call settings toggle"; } + + // ========================= + // Noctalia Integration (Similar to DMS shortcuts) + // ========================= + // Note: Notifications are accessed via Control Center (Mod+S) + // Mod+Alt+P for clipboard management + Mod+Alt+P hotkey-overlay-title="Clipboard: Toggle" { spawn "rofi" "-modi" "clipboard:greenclip print" "-show" "clipboard"; } + + // ========================= + // Noctalia Media & Brightness + // ========================= + Mod+Shift+Up hotkey-overlay-title="Volume Up" { spawn "noctalia-shell" "ipc" "call" "volume" "increase"; } + Mod+Shift+Down hotkey-overlay-title="Volume Down" { spawn "noctalia-shell" "ipc" "call" "volume" "decrease"; } + Mod+Shift+Right hotkey-overlay-title="Next Track" { spawn "playerctl" "next"; } + Mod+Shift+Left hotkey-overlay-title="Previous Track" { spawn "playerctl" "previous"; } + Mod+Shift+Space hotkey-overlay-title="Play/Pause" { spawn "playerctl" "play-pause"; } + 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"; } + XF86MonBrightnessUp allow-when-locked=true { spawn "noctalia-shell" "ipc" "call" "brightness" "increase"; } + XF86MonBrightnessDown allow-when-locked=true { spawn "noctalia-shell" "ipc" "call" "brightness" "decrease"; } +} diff --git a/configs/niri/noctalia/index.kdl b/configs/niri/noctalia/index.kdl new file mode 100644 index 0000000..aa1f844 --- /dev/null +++ b/configs/niri/noctalia/index.kdl @@ -0,0 +1,6 @@ +// ========================= +// Noctalia Configuration Index +// ========================= +// Configuration specific to Noctalia shell + +include "./binds.kdl" diff --git a/configs/niri/dms/alttab.kdl b/configs/niri/shared/alttab.kdl similarity index 100% rename from configs/niri/dms/alttab.kdl rename to configs/niri/shared/alttab.kdl diff --git a/configs/niri/dms/colors.kdl b/configs/niri/shared/colors.kdl similarity index 100% rename from configs/niri/dms/colors.kdl rename to configs/niri/shared/colors.kdl diff --git a/configs/niri/dms/cursor.kdl b/configs/niri/shared/cursor.kdl similarity index 100% rename from configs/niri/dms/cursor.kdl rename to configs/niri/shared/cursor.kdl diff --git a/configs/niri/dms/general.kdl b/configs/niri/shared/general.kdl similarity index 100% rename from configs/niri/dms/general.kdl rename to configs/niri/shared/general.kdl diff --git a/configs/niri/shared/index.kdl b/configs/niri/shared/index.kdl new file mode 100644 index 0000000..b8a9e57 --- /dev/null +++ b/configs/niri/shared/index.kdl @@ -0,0 +1,14 @@ +// ========================= +// Shared Configuration Index +// ========================= +// General purpose configuration shared across all DM setups + +include "./general.kdl" +include "./outputs.kdl" +include "./cursor.kdl" +include "./colors.kdl" +include "./layout.kdl" +include "./alttab.kdl" +include "./wpblur.kdl" +include "./windowrules.kdl" +include "./binds.kdl" diff --git a/configs/niri/dms/layout.kdl b/configs/niri/shared/layout.kdl similarity index 100% rename from configs/niri/dms/layout.kdl rename to configs/niri/shared/layout.kdl diff --git a/configs/niri/dms/windowrules.kdl b/configs/niri/shared/windowrules.kdl similarity index 100% rename from configs/niri/dms/windowrules.kdl rename to configs/niri/shared/windowrules.kdl diff --git a/configs/niri/dms/wpblur.kdl b/configs/niri/shared/wpblur.kdl similarity index 100% rename from configs/niri/dms/wpblur.kdl rename to configs/niri/shared/wpblur.kdl diff --git a/flake.lock b/flake.lock index a39e7b1..e81643f 100644 --- a/flake.lock +++ b/flake.lock @@ -829,6 +829,50 @@ "url": "https://flakehub.com/f/NixOS/nixpkgs/0" } }, + "noctalia": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ], + "noctalia-qs": "noctalia-qs" + }, + "locked": { + "lastModified": 1778075743, + "narHash": "sha256-WB5zYuFT69KUGa1ou+aMGNGxV/9e5EaqxF3IltN6BxY=", + "owner": "noctalia-dev", + "repo": "noctalia-shell", + "rev": "3bbf31945de508409e3a3ded08cc154f185c42fb", + "type": "github" + }, + "original": { + "owner": "noctalia-dev", + "repo": "noctalia-shell", + "type": "github" + } + }, + "noctalia-qs": { + "inputs": { + "nixpkgs": [ + "noctalia", + "nixpkgs" + ], + "systems": "systems_2", + "treefmt-nix": "treefmt-nix" + }, + "locked": { + "lastModified": 1777773024, + "narHash": "sha256-pLU+KB84A0Jei/vTD6pOS4Ovkmq3QDfPQHg1MlKsRqM=", + "owner": "noctalia-dev", + "repo": "noctalia-qs", + "rev": "d3e26ccd9eecde9139be00caf5dc2d4260fb31ee", + "type": "github" + }, + "original": { + "owner": "noctalia-dev", + "repo": "noctalia-qs", + "type": "github" + } + }, "nur": { "inputs": { "flake-parts": [ @@ -889,8 +933,9 @@ "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs_4", "nixpkgs-unstable": "nixpkgs-unstable", + "noctalia": "noctalia", "stylix": "stylix", - "systems": "systems_3" + "systems": "systems_4" } }, "stylix": { @@ -906,7 +951,7 @@ "nixpkgs" ], "nur": "nur", - "systems": "systems_2", + "systems": "systems_3", "tinted-foot": "tinted-foot", "tinted-kitty": "tinted-kitty", "tinted-schemes": "tinted-schemes", @@ -944,6 +989,21 @@ } }, "systems_2": { + "locked": { + "lastModified": 1689347949, + "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", + "owner": "nix-systems", + "repo": "default-linux", + "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default-linux", + "type": "github" + } + }, + "systems_3": { "locked": { "lastModified": 1681028828, "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", @@ -958,7 +1018,7 @@ "type": "github" } }, - "systems_3": { + "systems_4": { "locked": { "lastModified": 1681028828, "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", @@ -1053,6 +1113,28 @@ "repo": "base16-zed", "type": "github" } + }, + "treefmt-nix": { + "inputs": { + "nixpkgs": [ + "noctalia", + "noctalia-qs", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1775636079, + "narHash": "sha256-pc20NRoMdiar8oPQceQT47UUZMBTiMdUuWrYu2obUP0=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "790751ff7fd3801feeaf96d7dc416a8d581265ba", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "treefmt-nix", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index de9e86c..5edbec5 100644 --- a/flake.nix +++ b/flake.nix @@ -22,6 +22,11 @@ url = "github:AvengeMedia/DankMaterialShell/stable"; inputs.nixpkgs.follows = "nixpkgs-unstable"; }; + # Noctalia + noctalia = { + url = "github:noctalia-dev/noctalia-shell"; + inputs.nixpkgs.follows = "nixpkgs"; + }; # Flatpak nix-flatpak.url = "github:gmodena/nix-flatpak/?ref=main"; # Home manager @@ -56,6 +61,7 @@ , stylix , hyprlauncher , dms + , noctalia , git-hooks , nix-index-database , @@ -86,6 +92,7 @@ hyprlauncher nixpkgs-unstable dms + noctalia nix-index-database ; }; diff --git a/hosts/fwbook.nix b/hosts/fwbook.nix index 75026e9..772b464 100644 --- a/hosts/fwbook.nix +++ b/hosts/fwbook.nix @@ -2,6 +2,8 @@ , config , lib , user +, unstablePkgs +, noctalia , ... }: let @@ -11,6 +13,7 @@ let 8000 8001 ]; + noctaliaPkg = noctalia.packages.${pkgs.stdenv.hostPlatform.system}.default; in { # Skyg @@ -155,7 +158,7 @@ in # Development vscode - zed-editor-fhs + unstablePkgs.zed-editor-fhs devenv just rpi-imager @@ -187,7 +190,7 @@ in idevicerestore # optional, to mount using 'ifuse' # Misc - # hyprlauncher.packages.${system}.hyprlauncher + noctaliaPkg ]); services.usbmuxd.enable = true; services.flatpak.packages = [ diff --git a/modules/core/nix-substituters.nix b/modules/core/nix-substituters.nix index fd9b4f8..9c8fb6c 100644 --- a/modules/core/nix-substituters.nix +++ b/modules/core/nix-substituters.nix @@ -29,6 +29,7 @@ in "https://cuda-maintainers.cachix.org" "https://cosmic.cachix.org/" "https://ai.cachix.org" + "https://noctalia.cachix.org" ] ++ cfg.urls; nix.settings.trusted-substituters = [ "https://cache.flox.dev" @@ -42,6 +43,7 @@ in "devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw=" "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" "cosmic.cachix.org-1:Dya9IyXD4xdBehWjrkPv6rtxpmMdRel02smYzA85dPE=" + "noctalia.cachix.org-1:pCOR47nnMEo5thcxNDtzWpOxNFQsBRglJzxWPp3dkU4=" ] ++ cfg.keys; nix.settings.trusted-users = [ "root" skygUser.name ]; nix.extraOptions = ''