Is it possible to create a keyboard shortcut which would perform the following action?
Desktop context menu/Desktop/Icon Size/Smaller
If not, is it possible to rearange Desktop context menu?
TIA
Keyboard shortcut question...
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.
Keyboard shortcut question...
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time 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: Keyboard shortcut question...
That depends on what keyboard you use. On mine, I can invoke the Desktop context menu by pressing FN+Right Ctrl.
Linux Mint 21.3 Cinnamon
Re: Keyboard shortcut question...
Thank you.
I meant to create a shortcut, for example, 'Ctrl Alt 1' to switch desktop icon size to 'Smaller' instead of invoking desktop context menu and clicking Desktop, Iconsize, Smaller.
And 'Ctrl Alt 2' to switch to normal size.
I meant to create a shortcut, for example, 'Ctrl Alt 1' to switch desktop icon size to 'Smaller' instead of invoking desktop context menu and clicking Desktop, Iconsize, Smaller.
And 'Ctrl Alt 2' to switch to normal size.
Re: Keyboard shortcut question...
You might find a solution here: https://shortcutworld.com/Linux-Mint/li ... _Shortcuts
There is an entry for resizing icons but as far as I can tell this is meant for use in nemo and not the desktop.
There is an entry for resizing icons but as far as I can tell this is meant for use in nemo and not the desktop.
Linux Mint 21.3 Cinnamon
- smurphos
- Level 18
- Posts: 8498
- Joined: Fri Sep 05, 2014 12:18 am
- Location: Irish Brit in Portugal
- Contact:
Re: Keyboard shortcut question...
Yep Ctrl= and Crtl- don't work on the desktop only in nemo itself..
This is not as easy as it really should be.
Unfortunately there is no straightforward cli command to invoke this change, but it is scriptable albeit the method is an ugly hack.
This basic script would work OK if align to grid and autoarrange are off. As written this sets the icon size to small. Save the script somewhere sensible and then set up a custom keyboard shortcut to invoke the script in the Keyboard settings app. You'll normally need to specify the full patch to the script as the command for the custom shortcut.
This second version toggles through the sizes - so you could use a single keyboard shortcut to cycle from smaller, normal, larger and back again
This is not as easy as it really should be.
Unfortunately there is no straightforward cli command to invoke this change, but it is scriptable albeit the method is an ugly hack.
This basic script would work OK if align to grid and autoarrange are off. As written this sets the icon size to small. Save the script somewhere sensible and then set up a custom keyboard shortcut to invoke the script in the Keyboard settings app. You'll normally need to specify the full patch to the script as the command for the custom shortcut.
Code: Select all
#!/bin/bash
#Script to set nemo desktop icon size to small
# Set Working Directory
cd "$HOME/.config/nemo" || exit
# Add current value to var
OLDSIZE=$(grep "^nemo-icon-view-zoom-level=" desktop-metadata)
# Set new value (2 = smaller, 3 = normal, 4 = larger)
NEWSIZE="nemo-icon-view-zoom-level=2"
# Kill nemo-desktop
pkill nemo-desktop
# Update $HOME/.config/nemo/desktop-metadata
sed -i "s|$OLDSIZE|$NEWSIZE|g" desktop-metadata
# Restart nemo-desktop
nemo-desktop
Code: Select all
#!/bin/bash
#Script to toghle nemo-desktop icon size
# Set Working Directory
cd "$HOME/.config/nemo" || exit
# Add current value to var
OLDSIZE=$(grep "^nemo-icon-view-zoom-level=" desktop-metadata)
# Set new value (2 = small, 3 = normal, 4 = large)
if [[ $OLDSIZE = "nemo-icon-view-zoom-level=2" ]]; then
NEWSIZE="nemo-icon-view-zoom-level=3"
elif [[ $OLDSIZE = "nemo-icon-view-zoom-level=3" ]]; then
NEWSIZE="nemo-icon-view-zoom-level=4"
else
NEWSIZE="nemo-icon-view-zoom-level=2"
fi
# Kill nemo-desktop
pkill nemo-desktop
# Update $HOME/.config/nemo/desktop-metadata
sed -i "s|$OLDSIZE|$NEWSIZE|g" desktop-metadata
# Restart nemo-desktop
nemo-desktop
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
Re: Keyboard shortcut question...
Thank you very much! Awsome.
Both scripts work great.
So the only thing needed would be to disable Autoarrange and Align to Grid and to enable it at the end of the script.
Well beyond my ability
The reason why I'd like to control the icon size with a keyboard shortcut is because I use Conky and if I have too many icons they start disappearing behind Conky.
Both scripts work great.
So the only thing needed would be to disable Autoarrange and Align to Grid and to enable it at the end of the script.
Well beyond my ability
The reason why I'd like to control the icon size with a keyboard shortcut is because I use Conky and if I have too many icons they start disappearing behind Conky.
Re: Keyboard shortcut question...
I misunderstood. The second script doesn't require Autoarrange and Align to be off.
It works perfectly. Thank you again.
I'm jumping with joy
It works perfectly. Thank you again.
I'm jumping with joy