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

Select monitor to show notifcations #11684

Closed
wants to merge 4 commits into from

Conversation

EvilGremlin
Copy link

Very simple - choose monitor index, defaults to main if unavailabe.
I don't really understand what i'm doing - i had to edit and regenerate org.cinnamon.desktop.notifications.gschema.xml, are xmls generated automatically on build? What else i have to add?

@JosephMcc
Copy link
Contributor

You need to add your new setting to the xml file, something like is being done here: 3b5c560

@EvilGremlin
Copy link
Author

Thanks!

@mtwebster
Copy link
Member

The schema (org.cinnamon.desktop.notifications) already exists in the cinnamon-desktop package.

You just need to add the key itself here:
https://github.com/linuxmint/cinnamon-desktop/blob/master/schemas/org.cinnamon.desktop.notifications.gschema.xml.in

And you'll need to open an additional PR there also.

Also, have you tested this with different arrangements of multiple monitors? (I'm not sure monitor 0 is always the primary anymore in Cinnamon).

@mtwebster mtwebster added the Blocked Needs rebase, changes, or discussion label Jun 5, 2023
This reverts commit 78a9fc5.
@EvilGremlin
Copy link
Author

thanks!

I'm not sure monitor 0 is always the primary anymore

Looks like it is, but it doesn't matter anyway. It'll show on primary if set index don't exist.

let monitor = Main.layoutManager.monitors[this.notificationMonitor] || Main.layoutManager.primaryMonitor;

@JosephMcc
Copy link
Contributor

@EvilGremlin Sorry for misdirecting you on where to put the gschema. I forgot that they existed on cinnamon-desktop.

@kacperpaczos
Copy link
Contributor

@EvilGremlin, sometimes I need to display notifications on the screen where I have the mouse cursor. Can you implement this functionality?

For example, when I have multiple screens and the sound is muted, if I focus on a task on the second screen, I will miss the notification.

In another scenario, when I have a full-screen application, such as YouTube, playing something on my main screen, I can't see the content. I have to minimize the app or otherwise manually check it.

@EvilGremlin
Copy link
Author

Interesting! I will look into it. It'l be easy if cinnamon have a function to track current screen already, and quite tedious if i'd have to calculate it from cursor position myself.

@rcalixte
Copy link
Member

Apologies for intruding here. This is something I'd been working on for a while and had mostly implemented. (I pulled the incomplete development to open the PRs). The PR at #11703 will add an option for "Primary," "Active," and "Fixed" options.

@EvilGremlin
Copy link
Author

@rcalixte oooh, nice 👍 i think yours should supersede mine then

@rcalixte
Copy link
Member

@EvilGremlin If you're interested, the two things I pulled were:

  • option for showing notifications over fullscreen windows (it kind of works but I need to polish it so I pulled it for now)
  • option for "All Screens" in the settings

The latter of those two options is the one I had to carve out significantly from the PR before opening it. I thought it could be done via JavaScript but I think some more hooks need to be exposed via the C libraries first. Feel free to play with it because I hit a wall and was waiting on circling back until I had adequate time for it. The main challenge was getting notifications to display more than once and if I got to that point, I wanted to make sure they would sync on all screens (so that if one screen was dismissed, all would dismiss, whether manually or automatically dismissed). This is what held me up from opening the PR sooner since I wanted it to be feature complete but I would love to see what someone else can come up with.

@EvilGremlin
Copy link
Author

It's ok to do it in few small PR's... it's not like we have to rework whole notify system.
Notify over fullscreen - yeah, would be much appreciated, especially it it can be done over vaapi players.

rcalixte added a commit to rcalixte/cinnamon-1 that referenced this pull request Nov 15, 2023
mtwebster pushed a commit that referenced this pull request Nov 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Blocked Needs rebase, changes, or discussion
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants