From 2033b6bb6184af07a453d3422a5d9dc6170b5459 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miskolczi=20Rich=C3=A1rd?= Date: Fri, 10 Apr 2026 03:01:06 +0200 Subject: [PATCH] Declared swayosd config --- hyprland/raw/swayosd.nix | 110 +++++++++++++++++++++++++++++++++++++++ modules/hyprland.nix | 1 + 2 files changed, 111 insertions(+) create mode 100644 hyprland/raw/swayosd.nix diff --git a/hyprland/raw/swayosd.nix b/hyprland/raw/swayosd.nix new file mode 100644 index 0000000..e7445f9 --- /dev/null +++ b/hyprland/raw/swayosd.nix @@ -0,0 +1,110 @@ +{ lib, config, ... }: + +let + theme = "dark"; +in +{ + home.file.".config/swayosd/style_dark.css".text = '' +window#osd { + border-radius: 0px; + border: 2px solid #EBDBB2; + background: #32302F; + + #container { + margin: 16px; + } + + image, + label { + color: #EBDBB2; + } + + progressbar:disabled, + image:disabled { + opacity: 1; + } + + progressbar, + segmentedprogress { + min-height: 6px; + border-radius: 0px; + background: transparent; + border: none; + } + trough, + segment { + min-height: inherit; + border-radius: 0px; + border: none; + background: #{"alpha(@theme_fg_color, 0.5)"}; + } + progress, + segment.active { + min-height: inherit; + border-radius: 0px; + border: none; + background: #{"@theme_fg_color"}; + } + + segment { + margin-left: 8px; + &:first-child { + margin-left: 0; + } + } +} + ''; + + home.file.".config/swayosd/style_light.css".text = '' +window#osd { + border-radius: 0px; + border: 2px solid #D5C4A1; + background: #EBDBB2; + + #container { + margin: 16px; + } + + image, + label { + color: #EBDBB2; + } + + progressbar:disabled, + image:disabled { + opacity: 1; + } + + progressbar, + segmentedprogress { + min-height: 6px; + border-radius: 0px; + background: transparent; + border: none; + } + trough, + segment { + min-height: inherit; + border-radius: 0px; + border: none; + background: #{"alpha(@theme_fg_color, 0.5)"}; + } + progress, + segment.active { + min-height: inherit; + border-radius: 0px; + border: none; + background: #{"@theme_fg_color"}; + } + + segment { + margin-left: 8px; + &:first-child { + margin-left: 0; + } + } +} + ''; + + home.file.".config/swayosd/style.css".source = config.home.file.".config/swayosd/style_${theme}.css".source; +} diff --git a/modules/hyprland.nix b/modules/hyprland.nix index 3e06090..2c31696 100644 --- a/modules/hyprland.nix +++ b/modules/hyprland.nix @@ -18,5 +18,6 @@ ../hyprland/raw/fuzzel.nix ../hyprland/raw/waybar.nix ../hyprland/raw/swaync.nix + ../hyprland/raw/swayosd.nix ]; }