ErikReider / SwayNotificationCenter

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

Add ControllsWidget #203

Closed JannisPetschenka closed 1 year ago

JannisPetschenka commented 1 year ago

Edited the widget to allow a more generic config :)

ErikReider commented 1 year ago

Pressed the wrong button, my bad...

ErikReider commented 1 year ago

What's the difference between

"buttons": {
  "actions": [
    {
      "label": "直",
      "command": "~/script.sh"
    },
    {
      "label": "",
      "command": "~/script.sh"
    }
  ]
},

and

"menubar": {
  "topbar-buttons": {
    "type": "buttons",
    "position": "right",
    "actions": [
      {
        "label": "直",
        "command": "~/script.sh"
      }
    ]
  },
}

Isn't "buttons" essentially just a menubar? Would merging them make sense due to being able to have buttons in the menubar? Am I missing something?

JannisPetschenka commented 1 year ago

What's the difference between

"buttons": {
  "actions": [
    {
      "label": "直",
      "command": "~/script.sh"
    },
    {
      "label": "",
      "command": "~/script.sh"
    }
  ]
},

and

"menubar": {
  "topbar-buttons": {
    "type": "buttons",
    "position": "right",
    "actions": [
      {
        "label": "直",
        "command": "~/script.sh"
      }
    ]
  },
}

Isn't "buttons" essentially just a menubar? Would merging them make sense due to being able to have buttons in the menubar? Am I missing something?

It's meant to be something different, probably my bad for using the same command and label everywhere :)

The buttons-widget is a FlowBox so it's meant to display a grid of buttons. The button type in the menu-widget however is for displaying buttons in the topbar, which do not open a drop-down (e.g. a screenshot button), so it's not meant to display more than one line of buttons.

This example should show what I mean. image

Updated the README to hopefully make that a bit clearer ;)

ErikReider commented 1 year ago

Haven't really had time to look at the menubar.vala file yet. Should have more time tomorrow :)

ErikReider commented 1 year ago

Sorry for the delay. I've had a lot on my plate the past 2 weeks. I should have time within the next few days :)

JannisPetschenka commented 1 year ago

Updated the man(5) and the other issues :) Also realized, that the difference between the buttons widget and the buttons object in the menubar widget was getting kinda confusing.. So I changed the name of the buttons widget to buttons-grid :)