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

Customize and reorder widgets in Control Center #150

Merged
merged 11 commits into from
Aug 3, 2022
Merged

Customize and reorder widgets in Control Center #150

merged 11 commits into from
Aug 3, 2022

Conversation

ErikReider
Copy link
Owner

@ErikReider ErikReider commented Jul 31, 2022

  • Title widget
  • Dnd widget
  • Text widget
  • Reorder widgets
  • Update Man pages
  • Update config.json
  • Update config JSON schema
  • Add default widgets
  • Multiple customizations of same widget (ex: "label#about" or "label#desc")

@nwg-piotr How would this affect your shell config?

Fixes: #22

@ErikReider ErikReider added the enhancement New feature or request label Jul 31, 2022
@ErikReider ErikReider self-assigned this Jul 31, 2022
@nwg-piotr
Copy link

nwg-piotr commented Jul 31, 2022

I need to try and check. Actually I use arguments, leaving the swaync config file to users' creativity, so hope it to be all good. Will let you know.

@nwg-piotr
Copy link

I see no UI elements, just the window and notifications, if any.

image

@nwg-piotr
Copy link

nwg-piotr commented Jul 31, 2022

Sorry, I was wrong. I use a single config.json file for all my presets, and a separate css file for each of them. I modify positionX, positionY, control-center-width and notification-window-width.

I need to update the config file content.

@nwg-piotr
Copy link

Alright, I'll just add missing config keys from the default config file, if any.

defaults = load_json("/etc/xdg/swaync/config.json")

        for key in defaults:
            if key not in swaync_settings:
                swaync_settings[key] = defaults[key]

Copy link

@nwg-piotr nwg-piotr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added 4 lines to nwg-shell-config, that will bring swaync back to life after your update. This won't be 100% hassle-free, however: users will have to open nwg-shell-config and press the 'Apply' button.

@ErikReider
Copy link
Owner Author

I see no UI elements, just the window and notifications, if any.

Oh. I'll add a few default widgets and fix height not being respected

@ErikReider
Copy link
Owner Author

I added 4 lines to nwg-shell-config, that will bring swaync back to life after your update. This won't be 100% hassle-free, however: users will have to open nwg-shell-config and press the 'Apply' button.

Are you referring to the messed up height and missing widgets?

@nwg-piotr
Copy link

I meant missing widgets, due to missing config keys. If you add default widgets - very well. One way or another, I think I'll leave the default keys check. Your config content may change in the future.

@ErikReider
Copy link
Owner Author

Oh, the large height was just my config being invalid due to a trailing comma... I'll add default widgets :)

@nwg-piotr
Copy link

Thank you.

Honestly, the nwg-shell project is already so oversized, that it takes me quite a long time to get back to things I haven't touched recently. Sometimes I can't even remember which application I wrote in Python and which in Go. :)

@ErikReider ErikReider merged commit 14a3276 into main Aug 3, 2022
@ErikReider ErikReider deleted the widgets branch August 3, 2022 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request] Ability to hide/display DND widget
2 participants