Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom icons #34

Merged
merged 5 commits into from
May 16, 2024
Merged

Custom icons #34

merged 5 commits into from
May 16, 2024

Conversation

exculibar
Copy link
Contributor

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.

  • lima-plugin.10s -> default
  • lima-plugin.default.10s -> default
  • lima-plugin.text.10s -> text
  • lima-plugin.sf_simple.10s -> sf_simple
  • lima-plugin.sf_simple.10s.py -> sf_simple

Theme default:
Theme default

Theme text:
Theme text

Theme sf_simple:
Theme sf_simple 1
Theme sf_simple 2

Type of changes

  • New feature
  • Documentation

Checklist

  • Three icon themes ( default | sf_simple | text )
  • Load the specified theme based on the file name

License Acceptance

  • This repository is Apache version 2.0 licensed (some scripts may have alternate licensing inline in their code) and by making this PR, I am contributing my changes to the repository under the terms of the Apache 2 license.

… | text | sf_simple)

Signed-off-by: nekoa <gaolool@qq.com>
Signed-off-by: nekoa <gaolool@qq.com>
Signed-off-by: nekoa <gaolool@qq.com>
Signed-off-by: nekoa <gaolool@qq.com>
@pythoninthegrass
Copy link
Contributor

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

@unixorn unixorn merged commit 3e5cca1 into unixorn:main May 16, 2024
3 checks passed
@exculibar
Copy link
Contributor Author

exculibar commented May 20, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants