All my system configs and packages in one repo
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

leah/plasma/settings: apply upstream plasma-manager additions

Font settings, better widgets and also lengthMode, all contributed by
yours truly.

+218 -203
+6 -5
flake.lock
··· 467 467 ] 468 468 }, 469 469 "locked": { 470 - "lastModified": 1713552700, 471 - "narHash": "sha256-R2+GRjHFEapDa08FnuJjweAiE+5W7VKnBxNo3tC/Yzo=", 472 - "owner": "pjones", 470 + "lastModified": 1714563971, 471 + "narHash": "sha256-4eqST81ihz+qFQ/XVKfMIEuV+Tpk2YKSP0HNKNBU9Us=", 472 + "owner": "pluiedev", 473 473 "repo": "plasma-manager", 474 - "rev": "bd743369ef402d269885225af93064f22b640990", 474 + "rev": "b138e3f06163acff75ad57a04a6e2a2c89c403fc", 475 475 "type": "github" 476 476 }, 477 477 "original": { 478 - "owner": "pjones", 478 + "owner": "pluiedev", 479 + "ref": "panel-settings", 479 480 "repo": "plasma-manager", 480 481 "type": "github" 481 482 }
+1 -1
flake.nix
··· 70 70 nixos-hardware.url = "github:NixOS/nixos-hardware/master"; 71 71 72 72 plasma-manager = { 73 - url = "github:pjones/plasma-manager"; 73 + url = "github:pluiedev/plasma-manager/panel-settings"; 74 74 inputs = { 75 75 home-manager.follows = "home-manager"; 76 76 nixpkgs.follows = "nixpkgs";
+1 -1
users/leah/presets/plasma/default.nix
··· 11 11 in { 12 12 imports = [ 13 13 ./sddm.nix 14 - ./settings.nix 14 + ./settings 15 15 ]; 16 16 17 17 boot.plymouth.enable = true;
-196
users/leah/presets/plasma/settings.nix
··· 1 - { 2 - lib, 3 - config, 4 - ... 5 - }: { 6 - hm.programs.plasma = { 7 - enable = true; 8 - 9 - workspace = { 10 - clickItemTo = "select"; 11 - theme = "default"; # Actually Catppuccin 12 - colorScheme = "CatppuccinMochaMaroon"; 13 - cursorTheme = "Catppuccin-Mocha-Maroon-Cursors"; 14 - lookAndFeel = "org.kde.breezedark.desktop"; 15 - iconTheme = "breeze-dark"; 16 - wallpaper = "${./wallpaper.jpg}"; 17 - }; 18 - 19 - kwin = { 20 - effects.shakeCursor.enable = true; 21 - virtualDesktops = { 22 - animation = "slide"; 23 - rows = 1; 24 - names = ["Default" "Flake" "Webdev"]; 25 - }; 26 - }; 27 - 28 - panels = let 29 - applyBase = {extraSettings ? "", ...} @ p: let 30 - rest = builtins.removeAttrs p ["extraSettings"]; 31 - in 32 - { 33 - hiding = "dodgewindows"; 34 - floating = true; 35 - height = 36; 36 - location = "top"; 37 - 38 - extraSettings = '' 39 - panel.lengthMode = "fit" 40 - ${extraSettings} 41 - ''; 42 - } 43 - // rest; 44 - 45 - mkSysMonitor = { 46 - title, 47 - sensorColors, 48 - totalSensors, 49 - sensors ? totalSensors, 50 - textOnlySensors, 51 - }: let 52 - mkList = ids: "[${lib.concatMapStringsSep ", " (x: "\\\"${x}\\\"") ids}]"; 53 - in { 54 - name = "org.kde.plasma.systemmonitor"; 55 - config = { 56 - Appearance = {inherit title;}; 57 - SensorColors = sensorColors; 58 - Sensors = { 59 - highPrioritySensorIds = mkList sensors; 60 - lowPrioritySensorIds = mkList textOnlySensors; 61 - totalSensors = mkList totalSensors; 62 - }; 63 - }; 64 - }; 65 - in 66 - map applyBase [ 67 - { 68 - height = 60; 69 - location = "bottom"; 70 - alignment = "center"; 71 - widgets = [ 72 - { 73 - name = "org.kde.plasma.kickoff"; # Application Launcher 74 - config.General = { 75 - primaryActions = "2"; # Custom buttons 76 - systemFavorites = ["lock-screen" "logout" "suspend" "reboot" "shutdown"]; 77 - showActionButtonCaptions = "false"; 78 - }; 79 - } 80 - "org.kde.plasma.icontasks" # Icons-only Task Manager 81 - ]; 82 - } 83 - { 84 - alignment = "left"; 85 - widgets = [ 86 - "org.kde.plasma.showdesktop" 87 - (mkSysMonitor { 88 - title = "CPU Usage"; 89 - sensorColors."cpu/all/usage" = "250,179,135"; # Peach 90 - totalSensors = ["cpu/all/usage"]; 91 - textOnlySensors = ["cpu/all/averageTemperature" "cpu/all/averageFrequency"]; 92 - }) 93 - (mkSysMonitor { 94 - title = "GPU Usage"; 95 - sensorColors."gpu/gpu1/usage" = "180,190,254"; # Lavender 96 - totalSensors = ["gpu/gpu1/usage"]; 97 - textOnlySensors = ["gpu/gpu1/temperature" "gpu/gpu1/frequency" "gpu/gpu1/power" "gpu/gpu1/usedVram" "gpu/gpu1/totalVram"]; 98 - }) 99 - (mkSysMonitor { 100 - title = "Memory Usage"; 101 - sensorColors."memory/physical/usedPercent" = "166,227,161"; # Green 102 - totalSensors = ["memory/physical/usedPercent"]; 103 - textOnlySensors = ["memory/physical/used" "memory/physical/total"]; 104 - }) 105 - ]; 106 - } 107 - { 108 - alignment = "center"; 109 - widgets = [ 110 - { 111 - name = "org.kde.plasma.digitalclock"; 112 - config.Appearance = { 113 - dateFormat = "custom"; 114 - customDateFormat = "dd MMM ''yy / ddd"; 115 - selectedTimeZones = ["Europe/Berlin" "Asia/Shanghai"]; 116 - wheelChangesTimezone = "true"; 117 - displayTimezoneFormat = "FullText"; 118 - use24hFormat = "2"; # 24-hour 119 - }; 120 - } 121 - ]; 122 - } 123 - { 124 - alignment = "right"; 125 - widgets = ["org.kde.plasma.systemtray"]; 126 - 127 - # Doesn't really work since a newly created system tray doesn't have its containment ID set. 128 - #extraSettings = '' 129 - # // Yes, trying to customize the system tray is fucking cursed. 130 - # const systemTray = desktopById(panelWidgets["org.kde.plasma.systemtray"].readConfig("SystrayContainmentId")); 131 - # systemTray.writeConfig("hiddenItems", ["org.kde.plasma.brightness", "org.kde.plasma.clipboard"]); 132 - 133 - # const battery = systemTray.widgets(["org.kde.plasma.battery"])[0]; 134 - # battery.writeConfig("showPercentage", true); 135 - #''; 136 - } 137 - ]; 138 - 139 - configFile = { 140 - kdeglobals = { 141 - General = { 142 - fixed.value = "Iosevka Nerd Font,11,-1,5,50,0,0,0,0,0"; 143 - font.value = "Rethink Sans,11,-1,5,50,0,0,0,0,0"; 144 - menuFont.value = "Rethink Sans,10,-1,5,50,0,0,0,0,0"; 145 - smallestReadableFont.value = "Rethink Sans,8,-1,5,50,0,0,0,0,0"; 146 - toolBarFont.value = "Rethink Sans,10,-1,5,50,0,0,0,0,0"; 147 - }; 148 - }; 149 - 150 - kwinrc = { 151 - Tiling.padding.value = 2; 152 - 153 - NightColor = { 154 - Active.value = true; 155 - EveningBeginFixed.value = 2200; 156 - Mode.value = "Times"; 157 - TransitionTime.value = 120; 158 - }; 159 - 160 - Wayland = lib.mkIf (config.hm.i18n.inputMethod.enabled == "fcitx5") { 161 - # Fcitx 5 162 - VirtualKeyboardEnabled.value = true; 163 - "InputMethod[$e]".value = "${config.hm.i18n.inputMethod.package}/share/applications/org.fcitx.Fcitx5.desktop"; 164 - }; 165 - 166 - Plugins = { 167 - cubeEnabled.value = true; 168 - dimscreenEnabled.value = true; 169 - shakecursorEnabled.value = true; 170 - sheetEnabled.value = true; 171 - wobblywindowsEnabled.value = true; 172 - }; 173 - }; 174 - 175 - # Make KRunner appear in the center of the screen, like macOS Spotlight 176 - krunnerrc.General.FreeFloating.value = true; 177 - 178 - kcminputrc.Mouse.cursorSize.value = 32; 179 - 180 - kxkbrc.Layout.Options.value = "terminate:ctrl_alt_bksp,compose:ralt"; 181 - }; 182 - }; 183 - 184 - hm.programs.konsole = { 185 - enable = true; 186 - defaultProfile = "Catppuccin"; 187 - profiles.catppuccin = { 188 - name = "Catppuccin"; 189 - colorScheme = "Catppuccin-Mocha"; 190 - font = { 191 - name = "Iosevka Nerd Font"; 192 - size = 12; 193 - }; 194 - }; 195 - }; 196 - }
+94
users/leah/presets/plasma/settings/default.nix
··· 1 + { 2 + lib, 3 + config, 4 + ... 5 + }: { 6 + imports = [./panels.nix]; 7 + 8 + hm.programs.plasma = { 9 + enable = true; 10 + 11 + fonts = let 12 + rethink = { 13 + family = "Rethink Sans"; 14 + pointSize = 10; 15 + }; 16 + in { 17 + general = rethink // {pointSize = 11;}; 18 + fixedWidth = { 19 + family = "Iosevka Nerd Font"; 20 + pointSize = 11; 21 + }; 22 + small = rethink // {pointSize = 8;}; 23 + toolbar = rethink; 24 + menu = rethink; 25 + windowTitle = rethink; 26 + }; 27 + 28 + workspace = { 29 + clickItemTo = "select"; 30 + theme = "default"; # Actually Catppuccin 31 + colorScheme = "CatppuccinMochaMaroon"; 32 + cursorTheme = "Catppuccin-Mocha-Maroon-Cursors"; 33 + lookAndFeel = "org.kde.breezedark.desktop"; 34 + iconTheme = "breeze-dark"; 35 + wallpaper = "${./wallpaper.jpg}"; 36 + }; 37 + 38 + kwin = { 39 + effects.shakeCursor.enable = true; 40 + virtualDesktops = { 41 + animation = "slide"; 42 + rows = 1; 43 + names = ["Default" "Flake" "Webdev"]; 44 + }; 45 + }; 46 + 47 + configFile = { 48 + kwinrc = { 49 + Tiling.padding.value = 2; 50 + 51 + NightColor = { 52 + Active.value = true; 53 + EveningBeginFixed.value = 2200; 54 + Mode.value = "Times"; 55 + TransitionTime.value = 120; 56 + }; 57 + 58 + Wayland = lib.mkIf (config.hm.i18n.inputMethod.enabled == "fcitx5") { 59 + # Fcitx 5 60 + VirtualKeyboardEnabled.value = true; 61 + "InputMethod[$e]".value = "${config.hm.i18n.inputMethod.package}/share/applications/org.fcitx.Fcitx5.desktop"; 62 + }; 63 + 64 + Plugins = { 65 + cubeEnabled.value = true; 66 + dimscreenEnabled.value = true; 67 + shakecursorEnabled.value = true; 68 + sheetEnabled.value = true; 69 + wobblywindowsEnabled.value = true; 70 + }; 71 + }; 72 + 73 + # Make KRunner appear in the center of the screen, like macOS Spotlight 74 + krunnerrc.General.FreeFloating.value = true; 75 + 76 + kcminputrc.Mouse.cursorSize.value = 32; 77 + 78 + kxkbrc.Layout.Options.value = "terminate:ctrl_alt_bksp,compose:ralt"; 79 + }; 80 + }; 81 + 82 + hm.programs.konsole = { 83 + enable = true; 84 + defaultProfile = "Catppuccin"; 85 + profiles.catppuccin = { 86 + name = "Catppuccin"; 87 + colorScheme = "Catppuccin-Mocha"; 88 + font = { 89 + name = "Iosevka Nerd Font"; 90 + size = 12; 91 + }; 92 + }; 93 + }; 94 + }
+116
users/leah/presets/plasma/settings/panels.nix
··· 1 + {lib, ...}: { 2 + hm.programs.plasma.panels = let 3 + base = { 4 + hiding = "dodgewindows"; 5 + floating = true; 6 + height = 36; 7 + location = "top"; 8 + lengthMode = "fit"; 9 + }; 10 + in 11 + map (p: base // p) [ 12 + { 13 + height = 60; 14 + location = "bottom"; 15 + alignment = "center"; 16 + widgets = [ 17 + { 18 + name = "org.kde.plasma.kickoff"; # Application Launcher 19 + config.General = { 20 + primaryActions = "2"; # Custom buttons 21 + systemFavorites = ["lock-screen" "logout" "suspend" "reboot" "shutdown"]; 22 + showActionButtonCaptions = "false"; 23 + }; 24 + } 25 + "org.kde.plasma.icontasks" # Icons-only Task Manager 26 + ]; 27 + } 28 + { 29 + alignment = "left"; 30 + widgets = [ 31 + "org.kde.plasma.showdesktop" 32 + { 33 + systemMonitor = { 34 + title = "CPU Usage"; 35 + sensors = [ 36 + { 37 + name = "cpu/all/usage"; 38 + color = "250,179,135"; # Peach 39 + } 40 + ]; 41 + totalSensors = ["cpu/all/usage"]; 42 + textOnlySensors = ["cpu/all/averageTemperature" "cpu/all/averageFrequency"]; 43 + }; 44 + } 45 + { 46 + systemMonitor = { 47 + title = "GPU Usage"; 48 + sensors = [ 49 + { 50 + name = "gpu/gpu1/usage"; 51 + color = "180,190,254"; # Lavender 52 + } 53 + ]; 54 + totalSensors = ["gpu/gpu1/usage"]; 55 + textOnlySensors = ["gpu/gpu1/temperature" "gpu/gpu1/frequency" "gpu/gpu1/power" "gpu/gpu1/usedVram" "gpu/gpu1/totalVram"]; 56 + }; 57 + } 58 + { 59 + systemMonitor = { 60 + title = "Memory Usage"; 61 + sensors = [ 62 + { 63 + name = "memory/physical/usedPercent"; 64 + color = "166,227,161"; # Green 65 + } 66 + ]; 67 + totalSensors = ["memory/physical/usedPercent"]; 68 + textOnlySensors = ["memory/physical/used" "memory/physical/total"]; 69 + }; 70 + } 71 + ]; 72 + } 73 + { 74 + alignment = "center"; 75 + widgets = [ 76 + { 77 + digitalClock = { 78 + date.format.custom = "d MMM ''yy / ddd"; 79 + time.format = "24h"; 80 + timeZone = { 81 + selected = ["Europe/Berlin" "Asia/Shanghai"]; 82 + changeOnScroll = true; 83 + format = "city"; 84 + }; 85 + }; 86 + } 87 + ]; 88 + } 89 + { 90 + alignment = "right"; 91 + widgets = ["org.kde.plasma.systemtray"]; 92 + 93 + extraSettings = '' 94 + // Yes, trying to customize the system tray is fucking cursed. 95 + 96 + // Why can't we just use panelWidgets["org.kde.plasma.systemtray"], you say? 97 + // Well, that's because SOMEHOW the widget you get from that is DIFFERENT 98 + // from the REAL system tray widget! *sigh* 99 + 100 + for (const wid of panel.widgets(["org.kde.plasma.systemtray"])) { 101 + const tray = desktopById(wid.readConfig("SystrayContainmentId")); 102 + if (!tray) continue; // if somehow the containment doesn't exist 103 + 104 + tray.writeConfig("hiddenItems", [ 105 + "org.kde.plasma.brightness", 106 + "org.kde.plasma.clipboard", 107 + ]); 108 + 109 + // At least customizing subwidgets is blissfully simple. 110 + const battery = tray.addWidget("org.kde.plasma.battery"); 111 + battery.writeConfig("showPercentage", true); 112 + } 113 + ''; 114 + } 115 + ]; 116 + }
users/leah/presets/plasma/wallpaper.jpg users/leah/presets/plasma/settings/wallpaper.jpg