Change Location of Notifications?

Please post suggestions for improvement of Cinnamon on:
https://github.com/linuxmint/Cinnamon
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
User avatar
Carl
Level 5
Level 5
Posts: 701
Joined: Wed Apr 15, 2009 5:20 pm
Location: Isle of Wight, UK

Change Location of Notifications?

Post by Carl »

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 12
Level 12
Posts: 4254
Joined: Mon Sep 04, 2017 8:49 pm
Location: UK
Contact:

Re: Change Location of Notifications?

Post by Termy »

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
I'm also Terminalforlife on GitHub.
User avatar
austin.texas
Level 20
Level 20
Posts: 12003
Joined: Tue Nov 17, 2009 3:57 pm
Location: at /home

Re: Change Location of Notifications?

Post by austin.texas »

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: 701
Joined: Wed Apr 15, 2009 5:20 pm
Location: Isle of Wight, UK

Re: Change Location of Notifications?

Post by Carl »

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: 701
Joined: Wed Apr 15, 2009 5:20 pm
Location: Isle of Wight, UK

Re: Change Location of Notifications?

Post by Carl »

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: 12003
Joined: Tue Nov 17, 2009 3:57 pm
Location: at /home

Re: Change Location of Notifications?

Post by austin.texas »

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: 701
Joined: Wed Apr 15, 2009 5:20 pm
Location: Isle of Wight, UK

Re: Change Location of Notifications?

Post by Carl »

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

Re: Change Location of Notifications?

Post by BlinkRape »

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: 12003
Joined: Tue Nov 17, 2009 3:57 pm
Location: at /home

Re: Change Location of Notifications?

Post by austin.texas »

"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: 701
Joined: Wed Apr 15, 2009 5:20 pm
Location: Isle of Wight, UK

Re: Change Location of Notifications?

Post by Carl »

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: 24
Joined: Fri Oct 27, 2017 4:46 am

Re: Change Location of Notifications?

Post by kdikappa »

in mint 18.3 not worked
how can i move the notification?
User avatar
roblm
Level 15
Level 15
Posts: 5939
Joined: Sun Feb 24, 2013 2:41 pm

Re: Change Location of Notifications?

Post by roblm »

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: 12003
Joined: Tue Nov 17, 2009 3:57 pm
Location: at /home

Re: Change Location of Notifications?

Post by austin.texas »

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
pajew

Re: Change Location of Notifications?

Post by pajew »

Works in 19.1
Thanks.
User avatar
CamazingMe
Level 1
Level 1
Posts: 3
Joined: Sat Sep 08, 2018 4:38 pm

Re: Change Location of Notifications?

Post by CamazingMe »

This worked for me on cinnamon 4.8.6! Using a 1080p display 1420px worked for me (although you could probably tweak it more to have more consistent spacing with the default position). Now if only I could make a bash script to automate this in other themes... :shock:
Locked

Return to “Cinnamon”