[Solved]Vertical panel width

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
cliffcoggin
Level 6
Level 6
Posts: 1121
Joined: Sat Sep 17, 2016 6:40 pm
Location: England

[Solved]Vertical panel width

Post by cliffcoggin »

Good day folks.

I much prefer a vertical panel to a horizontal one, however even at maximum width in Mint 18.3 Cinnamon it is not wide enough to append application names to their icons. For example, I frequently have five spreadsheets open at the same time but all that shows in a vertical panel is five identical icons, whereas in a horizontal panel the five icons also have their respective spreadsheet titles, but then they soon fill the panel.

Is there a way increase the panel width to four, five, or even six times the current permitted maximum, and would that then allow titles to appear? I wouldn't care if it filled a quarter of the screen since I use the auto hide feature.
Last edited by cliffcoggin on Tue Mar 12, 2019 10:33 am, edited 1 time in total.
Cliff Coggin
User avatar
smurphos
Level 17
Level 17
Posts: 7332
Joined: Fri Sep 05, 2014 12:18 am
Location: Britisher
Contact:

Re: Vertical panel width

Post by smurphos »

You can set the panel-height (it's called height under the hood for both both vertical and horizontal panels but means width for vertical panels :roll: :wink: ) beyond what the GUI will allow via dconf editor.

E.g. viewtopic.php?p=1525288#p1525288

Note Method 1 in the above link is obsolete for Cinnamon 4+

Edit - having said that I don't think the default window-list will show labels on a vertical panel no matter how wide by design......
Edit 2 - but it's an easy hack to change that.....

Make a copy of /usr/share/cinnamon/applets/window-list@cinnamon.org in ~/.local/share/cinnamon/applets/

Open ~/.local/share/cinnamon/applets/window-list@cinnamon.org/applet.js in a text editor.

Search for this code block.

Code: Select all

    updateLabelVisible: function() {
        if (this._applet.orientation == St.Side.TOP || this._applet.orientation == St.Side.BOTTOM) {
            this._label.show();
            this.labelVisible = true;
        } else {
            this._label.hide();
            this.labelVisible = false;
        }
    },
Change it to

Code: Select all

    updateLabelVisible: function() {
            this._label.show();
            this.labelVisible = true;
    },
Save and restart Cinnamon with Ctrl-Alt-Esc...

Screenie is Mint 19.1 but it should work OK on 18.3

Image
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
cliffcoggin
Level 6
Level 6
Posts: 1121
Joined: Sat Sep 17, 2016 6:40 pm
Location: England

Re: Vertical panel width

Post by cliffcoggin »

Thanks. I installed Dconf-editor but I don't see what to do with it.
Screenshot from 2019-03-09 13-05-48.png
Cliff Coggin
User avatar
smurphos
Level 17
Level 17
Posts: 7332
Joined: Fri Sep 05, 2014 12:18 am
Location: Britisher
Contact:

Re: Vertical panel width

Post by smurphos »

Click on the little arrow next to org to expand that menu, then do the same on cinnamon, then navigate to panel-height and double-click on it to edit the values. If you've got several entries check which one is your left panel in the setting immediately above.

Image
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
cliffcoggin
Level 6
Level 6
Posts: 1121
Joined: Sat Sep 17, 2016 6:40 pm
Location: England

Re: Vertical panel width

Post by cliffcoggin »

I made the mistake of double-clicking "org" on the assumption it was the same as clicking on the arrow, but it's not.

I found the panel height setting and changed value 1 from 50 to 100 which enlarged the left panel, then restarted the computer, however as soon as I opened Panel Settings to change icon scaling the panel reverted to the default setting of 50. Is the "panels-scale-text-icons" setting overriding panel height somehow? I am reluctant to tinker without advice.
Cliff Coggin
User avatar
deanr72
Level 3
Level 3
Posts: 163
Joined: Sat Mar 24, 2018 2:00 pm
Location: Poland

Re: Vertical panel width

Post by deanr72 »

Could you just install Docky and use it on 'panel' setting?
cliffcoggin
Level 6
Level 6
Posts: 1121
Joined: Sat Sep 17, 2016 6:40 pm
Location: England

Re: Vertical panel width

Post by cliffcoggin »

deanr72 wrote:
Sat Mar 09, 2019 1:02 pm
Could you just install Docky and use it on 'panel' setting?
That never occurred to me as I didn't know what a dock was, but having looked into it I don't believe it would help because it would still show five Calc icons without titles, so I would be no better off. Thanks nevertheless.
Cliff Coggin
User avatar
smurphos
Level 17
Level 17
Posts: 7332
Joined: Fri Sep 05, 2014 12:18 am
Location: Britisher
Contact:

Re: Vertical panel width

Post by smurphos »

cliffcoggin wrote:
Sat Mar 09, 2019 11:48 am
I made the mistake of double-clicking "org" on the assumption it was the same as clicking on the arrow, but it's not.

I found the panel height setting and changed value 1 from 50 to 100 which enlarged the left panel, then restarted the computer, however as soon as I opened Panel Settings to change icon scaling the panel reverted to the default setting of 50. Is the "panels-scale-text-icons" setting overriding panel height somehow? I am reluctant to tinker without advice.
Ah - that's annoying. OK we'll take another approach which is to make a quick hack to the panel settings GUI to make the maximum 200 pixels. On the off chance 18.3 ever gets another Cinnamon update you'll probably need to reapply this.

Any body reading this is for 18.3 only.....

Code: Select all

sudo sed -i "s|maxi=50, show_value=False|maxi=200, show_value=True|g" /usr/share/cinnamon/cinnamon-settings/modules/cs_panel.py
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
cliffcoggin
Level 6
Level 6
Posts: 1121
Joined: Sat Sep 17, 2016 6:40 pm
Location: England

Re: Vertical panel width

Post by cliffcoggin »

Apologies for the delayed response. I have been waiting for the weather to improve in order to get a steady power supply for the Linux computer, the UPS having only a 20 minute battery supply.

Code: Select all

sudo sed -i "s|maxi=50, show_value=False|maxi=200, show_value=True|g" /usr/share/cinnamon/cinnamon-settings/modules/cs_panel.py
was very successful in getting a wider stable left panel, thanks.

What I don't understand now is your instructions above about how to get labels. In particular the part about opening code in a text editor. Can you be more explicit please? Bear in mind I know nothing about code or the structure of Linux, its all a meaningless string of symbols and characters to me.
Cliff Coggin
User avatar
smurphos
Level 17
Level 17
Posts: 7332
Joined: Fri Sep 05, 2014 12:18 am
Location: Britisher
Contact:

Re: Vertical panel width

Post by smurphos »

Hi cliffcoggin,

I'll quote myself and give a bit more explanation.

Cinnamon's pre-installed applets are located in the folder /usr/share/cinnamon/applets/
Each one has a it's own folder in there which includes all the files required for that particular applet.
User installed (and for good practise user modified applets) are in your home folder in ~/.local/share/cinnamon/applets/

So in this case you need to copy the window-list@cinnamon.org folder from the former location to the latter. You can do this in nemo (no root required to copy from system dirs to home) or with the terminal.

Code: Select all

cp -r /usr/share/cinnamon/applets/window-list@cinnamon.org ~/.local/share/cinnamon/applets/
Cinnamon applets are coded with javascript - these are plain text files and reasonably human-readable and can be edited in a regular text editor like Xed or Geany. The file you need to edit is called applet.js and the copy you want to edit will now been in the folder ~/.local/share/cinnamon/applets/]window-list@cinnamon.org.

