ErikReider / SwayNotificationCenter

A simple GTK based notification daemon for SwayWM
GNU General Public License v3.0
1.17k stars 60 forks source link

Customize and reorder widgets in Control Center #150

Closed ErikReider closed 1 year ago

ErikReider commented 1 year ago

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

Fixes: #22

nwg-piotr commented 1 year ago

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 commented 1 year ago

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

image

nwg-piotr commented 1 year ago

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 commented 1 year ago

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]
ErikReider commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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

nwg-piotr commented 1 year ago

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. :)