From 01de409d186fa95549c5363dc209cb54aebced9f Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Thu, 2 Jul 2026 14:13:46 -0700 Subject: [PATCH] taffybar: consume released SNI tray hang fix Bump the taffybar submodule to master (f0302a78), which merges the status-notifier-item startup DBus-call timeouts (status-notifier-item 0.3.2.15 / gtk-sni-tray 0.2.1.3 / taffybar 7.2.5, all published to Hackage). This fixes the tray host hanging indefinitely on an unresponsive tray item, which had been emptying the tray via the config-side timeout fallback. Drop that now-unnecessary fallback from TaffybarConfig.Widgets (the SNI tray is built directly again), and point the config flake at the vendored submodule checkout so rebuilds consume the same tree used for local development. Co-Authored-By: Claude Opus 4.8 --- .../config/taffybar/TaffybarConfig/Widgets.hs | 18 +++--------------- dotfiles/config/taffybar/flake.lock | 16 ++++++---------- dotfiles/config/taffybar/flake.nix | 17 ++++------------- dotfiles/config/taffybar/taffybar | 2 +- 4 files changed, 14 insertions(+), 39 deletions(-) diff --git a/dotfiles/config/taffybar/TaffybarConfig/Widgets.hs b/dotfiles/config/taffybar/TaffybarConfig/Widgets.hs index ce417101..50e70d4d 100644 --- a/dotfiles/config/taffybar/TaffybarConfig/Widgets.hs +++ b/dotfiles/config/taffybar/TaffybarConfig/Widgets.hs @@ -11,7 +11,6 @@ where import Control.Concurrent (threadDelay) import Control.Monad.IO.Class (liftIO) -import Control.Monad.Trans.Reader (ask, runReaderT) import Data.Char (toLower) import Data.Maybe (fromMaybe) import Data.Ratio ((%)) @@ -55,7 +54,6 @@ import System.Taffybar.Widget.Util ) import qualified System.Taffybar.Widget.Wlsunset as Wlsunset import qualified System.Taffybar.Widget.Workspaces as Workspaces -import System.Timeout (timeout) import TaffybarConfig.AIUsage (aiUsageWidget) import TaffybarConfig.Host (laptopHosts) import TaffybarConfig.WidgetUtil @@ -409,19 +407,9 @@ sniTrayWidget = do prioritizedCollapsibleSNITrayVisibilityThreshold = Just visibilityThreshold, prioritizedCollapsibleSNITrayHoverExpand = True } - buildSNITray = - decorateWithClassAndBoxM - "sni-tray" - (sniTrayPrioritizedCollapsibleNewFromParams prioritizedParams) - context <- ask - liftIO $ do - maybeTray <- timeout (3 * 1000000) (runReaderT buildSNITray context) - case maybeTray of - Just tray -> return tray - Nothing -> do - fallback <- Gtk.boxNew Gtk.OrientationHorizontal 0 - _ <- widgetSetClassGI fallback "sni-tray-unavailable" - Gtk.toWidget fallback + decorateWithClassAndBoxM + "sni-tray" + (sniTrayPrioritizedCollapsibleNewFromParams prioritizedParams) startWidgetsForBackend :: Backend -> [TaffyIO Gtk.Widget] startWidgetsForBackend backend = diff --git a/dotfiles/config/taffybar/flake.lock b/dotfiles/config/taffybar/flake.lock index 274bf410..99ae520e 100644 --- a/dotfiles/config/taffybar/flake.lock +++ b/dotfiles/config/taffybar/flake.lock @@ -136,18 +136,14 @@ "xmonad-contrib": "xmonad-contrib" }, "locked": { - "lastModified": 1781172310, - "narHash": "sha256-mBd3obUUS+ICqL+U2bOanGwaGl2rfbMZdGzAFiqRSaE=", - "owner": "taffybar", - "repo": "taffybar", - "rev": "7beecc89928df669281977e41ceed213c5ede88f", - "type": "github" + "lastModified": 1783024760, + "narHash": "sha256-sNu7UVJ0ExuLPYdJakrDvD1AEqyfbmibMdOGKIwbuiA=", + "path": "/srv/dotfiles/dotfiles/config/taffybar/taffybar", + "type": "path" }, "original": { - "owner": "taffybar", - "ref": "anthropic-usage-rate-limit-backoff", - "repo": "taffybar", - "type": "github" + "path": "/srv/dotfiles/dotfiles/config/taffybar/taffybar", + "type": "path" } }, "weeder-nix": { diff --git a/dotfiles/config/taffybar/flake.nix b/dotfiles/config/taffybar/flake.nix index cfcc5375..6635c9c0 100644 --- a/dotfiles/config/taffybar/flake.nix +++ b/dotfiles/config/taffybar/flake.nix @@ -1,11 +1,9 @@ { inputs = { taffybar = { - # Keep the default source usable in CI. Local iteration uses - # IMALISON_TAFFYBAR_LIVE_CHECKOUT below via `just switch-local-taffybar`. - # Pinned to the rate-limit-backoff PR branch (taffybar/taffybar#681); - # revert to master after it merges. - url = "github:taffybar/taffybar/anthropic-usage-rate-limit-backoff"; + # Use the vendored checkout so normal NixOS rebuilds consume the same + # taffybar tree used for local development. + url = "path:/srv/dotfiles/dotfiles/config/taffybar/taffybar"; inputs.weeder-nix = { url = "github:NorfairKing/weeder-nix"; inputs.pre-commit-hooks.inputs.nixpkgs.follows = "nixpkgs"; @@ -40,14 +38,7 @@ config.allowBroken = true; }; - # Default to the flake input so normal NixOS rebuilds stay pinned and - # reproducible. switch-local-taffybar opts into the live checkout via - # IMALISON_TAFFYBAR_LIVE_CHECKOUT when iterating on the vendored stack. - liveTaffybarCheckout = builtins.getEnv "IMALISON_TAFFYBAR_LIVE_CHECKOUT"; - taffybarSourceRoot = - if liveTaffybarCheckout != "" - then /. + liveTaffybarCheckout - else taffybar.outPath; + taffybarSourceRoot = taffybar.outPath; cleanedTaffybarSource = pkgs.lib.cleanSourceWith { src = taffybarSourceRoot; diff --git a/dotfiles/config/taffybar/taffybar b/dotfiles/config/taffybar/taffybar index feab5bf0..f0302a78 160000 --- a/dotfiles/config/taffybar/taffybar +++ b/dotfiles/config/taffybar/taffybar @@ -1 +1 @@ -Subproject commit feab5bf025c51eae47d6ccfb214e2062d2c25578 +Subproject commit f0302a788290651c710a5bba138bd5dd0f89baa9