Again you could just double-click in nemo to open the file in your default text editor or open via the terminal

Code: Select all

xed ~/.local/share/cinnamon/applets/window-list@cinnamon.org/applet.js
Once opened in the texteditor I'd use the search function in the text editor to look for this string updateLabelVisible: function() { which should take you to the correct place to make the edit.

The function we are editing is basically telling the applet to only show labels on top and bottom panels. We're going to override that and have the applet show labels always irrespective of panel location.

Note:
You could skip the copying the applet to your home folder stage and just edit the original with root privileges.

The reason I don't recommend it is a) a bad edit can crash cinnamon and you've lost the original copy unless you also make a back-up and b) your using root when you don't really need to. Other the other hand it does have the advantage that you won't inadvertently carry forward an old version of the edited applet if you ever upgrade your Mint version and retain your home folder.

If you want to edit the original copy directly just open it with xed admin://

Code: Select all

xed admin:///usr/share/cinnamon/applets/window-list@cinnamon.org/applet.js
Once you've made your edit and saved the file - Ctrl-Alt-Esc will restart Cinnamon and load the modified applet. If that doesn't work log out and log back in (I had to do that testing on Mint 18.3 although only a restart was needed for 19.1).

Bear in mind if you've got copies of the applet in both the system folder and your home folder, the home folder copy will always take precedence.

