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 <noreply@anthropic.com>
This commit is contained in:
@@ -364,21 +364,26 @@ buildAlignedOverlay halign valign iconsWidget labelWidget = liftIO $ do
|
|||||||
hyprlandWorkspacesWidget :: TaffyIO Gtk.Widget
|
hyprlandWorkspacesWidget :: TaffyIO Gtk.Widget
|
||||||
hyprlandWorkspacesWidget =
|
hyprlandWorkspacesWidget =
|
||||||
flip widgetSetClassGI "workspaces" =<<
|
flip widgetSetClassGI "workspaces" =<<
|
||||||
Hyprland.hyprlandWorkspacesNew
|
Hyprland.hyprlandWorkspacesNew cfg
|
||||||
Hyprland.defaultHyprlandWorkspacesConfig
|
where
|
||||||
{ Hyprland.widgetGap = 0
|
cfg = Hyprland.defaultHyprlandWorkspacesConfig
|
||||||
, Hyprland.minIcons = 1
|
{ Hyprland.widgetGap = 0
|
||||||
, Hyprland.widgetBuilder = buildAlignedOverlay Gtk.AlignStart Gtk.AlignEnd
|
, Hyprland.minIcons = 1
|
||||||
-- Don't show Hyprland "special:*" workspaces.
|
, Hyprland.widgetBuilder =
|
||||||
, Hyprland.showWorkspaceFn =
|
Hyprland.hyprlandBuildButtonController cfg
|
||||||
\ws ->
|
(Hyprland.hyprlandBuildCustomOverlayController
|
||||||
Hyprland.workspaceState ws /= X11Workspaces.Empty &&
|
(buildAlignedOverlay Gtk.AlignStart Gtk.AlignEnd)
|
||||||
not (isSpecialHyprWorkspace ws)
|
cfg)
|
||||||
, Hyprland.getWindowIconPixbuf =
|
-- Don't show Hyprland "special:*" workspaces.
|
||||||
hyprlandManualIconGetter <|||>
|
, Hyprland.showWorkspaceFn =
|
||||||
Hyprland.defaultHyprlandGetWindowIconPixbuf <|||>
|
\ws ->
|
||||||
hyprlandFallbackIcon
|
Hyprland.workspaceState ws /= X11Workspaces.Empty &&
|
||||||
}
|
not (isSpecialHyprWorkspace ws)
|
||||||
|
, Hyprland.getWindowIconPixbuf =
|
||||||
|
hyprlandManualIconGetter <|||>
|
||||||
|
Hyprland.defaultHyprlandGetWindowIconPixbuf <|||>
|
||||||
|
hyprlandFallbackIcon
|
||||||
|
}
|
||||||
|
|
||||||
clockWidget :: TaffyIO Gtk.Widget
|
clockWidget :: TaffyIO Gtk.Widget
|
||||||
clockWidget =
|
clockWidget =
|
||||||
|
|||||||
Reference in New Issue
Block a user