Change Location of Notifications?

Please post suggestions for improvement of Cinnamon here
https://github.com/linuxmint/Cinnamon
Post Reply
User avatar
Carl
Level 5
Level 5
Posts: 695
Joined: Wed Apr 15, 2009 5:20 pm
Location: Isle of Wight, UK

Change Location of Notifications?

Post by Carl » Tue Jan 23, 2018 5:26 pm

Hi,

I'm using the Linux Mint 18.2 64 bit Cinnamon variant, I've been looking for a way to vertically change the location of cinnamon notifications, I've tried looking in the theme file for "margin-from-top-edge-of-screen" to change the value but it's no longer there only "margin-from-right-edge-of-screen" after a bit of Googlefu I can see that this implementation was removed in more recent versions of Cinnamon so I then tried another recommendation to adjust the file "/usr/share/cinnamon/js/ui/messageTray.js" however none of the recommended adjustments to this snippet of code below seem to work?

Code: Select all

let height = 5;
if (panel)
height += panel.actor.get_height();
let newY = monitor.y + height;
So is there no way to accomplish this anymore? I've moved the notifications to the right hand side of the screen for the moment but I would prefer to have them in the bottom left hand corner preferably...

User avatar
Termy
Level 5
Level 5
Posts: 762
Joined: Mon Sep 04, 2017 8:49 pm
Location: UK
Contact:

Re: Change Location of Notifications?

Post by Termy » Tue Jan 23, 2018 6:46 pm

Had a poke around a bit deeper than a GUI by using gconftool and gsettings but had no luck finding such a setting. :(

This any good to you? viewtopic.php?t=97460
Here to help.

I'm LearnLinux (LL) on YouTube: https://www.youtube.com/channel/UCfp-lN ... naEE6NtDSg
I'm also terminalforlife (TFL) on GitHub: https://github.com/terminalforlife

User avatar
austin.texas
Level 20
Level 20
Posts: 12054
Joined: Tue Nov 17, 2009 3:57 pm
Location: at /home

Re: Change Location of Notifications?

Post by austin.texas » Tue Jan 23, 2018 7:00 pm

Open the cinnamon.css file in your text editor, and go to the Notifications section.

/* ===================================================================
* Notifications
* ===================================================================*/
#notification {
font-size: 8.5pt;
border-image: url("background-assets/bg-1.png") 6;
padding: 8px 8px 8px 8px;
spacing-rows: 10px;
spacing-columns: 10px;
margin-from-right-edge-of-screen: 20px;
width: 34em;
color: rgb(70, 70, 70);
}
Change the margin-from-right-edge-of-screen: 20px; to what you prefer.
Mint 18.2 Cinnamon, Quad core AMD A8-3870 with Radeon HD Graphics 6550D, 8GB DDR3, Ralink RT2561/RT61 802.11g PCI
Linux Linx 2018

User avatar
Carl
Level 5
Level 5
Posts: 695
Joined: Wed Apr 15, 2009 5:20 pm
Location: Isle of Wight, UK

Re: Change Location of Notifications?

Post by Carl » Tue Jan 23, 2018 9:22 pm

austin.texas wrote:Open the cinnamon.css file in your text editor, and go to the Notifications section.

/* ===================================================================
* Notifications
* ===================================================================*/
#notification {
font-size: 8.5pt;
border-image: url("background-assets/bg-1.png") 6;
padding: 8px 8px 8px 8px;
spacing-rows: 10px;
spacing-columns: 10px;
margin-from-right-edge-of-screen: 20px;
width: 34em;
color: rgb(70, 70, 70);
}
Change the margin-from-right-edge-of-screen: 20px; to what you prefer.
That would only change which side of the screen I want the notification to appear not how high up the screen it would appear...

User avatar
Carl
Level 5
Level 5
Posts: 695
Joined: Wed Apr 15, 2009 5:20 pm
Location: Isle of Wight, UK

Re: Change Location of Notifications?

Post by Carl » Tue Jan 23, 2018 9:24 pm

Termy wrote:Had a poke around a bit deeper than a GUI by using gconftool and gsettings but had no luck finding such a setting. :(

This any good to you? viewtopic.php?t=97460
Thank you but that just appears to describe the process I have already tried to move the notifications to the bottom of the screen it appears that the line of code required to be edited no longer exists in cinnamon.css

I would love to be proved wrong though!

User avatar
austin.texas
Level 20
Level 20
Posts: 12054
Joined: Tue Nov 17, 2009 3:57 pm
Location: at /home

Re: Change Location of Notifications?

Post by austin.texas » Wed Jan 24, 2018 12:15 am

Carl wrote:it appears that the line of code required to be edited no longer exists in cinnamon.css
Then add the line.
Mint 18.2 Cinnamon, Quad core AMD A8-3870 with Radeon HD Graphics 6550D, 8GB DDR3, Ralink RT2561/RT61 802.11g PCI
Linux Linx 2018

User avatar
Carl
Level 5
Level 5
Posts: 695
Joined: Wed Apr 15, 2009 5:20 pm
Location: Isle of Wight, UK

Re: Change Location of Notifications?

Post by Carl » Thu Jan 25, 2018 9:38 pm

austin.texas wrote:
Carl wrote:it appears that the line of code required to be edited no longer exists in cinnamon.css
Then add the line.
it's ignored... :roll:

BlinkRape
Level 1
Level 1
Posts: 4
Joined: Sun Sep 13, 2015 8:56 pm

Re: Change Location of Notifications?

Post by BlinkRape » Sun Feb 04, 2018 12:02 pm

I wanted to move mine too. This is really disappointing. I wonder what genius decided this was a good idea.

User avatar
austin.texas
Level 20
Level 20
Posts: 12054
Joined: Tue Nov 17, 2009 3:57 pm
Location: at /home

Re: Change Location of Notifications?

Post by austin.texas » Sun Feb 04, 2018 1:12 pm

"Margin from right edge" is not ignored in my current Mint 18.3
I changed my current 200px to 400px, and that worked.
#notification {
font-size: 10pt;
border-radius: 4px;
background-color: #accd8a;
border: 1px solid rgba(255,255,255,0.7);
border-bottom: 0px;
border-left: 0px;
border-right: 0px;
padding: 8px 8px 8px 8px;
spacing-rows: 10px;
spacing-columns: 10px;
margin-from-right-edge-of-screen: 200px;
margin-from-top-edge-of-screen: 200px;
width: 34em;
color: green;
}

