Giter Club home page Giter Club logo

Comments (9)

Ryuno-Ki avatar Ryuno-Ki commented on August 24, 2024 1

I only have a subset of them installed today.

I was wondering whether another option would be possible:

  • Passing them as part of an initialisation call.

Maybe not the most idiomatic way to use it, but it could be an option for those who are not happy with the defaults.

from awesome-wm-widgets.

streetturtle avatar streetturtle commented on August 24, 2024 1

Cool! So I'll do the same changes for the other widgets. Thank you!!!

from awesome-wm-widgets.

streetturtle avatar streetturtle commented on August 24, 2024

Totally agree with you, was thinking about it, cannot decided which option is better. I came up with two approaches:

  • using a table from a config file, as you suggested. I use it in weather and translate widgets - there is a secrets.lua file which has an API keys and some other configs. This works great but the file is still in the repo. Maybe as part of "installation" process user should copy this config file one level up, under ./.config/awesome/ folder to make it not trackable by git.
  • put all these configs inside a theme file.

First option seems to be much better, as widgets' configs are not part of a theme.
If you already have something, feel free to create a PR. Otherwise I'll do it, as it has to be done for all widgets, and I have all of them set up on my machine.

from awesome-wm-widgets.

streetturtle avatar streetturtle commented on August 24, 2024

You mean when they are added to the wibox, something like:

s.mywibox:setup {
    ...
    battery_widget({
        cmd = 'acpi -i',
        icon =  '/path/to/icon',
        warning_text=`Battery`
    })

That could work, but I'm afraid it will pollute rc.lua, which is already quite big. But maybe it's ok.

If you have something I would be happy to have a look.

from awesome-wm-widgets.

streetturtle avatar streetturtle commented on August 24, 2024

I created a branch for this issue.
Is this what you meant: 75c1957?

from awesome-wm-widgets.

Ryuno-Ki avatar Ryuno-Ki commented on August 24, 2024

From reading it looks way better. How would I test it?
Checking out your branch and restart awesome? Or are more things needed?

from awesome-wm-widgets.

streetturtle avatar streetturtle commented on August 24, 2024

That would be very helpful if you can test it.
You'll need just one more thing - add parentheses to the widget, because now it's a function. And it's only volumearc widget for now.

from awesome-wm-widgets.

Ryuno-Ki avatar Ryuno-Ki commented on August 24, 2024

Works. I highlighted the „main_color”. See the purple arc in the top bar.

volumearc

from awesome-wm-widgets.

Ryuno-Ki avatar Ryuno-Ki commented on August 24, 2024

Looking forward to it!
Be aware, that this is a breaking change (e.g. a major update). You should highlight that, so people who upgrade know that they need to adjust their config.

from awesome-wm-widgets.

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.