From 189dd9c33964589505221631039e81fc0c4ae27e Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Sat, 7 Feb 2026 16:02:50 -0800 Subject: [PATCH] taffybar: use button and overlay controllers for workspace widget Wire up hyprlandBuildButtonController and hyprlandBuildCustomOverlayController so workspace buttons are clickable and the overlay layout is explicitly configured. Co-Authored-By: Claude Opus 4.6 --- dotfiles/config/taffybar/taffybar.hs | 35 ++++++++++++++++------------ 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/dotfiles/config/taffybar/taffybar.hs b/dotfiles/config/taffybar/taffybar.hs index c48bfda1..b17cbef1 100644 --- a/dotfiles/config/taffybar/taffybar.hs +++ b/dotfiles/config/taffybar/taffybar.hs @@ -364,21 +364,26 @@ buildAlignedOverlay halign valign iconsWidget labelWidget = liftIO $ do hyprlandWorkspacesWidget :: TaffyIO Gtk.Widget hyprlandWorkspacesWidget = flip widgetSetClassGI "workspaces" =<< - Hyprland.hyprlandWorkspacesNew - Hyprland.defaultHyprlandWorkspacesConfig - { Hyprland.widgetGap = 0 - , Hyprland.minIcons = 1 - , Hyprland.widgetBuilder = buildAlignedOverlay Gtk.AlignStart Gtk.AlignEnd - -- Don't show Hyprland "special:*" workspaces. - , Hyprland.showWorkspaceFn = - \ws -> - Hyprland.workspaceState ws /= X11Workspaces.Empty && - not (isSpecialHyprWorkspace ws) - , Hyprland.getWindowIconPixbuf = - hyprlandManualIconGetter <|||> - Hyprland.defaultHyprlandGetWindowIconPixbuf <|||> - hyprlandFallbackIcon - } + Hyprland.hyprlandWorkspacesNew cfg + where + cfg = Hyprland.defaultHyprlandWorkspacesConfig + { Hyprland.widgetGap = 0 + , Hyprland.minIcons = 1 + , Hyprland.widgetBuilder = + Hyprland.hyprlandBuildButtonController cfg + (Hyprland.hyprlandBuildCustomOverlayController + (buildAlignedOverlay Gtk.AlignStart Gtk.AlignEnd) + cfg) + -- Don't show Hyprland "special:*" workspaces. + , Hyprland.showWorkspaceFn = + \ws -> + Hyprland.workspaceState ws /= X11Workspaces.Empty && + not (isSpecialHyprWorkspace ws) + , Hyprland.getWindowIconPixbuf = + hyprlandManualIconGetter <|||> + Hyprland.defaultHyprlandGetWindowIconPixbuf <|||> + hyprlandFallbackIcon + } clockWidget :: TaffyIO Gtk.Widget clockWidget =