From 0c0dc2d3186d473dd971e5e8c70b94e73d170ce1 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Sat, 2 May 2026 05:37:06 -0700 Subject: [PATCH] Use NixOS logo for taffybar omni menu --- .../config/taffybar/icons/nix-snowflake.svg | 187 ++++++++++++++++++ dotfiles/config/taffybar/taffybar.hs | 14 +- 2 files changed, 196 insertions(+), 5 deletions(-) create mode 100644 dotfiles/config/taffybar/icons/nix-snowflake.svg diff --git a/dotfiles/config/taffybar/icons/nix-snowflake.svg b/dotfiles/config/taffybar/icons/nix-snowflake.svg new file mode 100644 index 00000000..2a065bc9 --- /dev/null +++ b/dotfiles/config/taffybar/icons/nix-snowflake.svg @@ -0,0 +1,187 @@ + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + diff --git a/dotfiles/config/taffybar/taffybar.hs b/dotfiles/config/taffybar/taffybar.hs index 2edde590..bf53bccc 100644 --- a/dotfiles/config/taffybar/taffybar.hs +++ b/dotfiles/config/taffybar/taffybar.hs @@ -585,11 +585,15 @@ omniMenuWidget :: TaffyIO Gtk.Widget omniMenuWidget = decorateWithClassAndBoxM "omni-menu" $ do icon <- - liftIO $ - Gtk.imageNewFromIconName - (Just "system-run") - (fromIntegral $ fromEnum Gtk.IconSizeMenu) - >>= Gtk.toWidget + liftIO $ do + iconPath <- getUserConfigFile "taffybar" "icons/nix-snowflake.svg" + pixbufNewFromFileAtScaleByHeight 18 iconPath >>= \case + Right pixbuf -> Gtk.toWidget =<< Gtk.imageNewFromPixbuf (Just pixbuf) + Left _ -> + Gtk.imageNewFromIconName + (Just "system-run") + (fromIntegral $ fromEnum Gtk.IconSizeMenu) + >>= Gtk.toWidget omniMenuNewWithConfig (defaultOmniMenuConfig icon) { omniMenuIncludeApplications = True,