[SOLVED]How to change the width of the Cinnamon menu?
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
[SOLVED]How to change the width of the Cinnamon menu?
Hi everyone,
As the title suggests, I wonder if there is any way to modify the width of the Cinnamon menu. I am quite happy with it's height but I would like it better if I could make if a bit smaller.
Any suggestions and pointers are highly appreciated.
Thanks!
philotux
PS. Sorry if the question has been answered before, I did search the forums but I didn't dig that deep.
As the title suggests, I wonder if there is any way to modify the width of the Cinnamon menu. I am quite happy with it's height but I would like it better if I could make if a bit smaller.
Any suggestions and pointers are highly appreciated.
Thanks!
philotux
PS. Sorry if the question has been answered before, I did search the forums but I didn't dig that deep.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: How to change the width of the Cinnamon menu?
hi philotux!philotux wrote: ⤴Sat Dec 08, 2018 8:14 pm Hi everyone,
As the title suggests, I wonder if there is any way to modify the width of the Cinnamon menu. I am quite happy with it's height but I would like it better if I could make if a bit smaller.
Any suggestions and pointers are highly appreciated.
Thanks!
philotux
PS. Sorry if the question has been answered before, I did search the forums but I didn't dig that deep.
I'm new to Linux so this is far from good or only options (and may be dangerous even:D)
First is right click Mint menu> configure> Menu tab> make adjustments there, also see "Open the menu editor" button. Otherwise I'd look at Themes and mix~n~match there to get a menu more like what you desire along with all you other preferences left in Themes (manager).
Other ideas I have, may cause issues, headaches, etc so "buyer beware"... but I had good experience editting system gtk2&3 css files to get a decent scrollbar systemwide (my one worst and persistent pet peeve since migrating to linux, lol) I could search and recommend some guides or questions on such answered for menu width and customizing in other ubuntu/mint haunts if you like.
Another option I bet can help do what you want, complete with even better haps and hazzards, is dconf editor (in SPM/apt) it can wreck things if you're not mindful though, so honor the warning it gives on open.
- smurphos
- Level 18
- Posts: 8498
- Joined: Fri Sep 05, 2014 12:18 am
- Location: Irish Brit in Portugal
- Contact:
Re: How to change the width of the Cinnamon menu?
The element widths (and thus menu width) is hard coded into the menu applet, taking into account font sizes etc which are set by the theme. The easiest tweak is to directly modify the applet code to reduce the maximum button width of the main applications box.
This is using the Mint 19 version Cinnamon 3.8.x version of the applet.
1) Copy the folder
2) In the local copy open
3) Navigate to line 32
4) There is a default 42 px padding on the box - that's set on line 2942 -
5) Save your file and hit Ctrl-Alt-Esc to restart Cinnamon and then view your newly skinny menu.
Before (ignore my overloaded favorites and thus overly tall menu - I use Cinnamenu normally)
After (max-width: 10em & this._applicationsBoxWidth + 21)
This is using the Mint 19 version Cinnamon 3.8.x version of the applet.
1) Copy the folder
/usr/share/cinnamon/applets/menu@cinnamon.org
to ~/.local/share/cinnamon/applets/menu@cinnamon.org
2) In the local copy open
~/.local/share/cinnamon/applets/menu@cinnamon.org/applet.js
in a text editor.3) Navigate to line 32
const MAX_BUTTON_WIDTH = "max-width: 20em;";
and reduce the value of 20 (10 works good). 4) There is a default 42 px padding on the box - that's set on line 2942 -
this.applicationsBox.set_width(this._applicationsBoxWidth + 42); // The answer to life...
Optionally tweak...5) Save your file and hit Ctrl-Alt-Esc to restart Cinnamon and then view your newly skinny menu.
Before (ignore my overloaded favorites and thus overly tall menu - I use Cinnamenu normally)
After (max-width: 10em & this._applicationsBoxWidth + 21)
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
Re: How to change the width of the Cinnamon menu?
hi smurphos! awesome tweak, thanks for sharing that! also, for letting me know one of life's hidden secrets is shared in this code!
(I will have to consider most carefully changing that line to anything other than the default 42
Re: How to change the width of the Cinnamon menu?
Hi redlined and smurphos,
Sorry for the delay in getting back to you.
@redlined
Thanks for your suggestions and pointers. I should have mentioned in my OP that I had already skimmed through the options under the menu icon's right-click but couldn't find anything related to modifying the size of the menu. Regarding debconf-editor, that one had completely fallen to oblivion for me. However, I have a vague memory that, once upon a time, I had looked into it to change some configuration but I don't remember what it was any longer. I got it installed now and I will go through it to get more acquainted with it.
Thanks once again!
philotux
menu. Now with my downsized Cinnamon menu, I enjoy my desktop even more.
Thank you so much!
greetings
philotux
PS. By the way, I've got Cinnamenu installed as well, but mine looks somewhat different than yours. One difference, among some others, is that it lacks the "Favorite Apps" column . Maybe I overlooked something in the configuration settings:
Sorry for the delay in getting back to you.
@redlined
Thanks for your suggestions and pointers. I should have mentioned in my OP that I had already skimmed through the options under the menu icon's right-click but couldn't find anything related to modifying the size of the menu. Regarding debconf-editor, that one had completely fallen to oblivion for me. However, I have a vague memory that, once upon a time, I had looked into it to change some configuration but I don't remember what it was any longer. I got it installed now and I will go through it to get more acquainted with it.
Thanks once again!
philotux
That's great! Clear and straightforward instructions. It is exactly what I needed to change the width of thesmurphos wrote: ⤴Sun Dec 09, 2018 12:20 am
1) Copy the folder/usr/share/cinnamon/applets/menu@cinnamon.org
to~/.local/share/cinnamon/applets/menu@cinnamon.org
2) In the local copy open~/.local/share/cinnamon/applets/menu@cinnamon.org/applet.js
in a text editor.
3) Navigate to line 32const MAX_BUTTON_WIDTH = "max-width: 20em;";
and reduce the value of 20 (10 works good).
4) There is a default 42 px padding on the box - that's set on line 2942 -this.applicationsBox.set_width(this._applicationsBoxWidth + 42); // The answer to life...
Optionally tweak...
5) Save your file and hit Ctrl-Alt-Esc to restart Cinnamon and then view your newly skinny menu.
menu. Now with my downsized Cinnamon menu, I enjoy my desktop even more.
Thank you so much!
greetings
philotux
PS. By the way, I've got Cinnamenu installed as well, but mine looks somewhat different than yours. One difference, among some others, is that it lacks the "Favorite Apps" column . Maybe I overlooked something in the configuration settings:
Re: [SOLVED]How to change the width of the Cinnamon menu?
hi philotux!
yah, smurphos really knocked it out of the park with that response! I did it too
and similar on dconf editor, I came across some advice to use it for something semi-related to what I was trying to tweak early in my LM18.3 experience.. was trying to find gui to help as I was having hard time to figure out how to even close and save files editted with Xed in terminal I recall I ended up sorting it all with commandline edits with a desire to look at dconf again in future- it certainly has lots of nuts and bolts to tinker with
I try not to assume anything in life, so went thru the common stuff to rule those options out for what you wanted. I often forget right click> configure> menu tab> menu editor (long way to menu> Cinnamon menu editor) so mentioned that. I bring that back up because I believe it will help with your missing favorites issue mentioned in your most recent response, take a relook at that menu tab (from right click>config) and see if "Show favorites and quit options" is enabled
(if already enabled, then ugh...
yah, smurphos really knocked it out of the park with that response! I did it too
and similar on dconf editor, I came across some advice to use it for something semi-related to what I was trying to tweak early in my LM18.3 experience.. was trying to find gui to help as I was having hard time to figure out how to even close and save files editted with Xed in terminal I recall I ended up sorting it all with commandline edits with a desire to look at dconf again in future- it certainly has lots of nuts and bolts to tinker with
I try not to assume anything in life, so went thru the common stuff to rule those options out for what you wanted. I often forget right click> configure> menu tab> menu editor (long way to menu> Cinnamon menu editor) so mentioned that. I bring that back up because I believe it will help with your missing favorites issue mentioned in your most recent response, take a relook at that menu tab (from right click>config) and see if "Show favorites and quit options" is enabled
(if already enabled, then ugh...
Re: [SOLVED]How to change the width of the Cinnamon menu?
Hi redlined,
Yah, he really nailed it!
Cool!I did it too
Sure, I've got it enabled and they do appear in the Cinnamon menu (default menu). But I've got another menu applet installed as well via "applet manager" namely Cinnamenu and I don't find any "Show favorites and quit options" in it's configuration settings....take a relook at that menu tab (from right click>config) and see if "Show favorites and quit options" is enabled
(if already enabled, then ugh...
Re: [SOLVED]How to change the width of the Cinnamon menu?
hi philotux! I apologize, completely missed the applet named Cinnamenu being used instead of default cinnamon menu. I may give that a run on my top panel as I do use (and prefer using) applications menu function from cairo dock for most of my menu'd maneuverings and meanderings from bottom custom panel(s)/docks..
Re: [SOLVED]How to change the width of the Cinnamon menu?
No worries!redlined wrote: ⤴Mon Dec 10, 2018 1:10 pm hi philotux! I apologize, completely missed the applet named Cinnamenu being used instead of default cinnamon menu. I may give that a run on my top panel as I do use (and prefer using) applications menu function from cairo dock for most of my menu'd maneuverings and meanderings from bottom custom panel(s)/docks..
Cinnamenu is a nice implementation. You may like it as well.
cheers
- smurphos
- Level 18
- Posts: 8498
- Joined: Fri Sep 05, 2014 12:18 am
- Location: Irish Brit in Portugal
- Contact:
Re: [SOLVED]How to change the width of the Cinnamon menu?
The pic I posted was the 19 stock menu - just with too many favorites for it to handle (that's fixed for 19.1 BTW - the stock menu favorites turns into a scroll-box when it gets too full and has a user configurable maximum height)philotux wrote: ⤴Mon Dec 10, 2018 12:25 pm Sure, I've got it enabled and they do appear in the Cinnamon menu (default menu). But I've got another menu applet installed as well via "applet manager" namely Cinnamenu and I don't find any "Show favorites and quit options" in it's configuration settings.
The favorites in Cinnamenu is presented as another category. The thing I like about Cinnamenu in particular is being able to drag and drop the categories. So I've got my favorites on the top which works well with it in a top panel.
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
Re: [SOLVED]How to change the width of the Cinnamon menu?
Alrigh, that explains the whole thing. Excuse my misunderstanding.
Thanks for this! That's a nice feature. Already rearranged the categories in Cinnamenu. I like that you could switch to grid view as well.The favorites in Cinnamenu is presented as another category. The thing I like about Cinnamenu in particular is being able to drag and drop the categories. So I've got my favorites on the top which works well with it in a top panel.
One thing that crossed my mind was if it would be possible to implement the resizing into the Cinnamon menu in a way similar to Whisker menu in Xfce. That would be nice.
philotux