"Margin from top edge" does not work, and I have read that there is no such parameter.
By the way, anytime you change something in cinnamon.css you have to refresh Cinnamon to see the change. Either do Alt-F1 > r or change to a different Cinnamon theme and back.
Mint 18.2 Cinnamon, Quad core AMD A8-3870 with Radeon HD Graphics 6550D, 8GB DDR3, Ralink RT2561/RT61 802.11g PCI
Linux Linx 2018

User avatar
Carl
Level 5
Level 5
Posts: 695
Joined: Wed Apr 15, 2009 5:20 pm
Location: Isle of Wight, UK

Re: Change Location of Notifications?

Post by Carl » Wed Mar 07, 2018 6:54 pm

austin.texas wrote:
Sun Feb 04, 2018 1:12 pm
"Margin from right edge" is not ignored in my current Mint 18.3
I changed my current 200px to 400px, and that worked.
#notification {
font-size: 10pt;
border-radius: 4px;
background-color: #accd8a;
border: 1px solid rgba(255,255,255,0.7);
border-bottom: 0px;
border-left: 0px;
border-right: 0px;
padding: 8px 8px 8px 8px;
spacing-rows: 10px;
spacing-columns: 10px;
margin-from-right-edge-of-screen: 200px;
margin-from-top-edge-of-screen: 200px;
width: 34em;
color: green;
}

"Margin from top edge" does not work, and I have read that there is no such parameter.
By the way, anytime you change something in cinnamon.css you have to refresh Cinnamon to see the change. Either do Alt-F1 > r or change to a different Cinnamon theme and back.
Yes you are right "Margin from right edge" is not ignored but that is not what I wanted to achieve... currently what you have suggested is already what I had done which was to move the notifications to the left side of the screen however what I would prefer is for them to be at the bottom.

Cheers

kdikappa
Level 1
Level 1
Posts: 13
Joined: Fri Oct 27, 2017 4:46 am

Re: Change Location of Notifications?

Post by kdikappa » Tue Mar 13, 2018 6:27 am

in mint 18.3 not worked
how can i move the notification?

User avatar
roblm
Level 9
Level 9
Posts: 2765
Joined: Sun Feb 24, 2013 2:41 pm

Re: Change Location of Notifications?

Post by roblm » Sat Mar 17, 2018 4:35 pm

Carl,

I was able to achieve what you wanted using Mint 18.3 Cinnamon and the Linux Mint theme. It also worked with the Mint-X and Mint-Y themes. The screen has a 5:4 aspect ratio.

Here is a screenshot:

notifications-location3.jpeg

I used this command to open the cinnamon.css file for editing:

Code: Select all

gksudo xed /usr/share/themes/Linux\ Mint/cinnamon/cinnamon.css
In the Search > Find window, type: notifications

Add the line margin-top: XXXpx; to this section, where XXX is the pixel value:

Code: Select all

#notification {
    font-size: 8.5pt;
    border-radius: 10px 10px 10px 10px;
    border: 2px solid rgba(214,214,214,0.5);
    background-gradient-direction: vertical;
    background-gradient-start: rgba(66,66,66,0.9);
    background-gradient-end: rgba(55,55,55,0.9);
    padding: 8px 8px 8px 8px;
    spacing-rows: 10px;
    spacing-columns: 10px;
    margin-from-right-edge-of-screen: 20px;
    width: 34em;
    color: white;
    opacity:255px;
    mouseover-opacity:96px;
}
I added it just below the line margin-from-right-edge-of-screen: 20px;
I restarted Cinnamon. My final settings are:

Code: Select all

margin-from-right-edge-of-screen: 870px;
margin-top: 740px;
Last edited by roblm on Sun Mar 18, 2018 7:14 pm, edited 1 time in total.

User avatar
austin.texas
Level 20
Level 20
Posts: 12054
Joined: Tue Nov 17, 2009 3:57 pm
Location: at /home

Re: Change Location of Notifications?

Post by austin.texas » Sun Mar 18, 2018 8:49 am

roblm wrote:
Sat Mar 17, 2018 4:35 pm
Add the line margin-top: XXXpx; to this section, where XXX is the pixel value:

Code: Select all

margin-from-right-edge-of-screen: 870px;
margin-top: 740px;
That works in 18.2 and 18.3, as well.
Mint 18.2 Cinnamon, Quad core AMD A8-3870 with Radeon HD Graphics 6550D, 8GB DDR3, Ralink RT2561/RT61 802.11g PCI
Linux Linx 2018

Post Reply

Return to “Cinnamon”