From 92637b30e407f22d99d179e3a922e07bc5c9493f Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Mon, 27 Apr 2026 12:53:26 -0700 Subject: [PATCH] Propagate taffybar OpenAI usage widget --- dotfiles/config/taffybar/flake.lock | 10 +++++----- dotfiles/config/taffybar/taffybar | 2 +- dotfiles/config/taffybar/taffybar.hs | 7 +++++++ nixos/flake.lock | 7 ++++--- nixos/flake.nix | 2 +- 5 files changed, 18 insertions(+), 10 deletions(-) diff --git a/dotfiles/config/taffybar/flake.lock b/dotfiles/config/taffybar/flake.lock index 1b20fbe4..065887ad 100644 --- a/dotfiles/config/taffybar/flake.lock +++ b/dotfiles/config/taffybar/flake.lock @@ -136,11 +136,11 @@ "xmonad-contrib": "xmonad-contrib" }, "locked": { - "lastModified": 1776035803, - "narHash": "sha256-JnZKgFeZrh7P4zgLeNJGqTdPm425BJj003CXUR0nvPs=", - "ref": "refs/heads/master", - "rev": "3c7014217875a7ab8554c3c07cc3e7aacd82f1ca", - "revCount": 2283, + "lastModified": 1777319252, + "narHash": "sha256-mPft6i8ReJAvW2LdylFI6FF6NFGa1HMa3RNbisfAsbc=", + "ref": "refs/heads/codex/fix-gdk-backend-strut-detection", + "rev": "c2cee23fc57384cd322d589944129e6c31d4f0fd", + "revCount": 2288, "type": "git", "url": "file:///home/imalison/dotfiles/dotfiles/config/taffybar/taffybar" }, diff --git a/dotfiles/config/taffybar/taffybar b/dotfiles/config/taffybar/taffybar index 62c0be7d..c2cee23f 160000 --- a/dotfiles/config/taffybar/taffybar +++ b/dotfiles/config/taffybar/taffybar @@ -1 +1 @@ -Subproject commit 62c0be7d0a70558a9871b20ad176190c0f41dbce +Subproject commit c2cee23fc57384cd322d589944129e6c31d4f0fd diff --git a/dotfiles/config/taffybar/taffybar.hs b/dotfiles/config/taffybar/taffybar.hs index 62ca27eb..c248c3cf 100644 --- a/dotfiles/config/taffybar/taffybar.hs +++ b/dotfiles/config/taffybar/taffybar.hs @@ -49,6 +49,7 @@ import qualified System.Taffybar.Widget.ASUS as ASUS import System.Taffybar.Widget.CPUMonitor (cpuMonitorNew) import System.Taffybar.Widget.Generic.Graph (GraphConfig (..), GraphDirection (..), GraphStyle (..), defaultGraphConfig) import qualified System.Taffybar.Widget.NetworkManager as NetworkManager +import System.Taffybar.Widget.OpenAIUsage (openAIUsageNew) import qualified System.Taffybar.Widget.PulseAudio as PulseAudio import System.Taffybar.Widget.SNIMenu (withNmAppletMenu) import System.Taffybar.Widget.SNITray @@ -551,6 +552,10 @@ wakeupDebugWidget :: TaffyIO Gtk.Widget wakeupDebugWidget = decorateWithClassAndBoxM "wakeup-debug" wakeupDebugWidgetNew +openAIUsageWidget :: TaffyIO Gtk.Widget +openAIUsageWidget = + decorateWithClassAndBoxM "openai-usage" openAIUsageNew + sniPriorityVisibilityThresholdDefault :: Int sniPriorityVisibilityThresholdDefault = 0 @@ -609,6 +614,7 @@ endWidgetsForHost hostName = let baseEndWidgets = [ sniTrayWidget, audioWidget, + openAIUsageWidget, cpuWidget, ramSwapWidget, diskUsageWidget, @@ -622,6 +628,7 @@ endWidgetsForHost hostName = sniTrayWidget, asusDiskUsageWidget, audioBacklightWidget, + openAIUsageWidget, cpuWidget, ramSwapWidget, screensaverWidget, diff --git a/nixos/flake.lock b/nixos/flake.lock index a54e56ed..8a02472c 100644 --- a/nixos/flake.lock +++ b/nixos/flake.lock @@ -2220,15 +2220,16 @@ ] }, "locked": { - "lastModified": 1777254467, - "narHash": "sha256-P/m2SoT5XNb6LFOIdga/JUXM3QF/R4dlBAnKWbkHGuc=", + "lastModified": 1777319252, + "narHash": "sha256-mPft6i8ReJAvW2LdylFI6FF6NFGa1HMa3RNbisfAsbc=", "owner": "taffybar", "repo": "taffybar", - "rev": "ff41f4c895e0b30809a8e554011fbc37c81c0cf2", + "rev": "c2cee23fc57384cd322d589944129e6c31d4f0fd", "type": "github" }, "original": { "owner": "taffybar", + "ref": "codex/fix-gdk-backend-strut-detection", "repo": "taffybar", "type": "github" } diff --git a/nixos/flake.nix b/nixos/flake.nix index ff09d0b1..8afd8c2f 100644 --- a/nixos/flake.nix +++ b/nixos/flake.nix @@ -151,7 +151,7 @@ taffybar = { # Use a remote, lockfile-pinned input so rebuilds are reproducible across # machines. For local development, use `nixos-rebuild --override-input taffybar path:...`. - url = "github:taffybar/taffybar"; + url = "github:taffybar/taffybar?ref=codex/fix-gdk-backend-strut-detection"; inputs = { nixpkgs.follows = "nixpkgs"; flake-utils.follows = "flake-utils";