diff --git a/modules/niri/default.nix b/modules/niri/default.nix index 2e477cd..acdd9cc 100644 --- a/modules/niri/default.nix +++ b/modules/niri/default.nix @@ -1,6 +1,8 @@ { inputs, lib, config, pkgs, ... }: let inherit (lib) mkIf; inherit (config) conf; + swayosd-style = pkgs.writeText "swayosd.css" + (import ./swayosd.css.nix { config = config; }).style; in { imports = [ ./xwl-satellite.service.nix @@ -30,13 +32,15 @@ in { home-manager.users.${conf.username} = { home.packages = with pkgs; [ - brightnessctl - swaybg swayidle - swayosd - gammastep ]; + services.swayosd = { + enable = true; + topMargin = 0.8; + stylePath = swayosd-style; + }; + programs.niri = { settings = import ./niri.conf.nix { config = config; }; }; diff --git a/modules/niri/niri.conf.nix b/modules/niri/niri.conf.nix index 4915305..83af248 100644 --- a/modules/niri/niri.conf.nix +++ b/modules/niri/niri.conf.nix @@ -18,7 +18,7 @@ in { outputs = { "eDP-1" = { - scale = 1.15; + scale = 1; mode = { width = 2736; height = 1824; @@ -56,13 +56,7 @@ in { default-column-width = { proportion = 0.5; }; - gaps = 16; - struts = { - left = -8; - right = -8; - top = -8; - bottom = -8; - }; + gaps = 2; }; window-rules = [ @@ -74,9 +68,6 @@ in { bottom-right= 8.0; }; clip-to-geometry = true; - } { - excludes = [{is-focused = true;}]; - opacity = 0.98; } ]; @@ -92,11 +83,7 @@ in { spawn-at-startup = [ { command = [ "waybar" ]; } - { command = [ "brightnessctl" "s" "50%" ]; } - { command = [ "swaybg" "-i" "${./wallpaper.png}" ]; } { command = [ "swayidle" "-w" "before-sleep" "swaylock" ]; } - { command = [ "swayosd-server" ]; } - { command = [ "gammastep" "-O" "5400" ]; } ]; binds = { diff --git a/modules/niri/swayosd.css.nix b/modules/niri/swayosd.css.nix new file mode 100644 index 0000000..7bf3d13 --- /dev/null +++ b/modules/niri/swayosd.css.nix @@ -0,0 +1,30 @@ +{ config, ... }: let + background = config.theme.overlay; + muted = config.theme.muted; + font = config.theme.text; +in { + style = '' + window#osd { + border-radius: 8px; + border: none; + background: ${background}; + } + + image, + label { + color: ${font}; + } + + progressbar { + background: ${muted}; + } + + progress:disabled { + background: ${font}; + } + + progress { + background: ${font}; + } + ''; +}