Propagate taffybar OpenAI usage widget

This commit is contained in:
2026-04-27 12:53:26 -07:00
parent 4e9e2408b5
commit 92637b30e4
5 changed files with 18 additions and 10 deletions

View File

@@ -136,11 +136,11 @@
"xmonad-contrib": "xmonad-contrib" "xmonad-contrib": "xmonad-contrib"
}, },
"locked": { "locked": {
"lastModified": 1776035803, "lastModified": 1777319252,
"narHash": "sha256-JnZKgFeZrh7P4zgLeNJGqTdPm425BJj003CXUR0nvPs=", "narHash": "sha256-mPft6i8ReJAvW2LdylFI6FF6NFGa1HMa3RNbisfAsbc=",
"ref": "refs/heads/master", "ref": "refs/heads/codex/fix-gdk-backend-strut-detection",
"rev": "3c7014217875a7ab8554c3c07cc3e7aacd82f1ca", "rev": "c2cee23fc57384cd322d589944129e6c31d4f0fd",
"revCount": 2283, "revCount": 2288,
"type": "git", "type": "git",
"url": "file:///home/imalison/dotfiles/dotfiles/config/taffybar/taffybar" "url": "file:///home/imalison/dotfiles/dotfiles/config/taffybar/taffybar"
}, },

View File

@@ -49,6 +49,7 @@ import qualified System.Taffybar.Widget.ASUS as ASUS
import System.Taffybar.Widget.CPUMonitor (cpuMonitorNew) import System.Taffybar.Widget.CPUMonitor (cpuMonitorNew)
import System.Taffybar.Widget.Generic.Graph (GraphConfig (..), GraphDirection (..), GraphStyle (..), defaultGraphConfig) import System.Taffybar.Widget.Generic.Graph (GraphConfig (..), GraphDirection (..), GraphStyle (..), defaultGraphConfig)
import qualified System.Taffybar.Widget.NetworkManager as NetworkManager import qualified System.Taffybar.Widget.NetworkManager as NetworkManager
import System.Taffybar.Widget.OpenAIUsage (openAIUsageNew)
import qualified System.Taffybar.Widget.PulseAudio as PulseAudio import qualified System.Taffybar.Widget.PulseAudio as PulseAudio
import System.Taffybar.Widget.SNIMenu (withNmAppletMenu) import System.Taffybar.Widget.SNIMenu (withNmAppletMenu)
import System.Taffybar.Widget.SNITray import System.Taffybar.Widget.SNITray
@@ -551,6 +552,10 @@ wakeupDebugWidget :: TaffyIO Gtk.Widget
wakeupDebugWidget = wakeupDebugWidget =
decorateWithClassAndBoxM "wakeup-debug" wakeupDebugWidgetNew decorateWithClassAndBoxM "wakeup-debug" wakeupDebugWidgetNew
openAIUsageWidget :: TaffyIO Gtk.Widget
openAIUsageWidget =
decorateWithClassAndBoxM "openai-usage" openAIUsageNew
sniPriorityVisibilityThresholdDefault :: Int sniPriorityVisibilityThresholdDefault :: Int
sniPriorityVisibilityThresholdDefault = 0 sniPriorityVisibilityThresholdDefault = 0
@@ -609,6 +614,7 @@ endWidgetsForHost hostName =
let baseEndWidgets = let baseEndWidgets =
[ sniTrayWidget, [ sniTrayWidget,
audioWidget, audioWidget,
openAIUsageWidget,
cpuWidget, cpuWidget,
ramSwapWidget, ramSwapWidget,
diskUsageWidget, diskUsageWidget,
@@ -622,6 +628,7 @@ endWidgetsForHost hostName =
sniTrayWidget, sniTrayWidget,
asusDiskUsageWidget, asusDiskUsageWidget,
audioBacklightWidget, audioBacklightWidget,
openAIUsageWidget,
cpuWidget, cpuWidget,
ramSwapWidget, ramSwapWidget,
screensaverWidget, screensaverWidget,

7
nixos/flake.lock generated
View File

@@ -2220,15 +2220,16 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1777254467, "lastModified": 1777319252,
"narHash": "sha256-P/m2SoT5XNb6LFOIdga/JUXM3QF/R4dlBAnKWbkHGuc=", "narHash": "sha256-mPft6i8ReJAvW2LdylFI6FF6NFGa1HMa3RNbisfAsbc=",
"owner": "taffybar", "owner": "taffybar",
"repo": "taffybar", "repo": "taffybar",
"rev": "ff41f4c895e0b30809a8e554011fbc37c81c0cf2", "rev": "c2cee23fc57384cd322d589944129e6c31d4f0fd",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "taffybar", "owner": "taffybar",
"ref": "codex/fix-gdk-backend-strut-detection",
"repo": "taffybar", "repo": "taffybar",
"type": "github" "type": "github"
} }

View File

@@ -151,7 +151,7 @@
taffybar = { taffybar = {
# Use a remote, lockfile-pinned input so rebuilds are reproducible across # Use a remote, lockfile-pinned input so rebuilds are reproducible across
# machines. For local development, use `nixos-rebuild --override-input taffybar path:...`. # 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 = { inputs = {
nixpkgs.follows = "nixpkgs"; nixpkgs.follows = "nixpkgs";
flake-utils.follows = "flake-utils"; flake-utils.follows = "flake-utils";