lima-xbar-plugin icon indicating copy to clipboard operation
lima-xbar-plugin copied to clipboard

Custom icons

Open exculibar opened this issue 1 year ago • 1 comments

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

  • [x] New feature
  • [x] Documentation

Checklist

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

License Acceptance

  • [x] 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.

exculibar avatar Apr 22 '24 09:04 exculibar

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

pythoninthegrass avatar May 16 '24 03:05 pythoninthegrass

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.

exculibar avatar May 20 '24 01:05 exculibar