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/niri: add swayosd, fix GTK3 styling

+107 -30
+1
modules/hjem-ext/default.nix
··· 6 6 ./programs/jujutsu.nix 7 7 ./programs/moar.nix 8 8 ./programs/swaylock.nix 9 + ./programs/swayosd.nix 9 10 ./programs/vesktop.nix 10 11 ]; 11 12 }
+38
modules/hjem-ext/programs/swayosd.nix
··· 1 + { 2 + config, 3 + lib, 4 + pkgs, 5 + ... 6 + }: 7 + let 8 + cfg = config.ext.programs.swayosd; 9 + format = pkgs.formats.toml { }; 10 + in 11 + { 12 + options.ext.programs.swayosd = { 13 + enable = lib.mkEnableOption "SwayOSD"; 14 + 15 + package = lib.mkPackageOption pkgs "swayosd" { }; 16 + 17 + settings = lib.mkOption { 18 + type = lib.types.submodule { 19 + freeformType = format.type; 20 + }; 21 + default = { }; 22 + }; 23 + 24 + style = lib.mkOption { 25 + type = with lib.types; nullOr path; 26 + default = null; 27 + }; 28 + }; 29 + 30 + config = lib.mkIf cfg.enable { 31 + packages = [ cfg.package ]; 32 + 33 + files.".config/swayosd/config.toml".source = lib.mkIf (cfg.settings != { }) ( 34 + format.generate "swayosd-config.toml" cfg.settings 35 + ); 36 + files.".config/swayosd/style.css".source = lib.mkIf (cfg.style != null) cfg.style; 37 + }; 38 + }
+10 -9
users/leah/presets/niri/config.kdl
··· 175 175 Mod+Shift+Slash { show-hotkey-overlay; } 176 176 177 177 // Suggested binds for running programs: terminal, app launcher, screen locker. 178 - Mod+T repeat=false { spawn "gdbus" "call" "--session" "--dest" "com.mitchellh.ghostty" "--object-path" "/com/mitchellh/ghostty" "--method" "org.gtk.Actions.Activate new-window" "[]" "[]"; } 178 + Mod+T repeat=false { spawn "ghostty" "+new-window"; } 179 179 Super+D repeat=false { spawn "bash" "-c" "pkill fuzzel || fuzzel"; } 180 180 Super+Alt+L { spawn "swaylock"; } 181 181 182 - XF86AudioRaiseVolume allow-when-locked=true { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1+" "-l" "1.0"; } 183 - XF86AudioLowerVolume allow-when-locked=true { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1-" "-l" "1.0"; } 184 - XF86AudioMute allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle"; } 185 - XF86AudioMicMute allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SOURCE@" "toggle"; } 182 + XF86AudioRaiseVolume allow-when-locked=true { spawn "swayosd-client" "--output-volume=raise"; } 183 + XF86AudioLowerVolume allow-when-locked=true { spawn "swayosd-client" "--output-volume=lower"; } 184 + XF86AudioMute allow-when-locked=true { spawn "swayosd-client" "--output-volume=mute-toggle"; } 185 + XF86AudioMicMute allow-when-locked=true { spawn "swayosd-client" "--input-volume=mute-toggle"; } 186 186 187 - XF86MonBrightnessDown allow-when-locked=true { spawn "brightnessctl" "--device=intel_backlight" "s" "10%-"; } 188 - XF86MonBrightnessUp allow-when-locked=true { spawn "brightnessctl" "--device=intel_backlight" "s" "10%+"; } 189 - XF86KbdBrightnessDown allow-when-locked=true { spawn "brightnessctl" "--device=asus::kbd_backlight" "s" "1-"; } 190 - XF86KbdBrightnessUp allow-when-locked=true { spawn "brightnessctl" "--device=asus::kbd_backlight" "s" "1+"; } 187 + XF86MonBrightnessDown allow-when-locked=true { spawn "swayosd-client" "--device=intel_backlight" "--brightness=lower"; } 188 + XF86MonBrightnessUp allow-when-locked=true { spawn "swayosd-client" "--device=intel_backlight" "--brightness=raise"; } 189 + XF86KbdBrightnessDown allow-when-locked=true { spawn "swayosd-client" "--device=asus::kbd_backlight" "--brightness=lower"; } 190 + XF86KbdBrightnessUp allow-when-locked=true { spawn "swayosd-client" "--device=asus::kbd_backlight" "--brightness=raise"; } 191 191 192 192 Mod+Q { close-window; } 193 193 ··· 349 349 spawn-at-startup "fcitx5" 350 350 spawn-at-startup "swayidle" 351 351 spawn-at-startup "swaybg" 352 + spawn-at-startup "swayosd-server" 352 353 353 354 // TODO: I do not know why 1Pass doesn't work on Wayland 354 355 spawn-at-startup "env" "ELECTRON_OZONE_PLATFORM_HINT=x11" "1password"
+6 -3
users/leah/presets/niri/default.nix
··· 27 27 loupe 28 28 gnome-logs 29 29 resources 30 - 31 - # For Ghostty's gdbus activation 32 - glib 33 30 ]; 34 31 35 32 files.".config/niri/config.kdl".source = ./config.kdl; ··· 68 65 radius = 8; 69 66 width = 2; 70 67 }; 68 + }; 69 + 70 + hjem.users.leah.ext.programs.swayosd = { 71 + enable = true; 72 + settings.server.show_percentage = true; 73 + style = ./swayosd/style.css; 71 74 }; 72 75 }
+20 -18
users/leah/presets/niri/gui-toolkits.nix
··· 5 5 }: 6 6 { 7 7 # Make both GTK 3 and Qt apps follow GTK 4-like theming... sorta 8 - hjem.users.leah.packages = with pkgs; [ 9 - adw-gtk3 10 - qadwaitadecorations 11 - qadwaitadecorations-qt6 12 - ]; 8 + hjem.users.leah = { 9 + packages = with pkgs; [ 10 + adw-gtk3 11 + qadwaitadecorations 12 + qadwaitadecorations-qt6 13 + ]; 13 14 14 - qt.enable = true; 15 - 16 - hjem.users.leah.environment.sessionVariables = { 17 - # Make Qt apps look like GTK 3 apps. 18 - # Ideally I want to make them look like GTK 4 + Adwaita apps instead, 19 - # but it's not really viable with `adwaita-qt` being discontinued 20 - QT_QPA_PLATFORMTHEME = "gtk3"; 15 + environment.sessionVariables = { 16 + # Make Qt apps look like GTK 3 apps. 17 + # Ideally I want to make them look like GTK 4 + Adwaita apps instead, 18 + # but it's not really viable with `adwaita-qt` being discontinued 19 + QT_QPA_PLATFORMTHEME = "gtk3"; 21 20 22 - # At least we can have an Adwaita-style CSD 23 - QT_WAYLAND_DECORATION = "adwaita"; 21 + # At least we can have an Adwaita-style CSD 22 + QT_WAYLAND_DECORATION = "adwaita"; 23 + }; 24 24 25 - # GTK 3 apps are ignoring the dconf settings for some reason, 26 - # which is causing Qt apps to also misbehave 27 - GTK_THEME = "Adwaita:dark"; 25 + rum.misc.gtk.settings = { 26 + # GTK 3 apps are ignoring the dconf settings for some reason, 27 + # which is causing Qt apps to also misbehave 28 + application-prefer-dark-theme = true; 29 + }; 28 30 }; 29 31 30 32 programs.dconf.profiles.user.databases = [ ··· 32 34 settings = { 33 35 "org/gnome/desktop/wm/preferences" = { 34 36 # Both minimize and maximize do nothing in niri 35 - button-layout = "icon:close"; 37 + button-layout = ":menu,close"; 36 38 }; 37 39 "org/gnome/desktop/interface" = { 38 40 accent-color = "pink";
+32
users/leah/presets/niri/swayosd/style.css
··· 1 + /* TODO: Upstream this to catppuccin */ 2 + 3 + window#osd { 4 + border-radius: 999px; 5 + border: none; 6 + background: alpha(#1e1e2e, 0.8); 7 + } 8 + #container { 9 + margin: 16px; 10 + } 11 + progressbar:disabled, 12 + image:disabled { 13 + opacity: 0.5; 14 + } 15 + progressbar { 16 + min-height: 6px; 17 + border-radius: 999px; 18 + background: transparent; 19 + border: none; 20 + } 21 + trough { 22 + min-height: inherit; 23 + border-radius: inherit; 24 + border: none; 25 + background: alpha(#eba0ac, 0.5); 26 + } 27 + progress { 28 + min-height: inherit; 29 + border-radius: inherit; 30 + border: none; 31 + background: #eba0ac; 32 + }