Giter VIP home page Giter VIP logo

Comments (2)

FelixKratz avatar FelixKratz commented on June 10, 2024

If you start sketchybar with the flag: sketchybar -c <path_to_sketchybarrc> you can supply any sketchybarrc file in any folder and then the CONFIG_DIR variable will be the parent directory of that file. This way you can change the CONFIG_DIR directory to any directory you like.

Does this help you with your problem? In any case, you can pass any environment variable to any script executed by sketchybar simply by setting it in the script variable prior to invoking the actual script, e.g.:

sketchybar --set <name> script='SOME_VAR=something /path/to/some/script.sh'

This way you could also overwrite the CONFIG_DIR variable passed to the scripts on update, since sketchybar sets the variable prior to the script being executed, such that setting up the variable in the script takes precedence.

from sketchybar.

breuerfelix avatar breuerfelix commented on June 10, 2024

Well sadly this does not solve my problem since i have my own sketchybarrc in the .config/sketchybar folder, because i do not wanna use all of your modules.
Also i cannot set the variable in the sketchybar command since therefore i use the items scripts from your repository so i am not able to overwrite this ...

https://github.com/breuerfelix/dotfiles/blob/main/darwin/sketchybar.nix here is my setup (if you know nix a little bit). I managed to find a workaround for it and copy your items, colors and icon_map also to my .config/sketchybar.

But i also thought about the CONFIG_DIR as a global variable a little bit longer and i guess my proposal is not the optimal solution either. It think of your plugins like "packages" that i can consume and customize via variables (like config dir). So if someone else also has plugins, i just want to add them to my inputs and use them. This would not be possible with one config_dir variable which is the same for ALL sketchybar items added. In a dream world, i would need to have this variable to be modified for each item added and i guess that is more work for a niche use case ...
Thanks for mentioning these ways of customizing the varible, i didn't know that, maybe i come up with another solution :)

from sketchybar.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.