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.Concurrent (threadDelay)
import Control.Monad.IO.Class (liftIO) import Control.Monad.IO.Class (liftIO)
import Control.Monad.Trans.Reader (ask, runReaderT)
import Data.Char (toLower) import Data.Char (toLower)
import Data.Maybe (fromMaybe) import Data.Maybe (fromMaybe)
import Data.Ratio ((%)) 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.Wlsunset as Wlsunset
import qualified System.Taffybar.Widget.Workspaces as Workspaces import qualified System.Taffybar.Widget.Workspaces as Workspaces
import System.Timeout (timeout)
import TaffybarConfig.AIUsage (aiUsageWidget) import TaffybarConfig.AIUsage (aiUsageWidget)
import TaffybarConfig.Host (laptopHosts) import TaffybarConfig.Host (laptopHosts)
import TaffybarConfig.WidgetUtil import TaffybarConfig.WidgetUtil
@@ -409,19 +407,9 @@ sniTrayWidget = do
prioritizedCollapsibleSNITrayVisibilityThreshold = Just visibilityThreshold, prioritizedCollapsibleSNITrayVisibilityThreshold = Just visibilityThreshold,
prioritizedCollapsibleSNITrayHoverExpand = True prioritizedCollapsibleSNITrayHoverExpand = True
} }
buildSNITray =
decorateWithClassAndBoxM decorateWithClassAndBoxM
"sni-tray" "sni-tray"
(sniTrayPrioritizedCollapsibleNewFromParams prioritizedParams) (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
startWidgetsForBackend :: Backend -> [TaffyIO Gtk.Widget] startWidgetsForBackend :: Backend -> [TaffyIO Gtk.Widget]
startWidgetsForBackend backend = startWidgetsForBackend backend =

View File

@@ -136,18 +136,14 @@
"xmonad-contrib": "xmonad-contrib" "xmonad-contrib": "xmonad-contrib"
}, },
"locked": { "locked": {
"lastModified": 1781172310, "lastModified": 1783024760,
"narHash": "sha256-mBd3obUUS+ICqL+U2bOanGwaGl2rfbMZdGzAFiqRSaE=", "narHash": "sha256-sNu7UVJ0ExuLPYdJakrDvD1AEqyfbmibMdOGKIwbuiA=",
"owner": "taffybar", "path": "/srv/dotfiles/dotfiles/config/taffybar/taffybar",
"repo": "taffybar", "type": "path"
"rev": "7beecc89928df669281977e41ceed213c5ede88f",
"type": "github"
}, },
"original": { "original": {
"owner": "taffybar", "path": "/srv/dotfiles/dotfiles/config/taffybar/taffybar",
"ref": "anthropic-usage-rate-limit-backoff", "type": "path"
"repo": "taffybar",
"type": "github"
} }
}, },
"weeder-nix": { "weeder-nix": {

View File

@@ -1,11 +1,9 @@
{ {
inputs = { inputs = {
taffybar = { taffybar = {
# Keep the default source usable in CI. Local iteration uses # Use the vendored checkout so normal NixOS rebuilds consume the same
# IMALISON_TAFFYBAR_LIVE_CHECKOUT below via `just switch-local-taffybar`. # taffybar tree used for local development.
# Pinned to the rate-limit-backoff PR branch (taffybar/taffybar#681); url = "path:/srv/dotfiles/dotfiles/config/taffybar/taffybar";
# revert to master after it merges.
url = "github:taffybar/taffybar/anthropic-usage-rate-limit-backoff";
inputs.weeder-nix = { inputs.weeder-nix = {
url = "github:NorfairKing/weeder-nix"; url = "github:NorfairKing/weeder-nix";
inputs.pre-commit-hooks.inputs.nixpkgs.follows = "nixpkgs"; inputs.pre-commit-hooks.inputs.nixpkgs.follows = "nixpkgs";
@@ -40,14 +38,7 @@
config.allowBroken = true; config.allowBroken = true;
}; };
# Default to the flake input so normal NixOS rebuilds stay pinned and taffybarSourceRoot = taffybar.outPath;
# 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;
cleanedTaffybarSource = pkgs.lib.cleanSourceWith { cleanedTaffybarSource = pkgs.lib.cleanSourceWith {
src = taffybarSourceRoot; src = taffybarSourceRoot;