unixorn / lima-xbar-plugin

xbar/Swiftbar plugin to control lima-vm
Apache License 2.0
116 stars 12 forks source link

Custom icons #34

Closed exculibar closed 5 months ago

exculibar commented 6 months ago

Description

Two additional sets of icon themes were created based on the original icons, and support loading specified themes based on file names.

Rename the plugin file to lima-plugin.[theme].[time_ext] to switch to the specified theme

e.g.

Theme default: Theme default

Theme text: Theme text

Theme sf_simple: Theme sf_simple 1 Theme sf_simple 2

Type of changes

Checklist

License Acceptance

pythoninthegrass commented 5 months ago

This is awesome @exculibar! Was able to get it working on my mac after running make install and renaming lima-plugin to lima-plugin.sf_simple.10s.

Were you able to get the XBARDarkMode env var to work? Looks like an open issue upstream: https://github.com/matryer/xbar/issues/734.

I tried

export XBARDarkMode=true
open -a xbar

and it still showed the xbar-light icons which doesn't look great on my menu bar. Hard-coding to

 plugin_type = (
    # "xbar-dark" if os.environ.get("XBARDarkMode") == "true" else "xbar-light"
     "xbar-dark"
)

works as expected.

Screenshot 2024-05-15 at 10 20 35 PM Screenshot 2024-05-15 at 10 21 23 PM

exculibar commented 5 months ago

This is awesome @exculibar! Was able to get it working on my mac after running make install and renaming lima-plugin to lima-plugin.sf_simple.10s.

Were you able to get the XBARDarkMode env var to work? Looks like an open issue upstream: matryer/xbar#734.

I tried

export XBARDarkMode=true
open -a xbar

and it still showed the xbar-light icons which doesn't look great on my menu bar. Hard-coding to

 plugin_type = (
    # "xbar-dark" if os.environ.get("XBARDarkMode") == "true" else "xbar-light"
     "xbar-dark"
)

works as expected.

Screenshot 2024-05-15 at 10 20 35 PM Screenshot 2024-05-15 at 10 21 23 PM

Hi, @pythoninthegrass The new macOS Topbar dark mode appears to mimic the wallpaper's color, but xbar's XBARDarkMode environment variable adheres to the system settings, overriding any user-defined setting for that variable. Unfortunately, xbar doesn't provide a Light/Dark mode API specifically for the Topbar, so I can't resolve this issue at present. You might try switching to wallpapers with different dark or light styles, or use SwiftBar, which adjusts automatically based on the Topbar's Light/Dark mode.