Just another note - this edit actually works much better in 19.1, as 19.1 allows you to set a specific icon size. The icons look pretty tiny in 18.3 after this change.
smurphos wrote:
Sat Mar 09, 2019 1:04 am
Make a copy of /usr/share/cinnamon/applets/window-list@cinnamon.org in ~/.local/share/cinnamon/applets/

Open ~/.local/share/cinnamon/applets/window-list@cinnamon.org/applet.js in a text editor.

Search for this code block.

Code: Select all

    updateLabelVisible: function() {
        if (this._applet.orientation == St.Side.TOP || this._applet.orientation == St.Side.BOTTOM) {
            this._label.show();
            this.labelVisible = true;
        } else {
            this._label.hide();
            this.labelVisible = false;
        }
    },
Change it to

Code: Select all

    updateLabelVisible: function() {
            this._label.show();
            this.labelVisible = true;
    },
Save and restart Cinnamon with Ctrl-Alt-Esc...
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
cliffcoggin
Level 6
Level 6
Posts: 1121
Joined: Sat Sep 17, 2016 6:40 pm
Location: England

Re: Vertical panel width

Post by cliffcoggin »

Hi Smurphos.

I replied a while ago but the message seems to have disappeared so I'll try once more.

I thought i was getting somewhere now that I understand what were instructions and what were explanations in your earlier message, but I hit another obstacle.

I found "window-list@cinnamon.org" but I can't find "~/.local/share/cinnamon/applets/".
/home/cliffcoggin/Pictures/New/Screenshot from 2019-03-11 15-37-01.png
Cliff Coggin
User avatar
smurphos
Level 17
Level 17
Posts: 7332
Joined: Fri Sep 05, 2014 12:18 am
Location: Britisher
Contact:

Re: Vertical panel width

Post by smurphos »

Do you just need to show hidden files/folders in Nemo? Ctrl-H is the keyboard shortcut for that.
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
cliffcoggin
Level 6
Level 6
Posts: 1121
Joined: Sat Sep 17, 2016 6:40 pm
Location: England

Re: Vertical panel width

Post by cliffcoggin »

I had tried that but no. For some reason the screenshot I attached did not show. Let me try again.
Attachments
Screenshot from 2019-03-11 15-37-01.png
Cliff Coggin
User avatar
smurphos
Level 17
Level 17
Posts: 7332
Joined: Fri Sep 05, 2014 12:18 am
Location: Britisher
Contact:

Re: Vertical panel width

Post by smurphos »

~ is shorthand for the user's home folder. Look for .local as a hidden file in your Home.
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
cliffcoggin
Level 6
Level 6
Posts: 1121
Joined: Sat Sep 17, 2016 6:40 pm
Location: England

Re: Vertical panel width

Post by cliffcoggin »

Ah, I looked under /.

I found the the right spot now and will experiment tomorrow.
Cliff Coggin
cliffcoggin
Level 6
Level 6
Posts: 1121
Joined: Sat Sep 17, 2016 6:40 pm
Location: England

Re: Vertical panel width

Post by cliffcoggin »

Success. I now have titled icons in the left panel. The relative scale of some of the other icons will take some getting used to, but so far the change is beneficial.

Many thanks Smurphos for your work on this. I don't know how much time you put into it but, the nine hours I have spent have convinced me never to tinker with computers any more than is absolutely necessary.
Attachments
Screenshot from 2019-03-12 10-16-50.png
Cliff Coggin
User avatar
smurphos
Level 17
Level 17
Posts: 7332
Joined: Fri Sep 05, 2014 12:18 am
Location: Britisher
Contact:

Re: Vertical panel width

Post by smurphos »

cliffcoggin wrote:
Tue Mar 12, 2019 6:40 am
Success. I now have titled icons in the left panel. The relative scale of some of the other icons will take some getting used to, but so far the change is beneficial.

Many thanks Smurphos for your work on this. I don't know how much time you put into it but, the nine hours I have spent have convinced me never to tinker with computers any more than is absolutely necessary.
No worries you are welcome - there wasn't much work my end for this particular tweak - I've experimented with this myself before...

What would take a bit of time would be identifying the other little hacks needed to make the other applets look more natural in a wider vertical panel. It would certainly be possible but as mentioned Cinnamon 4.0/Mint 19.1 would be a better starting point as there is already much finer tuned control of panel icon sizes available to end users in Cinnamon 4.0.
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
Post Reply

Return to “Newbie Questions”