From 474a8badf4d10e20539e44f447941feb19e527e1 Mon Sep 17 00:00:00 2001 From: Christoph Urlacher Date: Fri, 12 Dec 2025 17:55:48 +0100 Subject: [PATCH] Modules/Niri: Init DankMaterialShell config --- flake.lock | 70 +++- flake.nix | 10 +- home/modules/default.nix | 4 +- home/modules/niri/dankMaterialShell.nix | 482 ++++++++++++++++++++++++ home/modules/niri/default.nix | 57 ++- home/modules/niri/noctalia.nix | 3 +- 6 files changed, 602 insertions(+), 24 deletions(-) create mode 100644 home/modules/niri/dankMaterialShell.nix diff --git a/flake.lock b/flake.lock index a310da14..e4355799 100644 --- a/flake.lock +++ b/flake.lock @@ -96,6 +96,30 @@ "type": "github" } }, + "dankMaterialShell": { + "inputs": { + "dgop": [ + "dgop" + ], + "nixpkgs": [ + "nixpkgs" + ], + "quickshell": "quickshell" + }, + "locked": { + "lastModified": 1765557900, + "narHash": "sha256-dJdst9aY9+ErvHdMzKunivMx9N5STkxzv4HpDn1ci2g=", + "owner": "AvengeMedia", + "repo": "DankMaterialShell", + "rev": "df1a8f40666411cd9484c50b945db2aef726cdb8", + "type": "github" + }, + "original": { + "owner": "AvengeMedia", + "repo": "DankMaterialShell", + "type": "github" + } + }, "devshell": { "inputs": { "nixpkgs": "nixpkgs" @@ -114,6 +138,26 @@ "type": "github" } }, + "dgop": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1762835999, + "narHash": "sha256-UykYGrGFOFTmDpKTLNxj1wvd1gbDG4TkqLNSbV0TYwk=", + "owner": "AvengeMedia", + "repo": "dgop", + "rev": "799301991cd5dcea9b64245f9d500dcc76615653", + "type": "github" + }, + "original": { + "owner": "AvengeMedia", + "repo": "dgop", + "type": "github" + } + }, "disko": { "inputs": { "nixpkgs": [ @@ -1228,6 +1272,28 @@ } }, "quickshell": { + "inputs": { + "nixpkgs": [ + "dankMaterialShell", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1764663772, + "narHash": "sha256-sHqLmm0wAt3PC4vczJeBozI1/f4rv9yp3IjkClHDXDs=", + "ref": "refs/heads/master", + "rev": "26531fc46ef17e9365b03770edd3fb9206fcb460", + "revCount": 713, + "type": "git", + "url": "https://git.outfoxxed.me/quickshell/quickshell" + }, + "original": { + "rev": "26531fc46ef17e9365b03770edd3fb9206fcb460", + "type": "git", + "url": "https://git.outfoxxed.me/quickshell/quickshell" + } + }, + "quickshell_2": { "inputs": { "nixpkgs": [ "nixpkgs" @@ -1250,7 +1316,9 @@ "root": { "inputs": { "caelestia": "caelestia", + "dankMaterialShell": "dankMaterialShell", "devshell": "devshell", + "dgop": "dgop", "disko": "disko", "hardware": "hardware", "home-manager": "home-manager", @@ -1269,7 +1337,7 @@ "noctalia": "noctalia", "nps": "nps", "nur": "nur", - "quickshell": "quickshell", + "quickshell": "quickshell_2", "sops-nix": "sops-nix", "textfox": "textfox", "waifu-cursors": "waifu-cursors" diff --git a/flake.nix b/flake.nix index f2aaac3a..126e1a2e 100644 --- a/flake.nix +++ b/flake.nix @@ -73,13 +73,13 @@ # caelestia-cli.inputs.nixpkgs.follows = "nixpkgs"; # DankMaterialShell - # dgop.url = "github:AvengeMedia/dgop"; - # dgop.inputs.nixpkgs.follows = "nixpkgs"; + dgop.url = "github:AvengeMedia/dgop"; + dgop.inputs.nixpkgs.follows = "nixpkgs"; # dms-cli.url = "github:AvengeMedia/danklinux"; # dms-cli.inputs.nixpkgs.follows = "nixpkgs"; - # dankMaterialShell.url = "github:AvengeMedia/DankMaterialShell"; - # dankMaterialShell.inputs.nixpkgs.follows = "nixpkgs"; - # dankMaterialShell.inputs.dgop.follows = "dgop"; + dankMaterialShell.url = "github:AvengeMedia/DankMaterialShell"; + dankMaterialShell.inputs.nixpkgs.follows = "nixpkgs"; + dankMaterialShell.inputs.dgop.follows = "dgop"; # Hyprland (use flake so plugins are not built from source) hyprland.url = "github:hyprwm/Hyprland"; diff --git a/home/modules/default.nix b/home/modules/default.nix index d9df9a50..640d26f0 100644 --- a/home/modules/default.nix +++ b/home/modules/default.nix @@ -35,8 +35,8 @@ # inputs.niri.homeModules.niri # Imported by system module inputs.noctalia.homeModules.default inputs.caelestia.homeManagerModules.default - # inputs.dankMaterialShell.homeModules.dankMaterialShell.default - # inputs.dankMaterialShell.homeModules.dankMaterialShell.niri + inputs.dankMaterialShell.homeModules.dankMaterialShell.default + inputs.dankMaterialShell.homeModules.dankMaterialShell.niri # NOTE: Do NOT use this, use the system module (the HM module has to rely on fuse) # inputs.impermanence.homeManagerModules.impermanence diff --git a/home/modules/niri/dankMaterialShell.nix b/home/modules/niri/dankMaterialShell.nix new file mode 100644 index 00000000..e520c0e5 --- /dev/null +++ b/home/modules/niri/dankMaterialShell.nix @@ -0,0 +1,482 @@ +{color}: { + enable = true; + + systemd = { + enable = true; + restartIfChanged = true; + }; + + # Deprecated + # enableClipboard = true; + # enableBrightnessControl = false; + # enableColorPicker = true; + # enableSystemSound = false; + + enableSystemMonitoring = true; + enableVPN = true; + enableDynamicTheming = false; + enableAudioWavelength = true; + enableCalendarEvents = false; + + niri = { + enableKeybinds = false; + enableSpawn = false; + }; + + # This is generated from the DMS settings dialog. + # Run: nix eval --impure --expr 'builtins.fromJSON (builtins.readFile ~/.config/DankMaterialShell/settings.json)' + default.settings = { + # Bar + barConfigs = [ + { + # Widgets + leftWidgets = [ + { + enabled = true; + id = "launcherButton"; + } + { + enabled = true; + id = "workspaceSwitcher"; + } + { + enabled = true; + focusedWindowCompactMode = true; + id = "focusedWindow"; + } + ]; + centerWidgets = [ + { + enabled = true; + id = "music"; + mediaSize = 1; + } + ]; + rightWidgets = [ + { + enabled = true; + id = "cpuUsage"; + minimumWidth = true; + } + { + enabled = true; + id = "memUsage"; + minimumWidth = true; + } + { + enabled = true; + id = "diskUsage"; + } + { + enabled = true; + id = "clipboard"; + } + { + enabled = true; + id = "controlCenterButton"; + } + { + enabled = true; + id = "systemTray"; + } + { + clockCompactMode = true; + enabled = true; + id = "clock"; + } + { + enabled = true; + id = "notificationButton"; + } + ]; + + enabled = true; + id = "default"; + name = "Main Bar"; + + # Behavior + autoHide = false; + autoHideDelay = 250; + maximizeDetection = true; + openOnOverview = false; + + # Border + borderColor = "surfaceText"; + borderEnabled = false; + borderOpacity = 1; + borderThickness = 2; + gothCornerRadiusOverride = false; + gothCornerRadiusValue = 12; + gothCornersEnabled = false; + + # Styling + position = 0; + fontScale = 1.1; + bottomGap = 0; + innerPadding = 4; + noBackground = false; + popupGapsAuto = true; + popupGapsManual = 4; + spacing = 0; + transparency = 1; + widgetOutlineColor = "primary"; + widgetOutlineEnabled = false; + widgetOutlineOpacity = 1; + widgetOutlineThickness = 2; + widgetTransparency = 1; + squareCorners = true; + screenPreferences = ["all"]; + showOnLastDisplay = true; + visible = true; + } + ]; + + # Power saving + acLockTimeout = 0; + acMonitorTimeout = 0; + acProfileName = ""; + acSuspendBehavior = 0; + acSuspendTimeout = 0; + + animationSpeed = 1; + + # Launcher + appLauncherGridColumns = 4; + appLauncherViewMode = "list"; + launchPrefix = ""; + launcherLogoBrightness = 0.5; + launcherLogoColorInvertOnMode = false; + launcherLogoColorOverride = ""; + launcherLogoContrast = 1; + launcherLogoCustomPath = ""; + launcherLogoMode = "os"; + launcherLogoSizeOffset = 0; + + # Audio + audioInputDevicePins = {}; + audioOutputDevicePins = {}; + audioVisualizerEnabled = true; + + # Battery + batteryLockTimeout = 0; + batteryMonitorTimeout = 0; + batteryProfileName = ""; + batterySuspendBehavior = 0; + batterySuspendTimeout = 0; + + # Wallpaper + blurWallpaperOnOverview = true; + blurredWallpaperLayer = true; + wallpaperFillMode = "Fill"; + + # Control center + controlCenterShowAudioIcon = true; + controlCenterShowBatteryIcon = false; + controlCenterShowBluetoothIcon = true; + controlCenterShowBrightnessIcon = false; + controlCenterShowMicIcon = true; + controlCenterShowNetworkIcon = true; + controlCenterShowPrinterIcon = false; + controlCenterShowVpnIcon = true; + controlCenterWidgets = [ + { + enabled = true; + id = "volumeSlider"; + width = 50; + } + { + enabled = true; + id = "brightnessSlider"; + width = 50; + } + { + enabled = true; + id = "wifi"; + width = 50; + } + { + enabled = true; + id = "bluetooth"; + width = 50; + } + { + enabled = true; + id = "audioOutput"; + width = 50; + } + { + enabled = true; + id = "audioInput"; + width = 50; + } + { + enabled = true; + id = "nightMode"; + width = 50; + } + { + enabled = true; + id = "darkMode"; + width = 50; + } + ]; + + # Styling + cornerRadius = 10; + currentThemeName = "cat-mauve"; + customAnimationDuration = 500; + fontFamily = "MonoLisa Normal"; + monoFontFamily = "MonoLisa Normal"; + fontScale = 1; + fontWeight = 500; + gtkThemingEnabled = false; + iconTheme = "System Default"; + + # Lock + fadeToLockEnabled = true; + fadeToLockGracePeriod = 5; + lockBeforeSuspend = false; + lockDateFormat = "yyyy-MM-dd"; + lockScreenActiveMonitor = "all"; + lockScreenInactiveColor = "#000000"; + lockScreenShowDate = true; + lockScreenShowPasswordField = true; + lockScreenShowPowerActions = true; + lockScreenShowProfileImage = true; + lockScreenShowSystemIcons = true; + lockScreenShowTime = true; + loginctlLockIntegration = true; + + # Notifications + notificationOverlayEnabled = false; + notificationPopupPosition = 0; + notificationTimeoutCritical = 0; + notificationTimeoutLow = 5000; + notificationTimeoutNormal = 5000; + + # OSD + osdAlwaysShowValue = true; + osdAudioOutputEnabled = true; + osdBrightnessEnabled = true; + osdCapsLockEnabled = true; + osdIdleInhibitorEnabled = true; + osdMediaVolumeEnabled = true; + osdMicMuteEnabled = true; + osdPosition = 7; + osdPowerProfileEnabled = false; + osdVolumeEnabled = true; + + # Power menu + powerActionConfirm = true; + powerActionHoldDuration = 0.5; + powerMenuActions = ["reboot" "logout" "poweroff" "lock" "restart"]; + powerMenuDefaultAction = "poweroff"; + powerMenuGridLayout = false; + + # Settings + focusedWindowCompactMode = false; + hideBrightnessSlider = false; + keyboardLayoutNameCompactMode = false; + modalDarkenBackground = true; + nightModeEnabled = false; + niriOverviewOverlayEnabled = true; + showBattery = false; + showCapsLockIndicator = false; + showClipboard = true; + showClock = true; + showControlCenterButton = true; + showCpuTemp = true; + showCpuUsage = true; + showDock = false; + showFocusedWindow = true; + showGpuTemp = false; + showLauncherButton = true; + showMemUsage = true; + showMusic = true; + showNotificationButton = true; + showOccupiedWorkspacesOnly = false; + showPrivacyButton = false; + showSystemTray = true; + showWorkspaceApps = false; + showWorkspaceIndex = false; + showWorkspacePadding = false; + showWorkspaceSwitcher = true; + soundNewNotification = true; + soundPluggedIn = true; + soundVolumeChanged = true; + soundsEnabled = false; + + # Launcher + sortAppsAlphabetically = false; + spotlightCloseNiriOverview = true; + spotlightModalViewMode = "list"; + + # Clock + use24HourClock = true; + showSeconds = true; + clockCompactMode = false; + clockDateFormat = "yyyy-MM-dd"; + + # Media + waveProgressEnabled = true; + scrollTitleEnabled = true; + + # Weather + showWeather = true; + useFahrenheit = false; + useAutoLocation = false; + weatherCoordinates = "51.5142273,7.4652789"; + weatherEnabled = true; + weatherLocation = "Dortmund, Nordrhein-Westfalen"; + + # Workspaces + workspaceNameIcons = {}; + workspaceScrolling = false; + workspacesPerMonitor = true; + + # Dock + dockAutoHide = false; + dockBorderColor = "surfaceText"; + dockBorderEnabled = false; + dockBorderOpacity = 1; + dockBorderThickness = 1; + dockBottomGap = 0; + dockGroupByApp = false; + dockIconSize = 40; + dockIndicatorStyle = "circle"; + dockMargin = 0; + dockOpenOnOverview = false; + dockPosition = 1; + dockSpacing = 4; + dockTransparency = 1; + + # Random shit + widgetBackgroundColor = "sc"; + widgetColorMode = "default"; + wifiNetworkPins = {}; + brightnessDevicePins = {}; + bluetoothDevicePins = {}; + centeringMode = "index"; + useSystemSoundTheme = false; + vpnLastConnected = ""; + syncModeWithPortal = true; + terminalsAlwaysDark = false; + updaterCustomCommand = ""; + updaterTerminalAdditionalParams = ""; + updaterUseCustomCommand = false; + showOnLastDisplay = {}; + dwlShowAllTags = false; + enableFprint = false; + enabledGpuPciIds = []; + customPowerActionHibernate = ""; + customPowerActionLock = ""; + customPowerActionLogout = ""; + customPowerActionPowerOff = ""; + customPowerActionReboot = ""; + customPowerActionSuspend = ""; + customThemeFile = ""; + displayNameMode = "system"; + matugenScheme = "scheme-tonal-spot"; + matugenTargetMonitor = ""; + matugenTemplateAlacritty = true; + matugenTemplateDgop = true; + matugenTemplateFirefox = true; + matugenTemplateFoot = true; + matugenTemplateGhostty = true; + matugenTemplateGtk = true; + matugenTemplateKcolorscheme = true; + matugenTemplateKitty = true; + matugenTemplateNiri = true; + matugenTemplatePywalfox = true; + matugenTemplateQt5ct = true; + matugenTemplateQt6ct = true; + matugenTemplateVesktop = true; + matugenTemplateVscode = true; + matugenTemplateWezterm = true; + notepadFontFamily = ""; + notepadFontSize = 14; + notepadLastCustomTransparency = 0.7; + notepadShowLineNumbers = false; + notepadTransparencyOverride = -1; + notepadUseMonospace = true; + maxFprintTries = 15; + maxWorkspaceIcons = 3; + mediaSize = 1; + networkPreference = "auto"; + selectedGpuIndex = 0; + popupTransparency = 1; + privacyShowCameraIcon = false; + privacyShowMicIcon = false; + privacyShowScreenShareIcon = false; + qtThemingEnabled = false; + runDmsMatugenTemplates = false; + runUserMatugenTemplates = false; + runningAppsCompactMode = true; + runningAppsCurrentWorkspace = false; + runningAppsGroupByApp = false; + screenPreferences = {}; + + configVersion = 2; + }; + + default.session = { + # Settings + doNotDisturb = false; + isLightMode = false; + weatherHourlyDetailed = true; + + # Night + nightModeAutoEnabled = true; + nightModeAutoMode = "time"; + nightModeEnabled = true; + nightModeEndHour = 6; + nightModeEndMinute = 0; + nightModeHighTemperature = 6500; + nightModeLocationProvider = ""; + nightModeStartHour = 22; + nightModeStartMinute = 0; + nightModeTemperature = 5500; + nightModeUseIPLocation = false; + + # Hardware + nonNvidiaGpuTempEnabled = false; + nvidiaGpuTempEnabled = false; + selectedGpuIndex = 0; + wifiDeviceOverride = ""; + enabledGpuPciIds = []; + lastBrightnessDevice = ""; + + # Wallpapers + perModeWallpaper = false; + perMonitorWallpaper = false; + wallpaperCyclingEnabled = false; + wallpaperCyclingInterval = 300; + wallpaperCyclingMode = "interval"; + wallpaperCyclingTime = "06:00"; + wallpaperPath = "/home/christoph/NixFlake/wallpapers/Windows.jpg"; + wallpaperPathDark = ""; + wallpaperPathLight = ""; + wallpaperTransition = "iris bloom"; + + # Random shit + includedTransitions = ["fade" "wipe" "disc" "stripes" "iris bloom" "pixelate" "portal"]; + launchPrefix = ""; + latitude = 0; + longitude = 0; + pinnedApps = []; + hiddenTrayIds = []; + recentColors = []; + showThirdPartyPlugins = true; + + # Ultra random shit + monitorCyclingSettings = {}; + monitorWallpapers = {}; + monitorWallpapersDark = {}; + monitorWallpapersLight = {}; + brightnessExponentValues = {}; + brightnessExponentialDevices = {}; + brightnessUserSetValues = {}; + + configVersion = 1; + }; +} diff --git a/home/modules/niri/default.nix b/home/modules/niri/default.nix index c4f50841..df484add 100644 --- a/home/modules/niri/default.nix +++ b/home/modules/niri/default.nix @@ -11,11 +11,15 @@ in { options.modules.niri = import ./options.nix {inherit lib mylib;}; - config = lib.mkIf niri.enable { + config = lib.mkIf niri.enable rec { assertions = [ { assertion = nixosConfig.programs.niri.enable; - message = "Can't enable Niri module with Niri disabled!"; + message = "Can't enable Niri config with Niri disabled!"; + } + { + assertion = !(programs.noctalia-shell.enable && programs.dankMaterialShell.enable); + message = "Can't enable Noctalia and DankMaterialShell at the same time!"; } ]; @@ -25,6 +29,9 @@ in { iconTheme.name = color.iconTheme; }; + # Disable niri polkit if we use DMS, as it has its own + systemd.user.services.niri-flake-polkit = lib.mkForce {}; + home = { sessionVariables = { QT_QPA_PLATFORMTHEME = "gtk3"; # For Noctalia @@ -52,7 +59,9 @@ in { }; programs = { + # TODO: Those should be modules with their own options noctalia-shell = import ./noctalia.nix {inherit color;}; + dankMaterialShell = import ./dankMaterialShell.nix {inherit color;}; # TODO: Extract options niri = { @@ -323,22 +332,40 @@ in { }; # Noctalia + # "Mod+A" = { + # action = spawn "noctalia-shell" "ipc" "call" "launcher" "toggle"; + # hotkey-overlay = {title = "Toggle the application launcher.";}; + # }; + # "Mod+Ctrl+L" = { + # action = spawn "noctalia-shell" "ipc" "call" "lockScreen" "lock"; + # hotkey-overlay = {title = "Lock the screen.";}; + # }; + # "Mod+W" = { + # action = spawn "noctalia-shell" "ipc" "call" "wallpaper" "toggle"; + # hotkey-overlay = {title = "Toggle the wallpaper chooser.";}; + # }; + # "Mod+Escape" = { + # action = spawn "noctalia-shell" "ipc" "call" "sessionMenu" "toggle"; + # hotkey-overlay = {title = "Toggle the session menu.";}; + # }; + + # DankMaterialShell "Mod+A" = { - action = spawn "noctalia-shell" "ipc" "call" "launcher" "toggle"; + action = spawn "dms" "ipc" "call" "spotlight" "toggle"; hotkey-overlay = {title = "Toggle the application launcher.";}; }; "Mod+Ctrl+L" = { - action = spawn "noctalia-shell" "ipc" "call" "lockScreen" "lock"; + action = spawn "dms" "ipc" "call" "lock" "lock"; hotkey-overlay = {title = "Lock the screen.";}; }; - "Mod+W" = { - action = spawn "noctalia-shell" "ipc" "call" "wallpaper" "toggle"; - hotkey-overlay = {title = "Toggle the wallpaper chooser.";}; - }; "Mod+Escape" = { - action = spawn "noctalia-shell" "ipc" "call" "sessionMenu" "toggle"; + action = spawn "dms" "ipc" "call" "powermenu" "toggle"; hotkey-overlay = {title = "Toggle the session menu.";}; }; + "Mod+C" = { + action = spawn "dms" "ipc" "call" "clipboard" "toggle"; + hotkey-overlay = {title = "Show clipboard history.";}; + }; # Screenshots "Mod+S" = { @@ -350,6 +377,12 @@ in { hotkey-overlay = {title = "Take a screenshot of a region.";}; }; + # Niri + "Mod+Shift+Slash" = { + action = show-hotkey-overlay; + hotkey-overlay = {hidden = true;}; + }; + # Audio "XF86AudioRaiseVolume" = { action = spawn "wpctl" "set-volume" "-l" "1.5" "@DEFAULT_AUDIO_SINK@" "5%+"; @@ -372,12 +405,6 @@ in { hotkey-overlay = {hidden = true;}; }; - # Niri - "Mod+Shift+Slash" = { - action = show-hotkey-overlay; - hotkey-overlay = {hidden = true;}; - }; - # Niri windows "Mod+Q" = { action = close-window; diff --git a/home/modules/niri/noctalia.nix b/home/modules/niri/noctalia.nix index b9164d2d..563aa7c8 100644 --- a/home/modules/niri/noctalia.nix +++ b/home/modules/niri/noctalia.nix @@ -1,5 +1,6 @@ {color}: { - enable = true; + enable = false; + settings = { # configure noctalia here; defaults will # be deep merged with these attributes.