From efea04cefe3bc87c0440ae9ea2fece2e35ecb2ef Mon Sep 17 00:00:00 2001 From: Sefa Eyeoglu Date: Sun, 28 Jan 2024 10:52:02 +0100 Subject: [PATCH] nixosConfigurations/desktop/sway/wob: use HM module Signed-off-by: Sefa Eyeoglu --- home/common/sway/wob.nix | 39 ------------------- nixosConfigurations/common/default.nix | 1 + .../common/desktop/sway/wob.nix | 13 +++++++ 3 files changed, 14 insertions(+), 39 deletions(-) delete mode 100644 home/common/sway/wob.nix create mode 100644 nixosConfigurations/common/desktop/sway/wob.nix diff --git a/home/common/sway/wob.nix b/home/common/sway/wob.nix deleted file mode 100644 index 8daa3c02..00000000 --- a/home/common/sway/wob.nix +++ /dev/null @@ -1,39 +0,0 @@ -{ - config, - pkgs, - ... -}: { - systemd.user.services.wob = { - Unit = { - Description = "A lightweight overlay volume/backlight/progress/anything bar for Wayland"; - Documentation = "man:wob(1)"; - PartOf = "graphical-session.target"; - After = "graphical-session.target"; - ConditionEnvironment = "WAYLAND_DISPLAY"; - }; - Service = { - StandardInput = "socket"; - ExecStart = "${pkgs.wob}/bin/wob"; - }; - Install.WantedBy = ["graphical-session.target"]; - }; - - systemd.user.sockets.wob = { - Socket = { - ListenFIFO = "%t/wob.sock"; - SocketMode = "0600"; - RemoveOnStop = "yes"; - FlushPending = "yes"; - }; - Install.WantedBy = ["sockets.target"]; - }; - - xdg.configFile."wob/wob.ini".text = with config.theme.colors; '' - border_offset=0 - border_size=2 - bar_padding=8 - border_color=${sky}ff - background_color=${crust}e6 - bar_color=${sky}ff - ''; -} diff --git a/nixosConfigurations/common/default.nix b/nixosConfigurations/common/default.nix index 8b2dfb2d..c325b945 100644 --- a/nixosConfigurations/common/default.nix +++ b/nixosConfigurations/common/default.nix @@ -12,6 +12,7 @@ ./desktop/pipewire ./desktop/qt ./desktop/sway + ./desktop/sway/wob.nix ./fish.nix ./git.nix ./gpg.nix diff --git a/nixosConfigurations/common/desktop/sway/wob.nix b/nixosConfigurations/common/desktop/sway/wob.nix new file mode 100644 index 00000000..4591d051 --- /dev/null +++ b/nixosConfigurations/common/desktop/sway/wob.nix @@ -0,0 +1,13 @@ +{config, ...}: { + hm.services.wob = { + enable = true; + settings."" = with config.theme.colors; { + border_offset = 0; + border_size = 2; + bar_padding = 8; + border_color = "${sky}ff"; + background_color = "${crust}e6"; + bar_color = "${sky}ff"; + }; + }; +} -- 2.51.2