You are not logged in.
Hello,
I'm running Xfce 4.14 on Xubuntu 20.04. I'd like to change the spacing/padding between icons on the desktop.
The computer I'm working on is for an octogenarian whose vision isn't as sharp as it used to be and who isn't as much of a power user as she was before she retired. So I'd like to put very large launcher icons on her desktop for the dozen or so things she does the most. The problem is that as icon size goes up, spacing between rows of icons also goes up proportionally, leaving large areas of empty space. I'd like to reduce that padding so I can fit another row of icons on the desktop without shrinking them.
I've searched this forum (and the internet at large), and solution appears to be modifying some css files used by gtk to render the desktop. But I can't figure out what css file, where it needs to be, or what lines exactly it needs to include.
Any help is greatly appreciated!
Last edited by gldearman (2021-09-20 04:12:55)
Offline
Hello and welcome.
Try putting this in ~/.config/gtk-3.0/gtk.css (create the file if it doesn't exist):
XfdesktopIconView.view {
-XfdesktopIconView-cell-spacing:0;
-XfdesktopIconView-cell-padding:0;
-XfdesktopIconView-cell-text-width-proportion:1.0;
}
...and restart xfdesktop:
pkill xfdesktop
As per the docs these settings do the following:
Icon grid
The third four entries set spacing and sizing for individual icons on the grid. The 'cell-spacing' property specifies the spacing between each 'cell' in the grid of icons. The 'cell-padding' property sets extra padding placed around each icon+text. The units for these two are in pixels. The 'cell-text-width-proportion' property specifies the maximum width of the text label underneath the icon, as a multiplier of the icon width (so for 30px icons, '2.5' would leave a 75px wide area underneath for the text).
Feel free to play around with those values though I believe the 0 is the smallest value you can use.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Thank you!
Offline
This is now unsolved somehow. Following the advice in another thread while trying to fix window button issues, I went to Settings>Appearance>Fonts and set a custom DPI of 120, figuring that would be easy enough to revert. It immediately reverted the icon spacing to the way it was before my custom CSS. So I set it back to the previous value (custom DPI of 96). But even after rebooting, the icons aren't spaced the way they were—the bottom row is off the screen. Changing the values in my gtk.css file doesn't seem to have any effect.
What did I change, why is the change apparently irreversible, and how do I get back to where I was?
Last edited by gldearman (2021-09-19 19:52:34)
Offline
It should be reversible. Try unchecking "Custom DPI setting" and restarting the panel:
xfce4-panel -r
If that doesn't fix it, try cheking it back on (with a value of 96) and restarting the panel again.
If still no difference, can you post back:
the contents of ~/.config/gtk-3.0/gtk.css
the results of:
xfconf-query -c xfce4-panel -lv
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Tried turning off custom DPI and restarting. Icon rows on desktop still spaced incorrectly. Turned custom DPI back on at 96 and restarted. Still no change.
Contents of gtk.css are as follows:
XfdesktopIconView.view {
-XfdesktopIconView-cell-spacing:0;
-XfdesktopIconView-cell-padding:0;
-XfdesktopIconView-cell-text-width-proportion:1.6;
}
.tasklist {
font-size: 180%;
}
#clock-button {
font-size: 180%;
}
That first block in the file (the one referring to XfdesktopIconView) no longer seems to be doing anything; when I adjust the values, nothing changes.
Output of xfconf-query -c xfce4-panel -lv is:
/configver 2
/panels <<UNSUPPORTED>>
/panels/panel-0/autohide-behavior 0
/panels/panel-0/background-rgba <<UNSUPPORTED>>
/panels/panel-0/background-style 0
/panels/panel-0/icon-size 0
/panels/panel-0/length 100
/panels/panel-0/length-adjust true
/panels/panel-0/mode 0
/panels/panel-0/plugin-ids <<UNSUPPORTED>>
/panels/panel-0/position p=8;x=720;y=886
/panels/panel-0/position-locked true
/panels/panel-0/size 48
/panels/panel-0/span-monitors false
/plugins/plugin-1 whiskermenu
/plugins/plugin-10 pulseaudio
/plugins/plugin-10/enable-keyboard-shortcuts true
/plugins/plugin-10/enable-mpris true
/plugins/plugin-10/mixer-command pavucontrol
/plugins/plugin-10/mpris-players parole
/plugins/plugin-10/show-notifications true
/plugins/plugin-11 separator
/plugins/plugin-11/expand false
/plugins/plugin-11/style 0
/plugins/plugin-12 clock
/plugins/plugin-12/digital-format %a. %m/%d/%y %l:%M %p%
/plugins/plugin-12/mode 2
/plugins/plugin-2 separator
/plugins/plugin-2/expand false
/plugins/plugin-2/style 0
/plugins/plugin-3 tasklist
/plugins/plugin-3/flat-buttons true
/plugins/plugin-3/show-handle false
/plugins/plugin-3/show-labels true
/plugins/plugin-4 separator
/plugins/plugin-4/expand true
/plugins/plugin-4/style 0
/plugins/plugin-5 systray
/plugins/plugin-5/names-ordered <<UNSUPPORTED>>
/plugins/plugin-5/show-frame false
/plugins/plugin-5/size-max 22
/plugins/plugin-5/square-icons true
/plugins/plugin-6 notification-plugin
/plugins/plugin-7 indicator
/plugins/plugin-7/blacklist <<UNSUPPORTED>>
/plugins/plugin-7/known-indicators <<UNSUPPORTED>>
/plugins/plugin-7/square-icons true
/plugins/plugin-8 statusnotifier
/plugins/plugin-8/icon-size 48
/plugins/plugin-8/known-items <<UNSUPPORTED>>
/plugins/plugin-8/menu-is-primary true
/plugins/plugin-8/mode-whitelist false
/plugins/plugin-8/single-row false
/plugins/plugin-8/square-icons true
/plugins/plugin-8/symbolic-icons true
But do note that the problem I'm seeing is on the desktop, not the panel.
Offline
So are the second two sets (tasklist and #clock-button) of configs for the panel working than?
Can you post back:
ps -ef | grep -i desktop
...and:
xfconf-query -c xsettings -lv
xfconf-query -c xfce4-desktop -lv
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Changes made to that first block in that file (the one referring to XfdesktopIconView) are definitely being registered. I don't know why I thought they weren't. Maybe I was just flustered because I'd broken my desktop. But it's definitely not lining up the same way it was before: I previously had three rows of four icons each that filled the desktop. No amount of css tweaking seems to be able to restore that condition; the moment only four icons fit on a row, only two rows fit on the desktop.
The rest of the css (the clock and window button text) still works fine.
The output of ps -ef | grep -i desktop is:
dee 26365 26236 0 20:09 ? 00:00:00 xfdesktop
dee 26841 26830 0 20:20 pts/0 00:00:00 grep --color=auto -i desktop
The output of xfconf-query -c xsettings -lv is:
/Gdk/WindowScalingFactor 1
/Gtk/ButtonImages true
/Gtk/CanChangeAccels false
/Gtk/ColorPalette black:white:gray50:red:purple:blue:light blue:green:yellow:orange:lavender:brown:goldenrod4:dodger blue:pink:light green:gray10:gray30:gray75:gray90
/Gtk/CursorThemeName Human
/Gtk/CursorThemeSize 24
/Gtk/DecorationLayout menu:minimize,maximize,close
/Gtk/FontName Ubuntu 9
/Gtk/IconSizes gtk-button=16,16
/Gtk/KeyThemeName
/Gtk/MenuBarAccel F10
/Gtk/MenuImages true
/Gtk/MonospaceFontName Ubuntu Mono 10
/Gtk/ToolbarIconSize 3
/Gtk/ToolbarStyle icons
/Net/CursorBlink true
/Net/CursorBlinkTime 1200
/Net/DndDragThreshold 8
/Net/DoubleClickDistance 5
/Net/DoubleClickTime 400
/Net/EnableEventSounds false
/Net/EnableInputFeedbackSounds false
/Net/FallbackIconTheme gnome
/Net/IconThemeName SuperHumanity
/Net/SoundThemeName default
/Net/ThemeName Greybird
/Xfce/LastCustomDPI 96
/Xft/Antialias 1
/Xft/DPI 96
/Xft/Hinting 1
/Xft/HintStyle hintslight
/Xft/Lcdfilter lcddefault
/Xft/RGBA rgb
The output of xfconf-query -c xfce4-desktop -lv is:
/backdrop/screen0/monitor0/image-path /usr/share/xfce4/backdrops/xubuntu-wallpaper.png
/backdrop/screen0/monitor0/image-show true
/backdrop/screen0/monitor0/image-style 5
/backdrop/screen0/monitor1/image-path /usr/share/xfce4/backdrops/xubuntu-wallpaper.png
/backdrop/screen0/monitor1/image-show true
/backdrop/screen0/monitor1/image-style 5
/backdrop/screen0/monitor2/image-path /usr/share/xfce4/backdrops/xubuntu-wallpaper.png
/backdrop/screen0/monitor2/image-show true
/backdrop/screen0/monitor2/image-style 5
/backdrop/screen0/monitor3/image-path /usr/share/xfce4/backdrops/xubuntu-wallpaper.png
/backdrop/screen0/monitor3/image-show true
/backdrop/screen0/monitor3/image-style 5
/backdrop/screen0/monitorVGA-1/workspace0/color-style 0
/backdrop/screen0/monitorVGA-1/workspace0/image-style 5
/backdrop/screen0/monitorVGA-1/workspace0/last-image /home/dee/.common_files/wallpaper/beach-1761410_1920.jpg
/desktop-icons/file-icons/show-filesystem false
/desktop-icons/file-icons/show-home false
/desktop-icons/file-icons/show-removable true
/desktop-icons/file-icons/show-trash false
/desktop-icons/font-size 24.000000
/desktop-icons/gravity 1
/desktop-icons/icon-size 177
/desktop-icons/show-thumbnails true
/desktop-icons/show-tooltips false
/desktop-icons/style 2
/desktop-icons/tooltip-size 64.000000
/desktop-icons/use-custom-font-size true
/last/window-height 819
/last/window-width 561
/windowlist-menu/show-add-remove-workspaces false
/windowlist-menu/show-workspace-names false
I appreciate any help. I'm completely mystified.
Offline
Try deleting the *.rc files in ~/.config/xfce4/desktop and then running:
pkill xfdesktop
...and/or log out and back in again.
If that doesn't work, delete the files in that directory before you log in (from another virtual console) in case they are getting improperly saved on log out. Might also be a good idea to delete the contents of ~/.cache/sessions.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
That got it. Thanks!
Offline
[ Generated in 0.011 seconds, 8 queries executed - Memory usage: 605.12 KiB (Peak: 621.96 KiB) ]