waybar: Add wallpaper button

This makes it possible to change the wallpaper with a button press.
Unfortunately, waybar does not support hover indicators for custom
modules, so there's no way to tell that this button is clickable.
This commit is contained in:
Donovan Glover 2023-06-30 07:49:28 -04:00
parent c53057b129
commit 77b41ce0f0
No known key found for this signature in database
GPG Key ID: EA7408A77AE1BE65

View File

@ -82,6 +82,12 @@ let
on-click-middle = "hyprctl dispatch workspace empty";
tooltip = false;
};
"custom/wallpaper" = {
format = "\n";
on-click = "bash -c ~/.config/waybar/wallpaper.sh";
tooltip = false;
};
};
in
{
@ -101,6 +107,7 @@ in
autohide-starthidden = true;
modules-left = if icons then [ "wlr/taskbar" ] else [ "wlr/workspaces" "custom/new-workspace" ];
modules-center = [ "custom/wallpaper" ];
modules-right = [ "wireplumber" "backlight" "battery" "clock" ];
};
};