zaphyra's git: nixfiles

zaphyra's nixfiles

commit c5c9fb5b8ee07a985e0c0b69e9d3b4ce22561b2e
parent 94797ed7fe0d0af3b3f32bd953c65c5911e5e161
Author: Katja Ramona Sophie Kwast (zaphyra) <git@zaphyra.eu>
Date: Sat, 30 Aug 2025 22:37:26 +0200

config/home-manager/zaphyra: some riceing
6 files changed, 332 insertions(+), 216 deletions(-)
M
config/home-manager/zaphyra/configure/niri.nix
|
23
++++++++++++++++++-----
M
config/home-manager/zaphyra/programs/niri.nix
|
413
+++++++++++++++++++++++++++++++++++++++----------------------------------------
A
config/home-manager/zaphyra/programs/nmgui.nix
|
18
++++++++++++++++++
M
config/home-manager/zaphyra/services/swaync.nix
|
87
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---
M
config/home-manager/zaphyra/services/waybar.nix
|
4
+++-
M
config/home-manager/zaphyra/services/wob.nix
|
3
+++
diff --git a/config/home-manager/zaphyra/configure/niri.nix b/config/home-manager/zaphyra/configure/niri.nix
@@ -56,6 +56,17 @@
   gtk = {
     enable = true;
 
+    gtk3.extraConfig = {
+      gtk-theme = "adw-gtk3-dark";
+      gtk-application-prefer-dark-theme = 1;
+    };
+
+    font = {
+      name = "Adwaita Sans";
+      size = 11;
+      package = pkgs.adwaita-fonts;
+    };
+
     iconTheme = {
       name = "Adwaita-green";
       package = pkgs.tgc.adwaita-colors-icon-theme;

@@ -65,18 +76,20 @@
       name = "Adwaita";
       package = pkgs.adwaita-icon-theme;
     };
+  };
 
