add swaync config for mobile

This commit is contained in:
Henry Hiles 2026-11-17 12:30:57 -05:00
commit 9922176f17
Signed by: Henry-Hiles
SSH key fingerprint: SHA256:VKQUdS31Q90KvX7EkKMHMBpUspcmItAh86a+v7PGiIs

View file

@ -43,6 +43,44 @@ let
${lib.getExe pkgs.niri} msg action power-off-monitors ${lib.getExe pkgs.niri} msg action power-off-monitors
exec ${config.systemd.package}/bin/systemctl suspend exec ${config.systemd.package}/bin/systemctl suspend
''; '';
swaync = pkgs.swaynotificationcenter;
swayncStyle = pkgs.writeText "swaync.css" ''
@import url("file://${swaync}/etc/xdg/swaync/style.css");
:root {
--noti-bg-focus: transparent;
--noti-border-color: transparent;
--notification-shadow: none;
--border-radius: 16px;
--notification-icon-size: 48px;
--font-size-summary: 14px;
--font-size-body: 14px;
}
.notification-row .notification-background .notification {
background: shade(@theme_bg_color, 1.25);
}
.notification-row .notification-background .notification .notification-default-action .notification-content {
padding: 6px;
}
.notification-row .notification-background .notification .notification-default-action .notification-content .text-box .body {
opacity: 0.8;
}
'';
swayncConfig = (pkgs.formats.json { }).generate "swaync.json" (
lib.importJSON "${swaync}/etc/xdg/swaync/config.json"
// {
positionX = "center";
positionY = "top";
notification-window-width = 344;
ignore-gtk-theme = false;
}
);
in in
{ {
nixpkgs.overlays = [ nixpkgs.overlays = [
@ -117,6 +155,7 @@ in
spawn-at-startup "${lib.getExe pkgs.app-grid}" spawn-at-startup "${lib.getExe pkgs.app-grid}"
spawn-at-startup "${lib.getExe stevia}" spawn-at-startup "${lib.getExe stevia}"
spawn-at-startup "${lib.getExe' pkgs.swayosd "swayosd-server"}" "--style" "${swayosdStyle}" spawn-at-startup "${lib.getExe' pkgs.swayosd "swayosd-server"}" "--style" "${swayosdStyle}"
spawn-at-startup "${lib.getExe' swaync "swaync"}" "--style" "${swayncStyle}" "--config" "${swayncConfig}"
// We log in automatically, so lock straight away. // We log in automatically, so lock straight away.
spawn-at-startup "${config.quad.lock}" spawn-at-startup "${config.quad.lock}"
spawn-at-startup "${lib.getExe pkgs.hypridle}" "--config" "${hypridleConfig}" spawn-at-startup "${lib.getExe pkgs.hypridle}" "--config" "${hypridleConfig}"