meta: Switch from swayosd to avizo

Avizo seemingly has better support than swayosd in dwm, so this change
makes the OSD consistent across both environments.

Long-term it may be useful to figure out why swayosd would tile under
dwm and whether or not it'd be possible to fix upstream.
This commit is contained in:
Donovan Glover 2024-09-03 18:40:08 -04:00
parent f26cbc1aec
commit 956fbce486
No known key found for this signature in database
GPG Key ID: EA7408A77AE1BE65
3 changed files with 45 additions and 9 deletions

37
home/avizo.nix Normal file
View File

@ -0,0 +1,37 @@
{ config, lib, ... }:
let
inherit (config.lib.stylix.colors)
base01-rgb-r
base01-rgb-g
base01-rgb-b
base02-rgb-r
base02-rgb-g
base02-rgb-b
base05-rgb-r
base05-rgb-g
base05-rgb-b
;
in
{
services.avizo = {
enable = true;
settings.default = {
time = 1;
image-opacity = lib.mkForce 1;
height = 190;
padding = 10;
y-offset = 0.5;
border-width = 0;
block-height = 10;
block-spacing = 0;
fade-in = 0.2;
fade-out = 0.2;
background = lib.mkForce "rgba(${base01-rgb-r}, ${base01-rgb-g}, ${base01-rgb-b}, 1)";
border-color = lib.mkForce "rgba(${base01-rgb-r}, ${base01-rgb-g}, ${base01-rgb-b}, 1)";
bar-fg-color = lib.mkForce "rgba(${base05-rgb-r}, ${base05-rgb-g}, ${base05-rgb-b}, 1)";
bar-bg-color = lib.mkForce "rgba(${base02-rgb-r}, ${base02-rgb-g}, ${base02-rgb-b}, 1)";
};
};
}

View File

@ -230,12 +230,12 @@ in
];
bindl = [
", XF86AudioMute, exec, swayosd-client --output-volume mute-toggle"
", XF86AudioRaiseVolume, exec, swayosd-client --output-volume raise"
", XF86AudioLowerVolume, exec, swayosd-client --output-volume lower"
", XF86AudioMicMute, exec, swayosd-client --input-volume mute-toggle"
", XF86MonBrightnessDown, exec, swayosd-client --brightness lower"
", XF86MonBrightnessUp, exec, swayosd-client --brightness raise"
", XF86AudioMute, exec, volumectl -d toggle-mute"
", XF86AudioRaiseVolume, exec, volumectl -d up"
", XF86AudioLowerVolume, exec, volumectl -d down"
", XF86AudioMicMute, exec, volumectl -d -m toggle-mute"
", XF86MonBrightnessDown, exec, lightctl -d down"
", XF86MonBrightnessUp, exec, lightctl -d up"
", XF86Display, exec, ~/.config/${monitorScript}"
", XF86Messenger, togglespecialworkspace"
", XF86Favorites, exec, killall rofi || rofi -show drun"
@ -337,7 +337,6 @@ in
services = {
batsignal.enable = true;
swaync.enable = true;
swayosd.enable = true;
hyprpaper.enable = mkForce false;
};
}

View File

@ -62,8 +62,8 @@ in
{
type = "script";
cmd = "~/.config/${volumeScript}";
on_click_left = "swayosd-client --output-volume raise";
on_click_right = "swayosd-client --output-volume lower";
on_click_left = "volumectl -d up";
on_click_right = "volumectl -d down";
mode = "watch";
}
{