-    gtk3.extraConfig = {
-      gtk-application-prefer-dark-theme = 1;
-      gtk-theme-name = "adw-gtk3-dark";
+  qt = {
+    enable = true;
+    platformTheme.name = "Adwaita-dark";
+    style = {
+      name = "Adwaita-dark";
+      package = pkgs.adwaita-qt6;
     };
   };
 
   home.packages = with pkgs; [
     xdg-utils
-    qgnomeplatform
     wl-clipboard-rs
-    # look and feel from libadwaita ported to GTK-3
     adw-gtk3
   ];
 
diff --git a/config/home-manager/zaphyra/programs/niri.nix b/config/home-manager/zaphyra/programs/niri.nix
@@ -8,245 +8,244 @@
 
 {
 
-  programs.niri = {
-    settings = {
-      input = {
-        workspace-auto-back-and-forth = true;
-
-        focus-follows-mouse = {
-          enable = true;
-          max-scroll-amount = "0%";
-        };
-
-        touchpad.click-method = "clickfinger";
+  programs.niri.settings = {
+    input = {
+      workspace-auto-back-and-forth = true;
 
-        keyboard.xkb = {
-          layout = "us,de,ru";
-          variant = "mac,qwerty,mac";
-          options = "grp:alt_shift_toggle";
-        };
+      focus-follows-mouse = {
+        enable = true;
+        max-scroll-amount = "0%";
       };
 
-      outputs."eDP-1".scale = 1;
+      touchpad.click-method = "clickfinger";
 
-      cursor.theme = config.gtk.cursorTheme.name;
+      keyboard.xkb = {
+        layout = "us,de,ru";
+        variant = "mac,qwerty,mac";
+        options = "grp:alt_shift_toggle";
+      };
+    };
 
-      gestures.hot-corners.enable = false;
+    outputs."eDP-1".scale = 1;
 
-      layout = {
-        always-center-single-column = true;
-        gaps = 15;
+    cursor.theme = config.gtk.cursorTheme.name;
 
-        default-column-width = {
-          proportion = 1.0;
-        };
+    gestures.hot-corners.enable = false;
 
-        focus-ring = {
-          width = 2;
-          inactive.color = "rgba(59, 135, 86, .9)";
-          active.color = "rgba(74, 169, 108, .9)";
-        };
+    layout = {
+      always-center-single-column = true;
+      gaps = 15;
 
-        tab-indicator = {
-          gaps-between-tabs = 10;
-          position = "top";
-        };
-      }
-      // (lib.genAttrs [ "preset-column-widths" "preset-window-heights" ] (name: [
-        { proportion = 1.0; }
-        { proportion = 0.75; }
-        { proportion = 0.5; }
-        { proportion = 1.0 / 3.0; }
-        { proportion = 0.25; }
-      ]));
-
-      environment = {
-        QT_QPA_PLATFORM = "wayland";
-        QT_WAYLAND_FORCE_DPI = "physical";
-        QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
+      default-column-width = {
+        proportion = 1.0;
       };
 
-      prefer-no-csd = true;
+      focus-ring = {
+        width = 2;
+        inactive.color = "rgba(59, 135, 86, .9)";
+        active.color = "rgba(74, 169, 108, .9)";
+      };
 
-      workspaces = {
-        "01-Web".name = "Web";
-        "02-Mail".name = "Mail";
-        "03-Term".name = "Term";
-        "04-Chat".name = "Chat";
+      tab-indicator = {
+        gaps-between-tabs = 10;
+        position = "top";
       };
+    }
+    // (lib.genAttrs [ "preset-column-widths" "preset-window-heights" ] (name: [
+      { proportion = 1.0; }
+      { proportion = 0.75; }
+      { proportion = 0.5; }
+      { proportion = 1.0 / 3.0; }
+      { proportion = 0.25; }
+    ]));
+
+    environment = {
+      QT_QPA_PLATFORM = "wayland";
+      QT_WAYLAND_FORCE_DPI = "physical";
+      QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
+    };
 
-      window-rules = [
-        {
-          shadow.enable = true;
-          matches = [
-            {
-              is-floating = true;
-            }
-          ];
-        }
-        {
-          geometry-corner-radius = lib.genAttrs [ "bottom-left" "bottom-right" "top-left" "top-right" ] (
-            name: 6.0
-          );
-          clip-to-geometry = true;
-        }
-        {
-          matches = [
-            {
-              at-startup = true;
-              app-id = "org.gnome.Fractal$";
-            }
-            {
-              at-startup = true;
-              app-id = "im.dino.Dino$";
-            }
-            {
-              at-startup = true;
-              app-id = "org.gajim.Gajim$";
-            }
-          ];
-
-          open-on-workspace = "Chat";
-          default-column-display = "tabbed";
-        }
-        {
-          matches = [
-            { app-id = "firefox$"; }
-            { app-id = "thunderbird$"; }
-          ];
-
-          open-maximized = true;
-        }
-        {
-          matches = [
-            { app-id = "org.gnome.NautilusPreviewer$"; }
-          ];
-
-          open-floating = true;
-        }
-        {
-          matches = [
-            { app-id = "thunderbird$"; }
-          ];
-
-          open-on-workspace = "Mail";
-        }
-        {
-          matches = [
-            {
-              app-id = "firefox$";
-              title = "^Picture-in-Picture$";
-            }
-          ];
-
-          open-floating = true;
-          default-column-width.fixed = 480;
-          default-window-height.fixed = 270;
-          default-floating-position = {
-            x = 32;
-            y = 32;
-            relative-to = "bottom-right";
-          };
-        }
-      ];
-
-      binds = with config.lib.niri.actions; {
-        "Mod+Shift+E".action = quit;
-        "Mod+Space".action = lib.mkDefault (spawn (lib.getExe pkgs.fuzzel));
-        "Mod+Return".action = lib.mkDefault (spawn config.home.sessionVariables.TERMINAL);
-
-        "Mod+L".action = spawn (lib.getExe' pkgs.systemd "loginctl") "lock-session";
-        "Mod+Z".action = power-off-monitors;
-        # "Mod+Z".action = spawn (lib.getExe' pkgs.systemd "systemctl") "suspend";
-
-        "Mod+W" = {
-          action = close-window;
-          repeat = false;
-        };
+    prefer-no-csd = true;
 
-        "XF86AudioRaiseVolume" = {
-          allow-when-locked = true;
-          action = lib.mkDefault (spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "1%+");
-        };
-        "XF86AudioLowerVolume" = {
-          allow-when-locked = true;
-          action = lib.mkDefault (spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "1%-");
-        };
-        "XF86MonBrightnessUp" = {
-          allow-when-locked = true;
-          action = lib.mkDefault (spawn (lib.getExe pkgs.brightnessctl) "s" "+5%");
-        };
-        "XF86MonBrightnessDown" = {
-          allow-when-locked = true;
-          action = lib.mkDefault (spawn (lib.getExe pkgs.brightnessctl) "s" "5%-");
+    workspaces = {
+      "01-Web".name = "Web";
+      "02-Mail".name = "Mail";
+      "03-Term".name = "Term";
+      "04-Chat".name = "Chat";
+    };
+
+    window-rules = [
+      {
+        shadow.enable = true;
+        matches = [
+          {
+            is-floating = true;
+          }
+        ];
+      }
+      {
+        geometry-corner-radius = lib.genAttrs [ "bottom-left" "bottom-right" "top-left" "top-right" ] (
+          name: 6.0
+        );
+        clip-to-geometry = true;
+      }
+      {
+        matches = [
+          {
+            at-startup = true;
+            app-id = "org.gnome.Fractal$";
+          }
+          {
+            at-startup = true;
+            app-id = "im.dino.Dino$";
+          }
+          {
+            at-startup = true;
+            app-id = "org.gajim.Gajim$";
+          }
+        ];
+
+        open-on-workspace = "Chat";
+        default-column-display = "tabbed";
+      }
+      {
+        matches = [
+          { app-id = "firefox$"; }
+          { app-id = "thunderbird$"; }
+        ];
+
+        open-maximized = true;
+      }
+      {
+        matches = [
+          { app-id = "org.gnome.NautilusPreviewer$"; }
+        ];
+
+        open-floating = true;
+      }
+      {
+        matches = [
+          { app-id = "thunderbird$"; }
+        ];
+
+        open-on-workspace = "Mail";
+      }
+      {
+        matches = [
+          {
+            app-id = "firefox$";
+            title = "^Picture-in-Picture$";
+          }
+        ];
+
+        open-floating = true;
+        default-column-width.fixed = 480;
+        default-window-height.fixed = 270;
+        default-floating-position = {
+          x = 32;
+          y = 32;
+          relative-to = "bottom-right";
         };
+      }
+    ];
+
+    binds = with config.lib.niri.actions; {
+      "Mod+Shift+E".action = quit;
+      "Mod+Space".action = lib.mkDefault (spawn (lib.getExe pkgs.fuzzel));
+      "Mod+Return".action = lib.mkDefault (spawn config.home.sessionVariables.TERMINAL);
 
-        "Mod+Tab".action = toggle-overview;
+      "Mod+L".action = spawn (lib.getExe' pkgs.systemd "loginctl") "lock-session";
+      "Mod+Z".action = power-off-monitors;
+      # "Mod+Z".action = spawn (lib.getExe' pkgs.systemd "systemctl") "suspend";
 
-        "Mod+1".action = focus-workspace "Web";
-        "Mod+2".action = focus-workspace "Mail";
-        "Mod+3".action = focus-workspace "Term";
-        "Mod+4".action = focus-workspace "Chat";
-        "Mod+5".action = focus-workspace 5;
-        "Mod+6".action = focus-workspace 6;
-        "Mod+7".action = focus-workspace 7;
-        "Mod+8".action = focus-workspace 8;
-        "Mod+9".action = focus-workspace 9;
+      "Mod+W" = {
+        action = close-window;
+        repeat = false;
+      };
 
-        "Mod+Shift+1".action.move-column-to-workspace = "Web";
-        "Mod+Shift+2".action.move-column-to-workspace = "Mail";
-        "Mod+Shift+3".action.move-column-to-workspace = "Term";
-        "Mod+Shift+4".action.move-column-to-workspace = "Chat";
-        "Mod+Shift+5".action.move-column-to-workspace = 5;
-        "Mod+Shift+6".action.move-column-to-workspace = 6;
-        "Mod+Shift+7".action.move-column-to-workspace = 7;
-        "Mod+Shift+8".action.move-column-to-workspace = 8;
-        "Mod+Shift+9".action.move-column-to-workspace = 9;
+      "XF86AudioRaiseVolume" = {
+        allow-when-locked = true;
+        action = lib.mkDefault (spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "1%+");
+      };
+      "XF86AudioLowerVolume" = {
+        allow-when-locked = true;
+        action = lib.mkDefault (spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "1%-");
+      };
+      "XF86MonBrightnessUp" = {
+        allow-when-locked = true;
+        action = lib.mkDefault (spawn (lib.getExe pkgs.brightnessctl) "s" "+5%");
+      };
+      "XF86MonBrightnessDown" = {
+        allow-when-locked = true;
+        action = lib.mkDefault (spawn (lib.getExe pkgs.brightnessctl) "s" "5%-");
+      };
 
-        "Mod+Prior".action = focus-workspace-up;
-        "Mod+Next".action = focus-workspace-down;
+      "Mod+Tab".action = toggle-overview;
 
-        "Mod+Shift+Prior".action = move-window-up-or-to-workspace-up;
-        "Mod+Shift+Next".action = move-window-down-or-to-workspace-down;
+      "Mod+1".action = focus-workspace "Web";
+      "Mod+2".action = focus-workspace "Mail";
+      "Mod+3".action = focus-workspace "Term";
+      "Mod+4".action = focus-workspace "Chat";
+      "Mod+5".action = focus-workspace 5;
+      "Mod+6".action = focus-workspace 6;
+      "Mod+7".action = focus-workspace 7;
+      "Mod+8".action = focus-workspace 8;
+      "Mod+9".action = focus-workspace 9;
 
-        "Mod+Ctrl+Prior".action = focus-monitor-up;
-        "Mod+Ctrl+Next".action = focus-monitor-down;
+      "Mod+Shift+1".action.move-column-to-workspace = "Web";
+      "Mod+Shift+2".action.move-column-to-workspace = "Mail";
+      "Mod+Shift+3".action.move-column-to-workspace = "Term";
+      "Mod+Shift+4".action.move-column-to-workspace = "Chat";
+      "Mod+Shift+5".action.move-column-to-workspace = 5;
+      "Mod+Shift+6".action.move-column-to-workspace = 6;
+      "Mod+Shift+7".action.move-column-to-workspace = 7;
+      "Mod+Shift+8".action.move-column-to-workspace = 8;
+      "Mod+Shift+9".action.move-column-to-workspace = 9;
 
-        "Mod+Left".action = focus-column-left;
-        "Mod+Right".action = focus-column-right;
-        "Mod+Up".action = focus-window-or-workspace-up;
-        "Mod+Down".action = focus-window-or-workspace-down;
+      "Mod+Prior".action = focus-workspace-up;
+      "Mod+Next".action = focus-workspace-down;
 
-        "Mod+Shift+Left".action = move-column-left;
-        "Mod+Shift+Right".action = move-column-right;
-        "Mod+Shift+Up".action = move-window-up;
-        "Mod+Shift+Down".action = move-window-down;
+      "Mod+Shift+Prior".action = move-window-up-or-to-workspace-up;
+      "Mod+Shift+Next".action = move-window-down-or-to-workspace-down;
 
-        "Mod+R".action = switch-preset-column-width;
-        "Mod+Shift+R".action = switch-preset-window-height;
-        "Mod+Ctrl+R".action = reset-window-height;
+      "Mod+Ctrl+Prior".action = focus-monitor-up;
+      "Mod+Ctrl+Next".action = focus-monitor-down;
 
-        "Mod+C".action = center-window;
+      "Mod+Left".action = focus-column-left;
+      "Mod+Right".action = focus-column-right;
+      "Mod+Up".action = focus-window-or-workspace-up;
+      "Mod+Down".action = focus-window-or-workspace-down;
 
-        "Mod+F".action = maximize-column;
-        "Mod+Ctrl+F".action = expand-column-to-available-width;
-        "Mod+Shift+F".action = fullscreen-window;
-        "Mod+Alt+F".action = set-column-width "50%";
+      "Mod+Shift+Left".action = move-column-left;
+      "Mod+Shift+Right".action = move-column-right;
+      "Mod+Shift+Up".action = move-window-up;
+      "Mod+Shift+Down".action = move-window-down;
 
-        "Mod+Minus".action = set-column-width "-10%";
-        "Mod+Equal".action = set-column-width "+10%";
-        "Mod+Shift+Minus".action = set-window-height "-10%";
-        "Mod+Shift+Equal".action = set-window-height "+10%";
+      "Mod+R".action = switch-preset-column-width;
+      "Mod+Shift+R".action = switch-preset-window-height;
+      "Mod+Ctrl+R".action = reset-window-height;
 
-        "Mod+Shift+Space".action = toggle-window-floating;
+      "Mod+C".action = center-window;
 
-        "Mod+Shift+Return".action = spawn (lib.getExe pkgs.tgc.nirius) "toggle-follow-mode";
+      "Mod+F".action = maximize-column;
+      "Mod+Ctrl+F".action = expand-column-to-available-width;
+      "Mod+Shift+F".action = fullscreen-window;
+      "Mod+Alt+F".action = set-column-width "50%";
 
-        "Mod+T".action = toggle-column-tabbed-display;
+      "Mod+Minus".action = set-column-width "-10%";
+      "Mod+Equal".action = set-column-width "+10%";
+      "Mod+Shift+Minus".action = set-window-height "-10%";
+      "Mod+Shift+Equal".action = set-window-height "+10%";
 
-        "Print".action = screenshot;
-        "Alt+Print".action = screenshot-window;
-      };
+      "Mod+Shift+Space".action = toggle-window-floating;
+
+      "Mod+Shift+Return".action = spawn (lib.getExe pkgs.tgc.nirius) "toggle-follow-mode";
+
+      "Mod+T".action = toggle-column-tabbed-display;
+
+      "Mod+Print".action = spawn (lib.getExe pkgs.hyprpicker) "--lowercase-hex" "--autocopy";
+      "Print".action = screenshot;
+      "Alt+Print".action = screenshot-window;
     };
   };
 
diff --git a/config/home-manager/zaphyra/programs/nmgui.nix b/config/home-manager/zaphyra/programs/nmgui.nix
@@ -0,0 +1,18 @@
+{ pkgs, ... }:
+
+{
+
+  home.packages = [ pkgs.unstable.nmgui ];
+
+  programs.niri.settings.window-rules = [
+    {
+      matches = [ { app-id = "com.network.manager$"; } ];
+
+      open-floating = true;
+      open-focused = true;
+      default-column-width.fixed = 500;
+      default-window-height.fixed = 600;
+    }
+  ];
+
+}
diff --git a/config/home-manager/zaphyra/services/swaync.nix b/config/home-manager/zaphyra/services/swaync.nix
@@ -34,6 +34,7 @@
         "volume"
         "title"
       ];
+
       widget-config = {
         volume.label = "";
         backlight.label = "󰃟";

@@ -80,7 +81,7 @@
           {
             type = "toggle";
             active = true;
-            label = "KB";
+            label = "󰥻 󰛨";
             command = "sh -c '[[ $SWAYNC_TOGGLE_STATE == true ]] && ${lib.getExe pkgs.brightnessctl} --device='tpacpi::kbd_backlight' set 1 || ${lib.getExe pkgs.brightnessctl} --device='tpacpi::kbd_backlight' set 0'";
             update-command = "sh -c '[[ $(${lib.getExe pkgs.brightnessctl} --device='tpacpi::kbd_backlight' get) == \"1\" ]] && echo true || echo false'";
           }

@@ -113,7 +114,7 @@
       }
 
       .control-center {
-        background-color: #303030;
+        background-color: #222226;
         border-radius: 0 0 10px 10px;
         border: 2px solid @border-color;
         border-top: 0;

@@ -161,14 +162,94 @@
 
       /* Sliders */
       scale {
-        padding: 0px;
+        padding: 2px;
         margin: 0px 5px 0px 5px;
       }
 
+      scale trough {
+        background: rgba(255, 255, 255, 0.06);
+      }
+
       scale highlight {
         background: rgb(74, 169, 108);
         border-radius: 5px;
       }
+
+
+      /* Notification */
+      .control-center .notification {
+        box-shadow: unset;
+        background: rgba(47, 47, 51, 0.95);
+        border: 1px solid @border-color;
+      }
+
+      .close-button {
+        border-radius: 0;
+        margin-top: 0;
+        margin-right: -2px;
+        background: unset;
+      }
+
+      .close-button:hover {
+        background: rgba(255, 255, 255, 0.1);
+        border-bottom-left-radius: 4px;
+        border-top-right-radius: 4px;
+      }
+
+      .notification-group-headers {
+        margin-bottom: 4px;
+      }
+
+      .notification-group-icon {
+        opacity: 0;
+      }
+
+      .notification-group .notification-group-header {
+        font-weight: 400;
+        font-size: 16pt;
+      }
+
+      .notification-group .notification-group-buttons {
+        margin: 4px;
+      }
+
+      .notification-group-collapse-button,
+      .notification-group-close-all-button {
+        border-radius: 4px;
+        background: rgba(47, 47, 51, 0.95);
+        border: 1px solid @border-color;
+        margin: 0 4px;
+      }
+
+      .notification-background {
+        padding: 5px 5px;
+      }
+
+      .notification {
+        background: rgba(0, 0, 0, 0.5);
+        border: 2px solid rgba(59, 135, 86, 0.5);
+        border-radius: 4px;
+      }
+
+      .notification .notification-default-action:hover,
+      .notification button:hover {
+        background: rgba(255, 255, 255, 0.06);
+        border-radius: 0;
+      }
+
+      .notification .text-box {
+        margin: 2px;
+      }
+
+      .notification .text-box .image {
+        border-radius: 10px;
+      }
+
+      .notification .text-box .time {
+        font-weight: 200;
+        font-size: 13px;
+        margin-right: 0;
+      }
     '';
   };
 
diff --git a/config/home-manager/zaphyra/services/waybar.nix b/config/home-manager/zaphyra/services/waybar.nix
@@ -10,6 +10,7 @@
 
   imports = with homeManagerModules.zaphyra; [
     programs.networkManagerDmenu
+    programs.nmgui
   ];
 
   programs.waybar = {

@@ -96,7 +97,8 @@
             interval = 5;
             # family = "ipv4_6";
 
-            on-click = lib.getExe pkgs.networkmanager_dmenu;
+            # on-click = lib.getExe pkgs.networkmanager_dmenu;
+            on-click = lib.getExe pkgs.unstable.nmgui;
 
             tooltip-format = lib.concatStringsSep "\n" format;
             tooltip-format-wifi = lib.concatStringsSep "\n" (
diff --git a/config/home-manager/zaphyra/services/wob.nix b/config/home-manager/zaphyra/services/wob.nix
@@ -11,6 +11,9 @@
     enable = true;
     settings."" = {
       anchor = "top center";
+      background_color = "00000080";
+      border_color = "4aa96ce6";
+      bar_color = "ffffffa6";
     };
   };