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 <noreply@anthropic.com>
This commit is contained in:
2026-07-02 14:13:46 -07:00
parent dc3de9402c
commit 01de409d18
4 changed files with 14 additions and 39 deletions

View File

@@ -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 =

View File

@@ -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": {

View File

@@ -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;