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: add detailed settings for plasma

+174 -79
-1
users/leah/presets/plasma/default.nix
··· 10 10 lib.optional (opt != null && opt.package != null) opt.package; 11 11 in { 12 12 imports = [ 13 - ./fusuma.nix 14 13 ./sddm.nix 15 14 ./settings.nix 16 15 ];
-32
users/leah/presets/plasma/fusuma.nix
··· 1 - {pkgs, ...}: { 2 - users.groups.input = {}; 3 - roles.base.user.extraGroups = ["input"]; 4 - hm.services.fusuma = { 5 - enable = true; 6 - extraPackages = with pkgs; [xdotool wmctrl coreutils]; 7 - settings.swipe."3" = { 8 - left = { 9 - workspace = "next"; # Switch to next workspace 10 - keypress = { 11 - LEFTSHIFT.window = "next"; # Move window to next workspace 12 - LEFTMETA.command = "xdotool key --clearmodifiers super+ctrl+Left"; # Move window to left side 13 - }; 14 - }; 15 - right = { 16 - workspace = "prev"; # Switch to previous workspace 17 - keypress = { 18 - LEFTSHIFT.window = "prev"; # Move window to previous workspace 19 - LEFTMETA.command = "xdotool key --clearmodifiers super+ctrl+Right"; # Move window to right side 20 - }; 21 - }; 22 - up = { 23 - command = "xdotool key Control_L+F10"; # Workspace overview 24 - keypress.LEFTMETA.window.maximized = "toggle"; # Toggle Maximize/Unmaximize Window 25 - }; 26 - down = { 27 - command = "xdotool key Control_L+F12"; # Workspace overview 28 - keypress.LEFTMETA.window = "close"; # Toggle Maximize/Unmaximize Window 29 - }; 30 - }; 31 - }; 32 - }
+174 -46
users/leah/presets/plasma/settings.nix
··· 3 3 config, 4 4 ... 5 5 }: { 6 - hm.programs.plasma.configFile = { 7 - kdeglobals = { 8 - General = { 9 - fixed.value = "Iosevka Nerd Font,11,-1,5,50,0,0,0,0,0"; 10 - font.value = "Rethink Sans,11,-1,5,50,0,0,0,0,0"; 11 - menuFont.value = "Rethink Sans,10,-1,5,50,0,0,0,0,0"; 12 - smallestReadableFont.value = "Rethink Sans,8,-1,5,50,0,0,0,0,0"; 13 - toolBarFont.value = "Rethink Sans,10,-1,5,50,0,0,0,0,0"; 14 - }; 15 - KDE = { 16 - SingleClick.value = false; 17 - widgetStyle.value = "Breeze"; 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"]; 18 25 }; 19 26 }; 20 27 21 - kwinrc = { 22 - Desktops = { 23 - Id_1.value = "d68bba52-cb75-4199-a86c-6b0595d2c54f"; 24 - Id_2.value = "f312f93f-157d-4701-91f2-02c30d897938"; 25 - Id_3.value = "03f3bc75-080d-4ae5-99e1-9da06b393828"; 26 - Name_2.value = "Flake"; 27 - Name_3.value = "Webdev"; 28 - Number.value = 3; 29 - Rows.value = 1; 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 + }; 30 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"]; 31 126 32 - Tiling.padding.value = 2; 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"]); 33 132 34 - NightColor = { 35 - Active.value = true; 36 - EveningBeginFixed.value = 2200; 37 - Mode.value = "Times"; 38 - TransitionTime.value = 120; 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 + }; 39 148 }; 40 149 41 - Wayland = lib.mkIf (config.i18n.inputMethod.enabled == "fcitx5") { 42 - # Fcitx 5 43 - VirtualKeyboardEnabled.value = true; 44 - "InputMethod[$e]".value = "${config.i18n.inputMethod.package}/share/applications/org.fcitx.Fcitx5.desktop"; 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 + }; 45 173 }; 46 - }; 47 174 48 - # Make KRunner appear in the center of the screen, like macOS Spotlight 49 - krunnerrc.General.FreeFloating.value = true; 175 + # Make KRunner appear in the center of the screen, like macOS Spotlight 176 + krunnerrc.General.FreeFloating.value = true; 50 177 51 - plasmarc = { 52 - Theme.name.value = "default"; 53 - Wallpapers.usersWallpapers.value = "${./wallpaper.jpg}"; 54 - }; 178 + kcminputrc.Mouse.cursorSize.value = 32; 55 179 56 - kcminputrc.Mouse = { 57 - cursorSize.value = 32; 58 - cursorTheme.value = "Catppuccin-Mocha-Maroon-Cursors"; 180 + kxkbrc.Layout.Options.value = "terminate:ctrl_alt_bksp,compose:ralt"; 59 181 }; 182 + }; 60 183 61 - kscreenlockerrc."Greeter.Wallpaper.org.kde.image.General" = { 62 - Image.value = "${./wallpaper.jpg}"; 63 - PreviewImage.value = "${./wallpaper.jpg}"; 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 + }; 64 194 }; 65 - 66 - kxkbrc.Layout.Options.value = "terminate:ctrl_alt_bksp,compose:ralt"; 67 195 }; 68 196 }