SwayNotificationCenter
SwayNotificationCenter copied to clipboard
Add `"notification-window-height"`
I think the title is self-explanatory. Found it funny how an option to configure width exists, but height doesn't.
Unless I am missing this config option entirely, it would be pretty much appreciated if this could be added.
Update: I've just noticed your notice in the README, apologies if this comes out as pushy. That was not my intention.
I've decided to take the matters into my hand and attempted adding in the feature myself, but after editing the source code and building manually, the height option is ignored. Which leads me to believe this is a technical limitation. Unless, of course, I am missing something. Which is likely.
I've added
config.json.in
"notification-window-height": 350,
configSchema.json
"notification-window-height": {
"type": "integer",
"description": "Height of the notification in pixels",
"default": 350
},
configModel.vala
/**
* Notification window's height, in pixels.
*/
public int notification_window_height { get; set; default = 350; }
and finally
notificationWindow.vala
this.default_height = ConfigModel.instance.notification_window_height;
I did my best to implement it the same way as width parameter was implemented, but can't find anywhere else that width was referenced. Am I missing anything specific?
No worries! :)
If I remember correctly, there should be a constant called MAX_HEIGHT
that's used
Hm, yes there is a MAX_HEIGHT
constant in src/notificationWindow/notificationWindow.vala
. I'll do further testing later today.
Unfortunately I was unable to get a working prototype. I'm not giving up yet, but probably won't be able to implement what I want anytime soon. Feel free to close this issue.
Hmm. I have a faint memory of trying to implement this earlier but decided not to. I wonder why... The PR was #38
I'll leave this open for the time being