From 0d63f3e72fc4f739afefd93c1fb0a7150891d9e5 Mon Sep 17 00:00:00 2001 From: xbazzi Date: Sat, 9 Aug 2025 12:22:36 -0600 Subject: [PATCH] Quickshell live auto reload --- home/quickshell.nix | 17 +++++++++++++++++ home/quickshell/shell.qml | 2 -- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/home/quickshell.nix b/home/quickshell.nix index 57f639f..3ae9603 100644 --- a/home/quickshell.nix +++ b/home/quickshell.nix @@ -12,6 +12,23 @@ wayland.windowManager.hyprland.settings.exec-once = [ "quickshell -c default" ]; + + # auto reload + systemd.user.services.quickshell = { + Unit = { Description = "Quickshell bar"; PartOf = [ "graphical-session.target" ]; }; + Service = { + ExecStart = "${pkgs.quickshell}/bin/quickshell -c default"; + Restart = "always"; + }; + Install = { WantedBy = [ "default.target" ]; }; + }; + + # Restart service when config changes (needs systemd 245+; HM supports Path units) + systemd.user.paths.quickshell-watch = { + Unit = { Description = "Watch Quickshell config"; }; + Path = { PathChanged = "%h/.config/quickshell"; }; + Install = { WantedBy = [ "default.target" ]; }; + }; # write the Quickshell config # xdg.configFile."quickshell/default/shell.qml".text = '' diff --git a/home/quickshell/shell.qml b/home/quickshell/shell.qml index f2192ba..386a139 100644 --- a/home/quickshell/shell.qml +++ b/home/quickshell/shell.qml @@ -26,8 +26,6 @@ Variants { Text { id: clock //anchors.centerIn: parent - anchors.top: true - anchors.left: true font.pixelSize: 13 color: "#e6e6e6" }