Xfce tweaks - Make your desktop prettier

Updated: September 9, 2017

Welcome, children of the Internet. Uncle Dedo is going to show you some nice wizardly tricks on how you can improve the look and feel of your Xfce desktop environment. Simple things that are not always available by default, and yet they make so much difference, especially to people used to a higher level of functional aesthetics.

Say you've switched from Plasma, Gnome or Windows to Xfce, and now you're wondering why some things look so awkward. Not to worry. We will fix all them woes. Inspired by my recent testing and exploration of Manjaro 17.0.1 Gellivara. Now, roll your sleeves. We begin.

Teaser

System area be cool

Manjaro. Observe the system area. It's quite chaotic. We don't want that. The icons do not have equal vertical size, the spacing is all wrong, the choice of colors is debatable, and there's that weird artifact underneath the Wireless icon.

System area

System area, enlarged

The first thing is indeed to tweak the Notification Area. Right click, Properties. You can now choose the icon size, whether to display a frame around the area (nope), as which icons to hide. This is a good starting point toward de-clutterification. In general, slightly larger icons, but less than the panel height by about 1-2px, will normally give you a better placement.

Notification area

Desktop icons, truncated text

We've already talked about making desktop icons nicer. We made the background transparent, during the Pangolin test on my lovely if ancient eeePC machine, which has recently been upgraded to Xerus. Now, we will fix this additional woes. Not all characters show in the displayed text. And we want it all.

The solution is to open the gtkrc-2.0 file in your home directory. If it does not exist, create one. Then, add the following text into the file. You can now either logout and then log back in, or just change your theme to a different one and then back. This will load the configuration afresh and you will see the effect take place.

style "xfdesktop-icon-view" {
    XfdesktopIconView::ellipsize-icon-labels = 0
    XfdesktopIconView::label-alpha = 0
}

widget_class "*XfdesktopIconView*" style "xfdesktop-icon-view"

Bottom panel, ugly separator

You may notice - and I believe I've seen this in multiple distros, including MX-16, there's a special floating separator that pushes the system area to the right and the shortcut icons and the task area to the left. This expanded separator then moves, depending on how many open applications there are. Ugly and annoying.

Right-click, Properties. Make sure the box that reads Expand is ticked, otherwise the bottom panel will shrink, but change the style from Separator to Transparent. Then it will become sort of a space filler, except you won't see anything.

Separator, default Separator, transparent

Bottom panel, window buttons color

If you make the bottom panel transparent, you may notice that the window buttons for open applications may have annoying filler colors and text-on-hover effects that do not align with your choice of the wallpaper, making text impossible to read.

There are two solutions to this problem - manually, you can edit themes. For each theme, there ought to be a panel.rc file, usually located under /usr/share/themes/<theme>, and sometimes (also) in the gtk-2.0 sub-folder. In this file, look for the following block, which reads something like:

style "theme-panel" {

xthickness = 1
ythickness = 1

bg[NORMAL] = "#3C403E"
bg[ACTIVE] = "#232423"
bg[PRELIGHT] = "#454A47"
bg[SELECTED] = @selected_bg_color

fg[NORMAL] = "#F3F5F3"
fg[PRELIGHT] = "#F3F5F3"
fg[ACTIVE] = "#F3F5F3"
fg[SELECTED] = "#F3F5F3"

text[NORMAL] = "#F3F5F3"
text[PRELIGHT] = "#F3F5F3"
text[ACTIVE] = "#F3F5F3"
text[SELECTED] = "#F3F5F3"
...

You can then, in the typical HTML fashion, change the color of elements - background and foreground color, on-hover color, and so forth. The affected attributes are bg, fg and text. However, do note that such changes will only be relevant for the particular theme, the layout may not be as straightforward as above, and files can source other files, which can make finding the right declarations a bit difficult. Plus, the themes may get overwritten with updates, as I've shown in the Gnome theme edit article. More on this later.

The second method does not require any configuration changes. But I wanted to highlight the geeky way first, so you understand what happens in the background and how things work. Right-click on the panel, Properties, Windows Buttons tab. Click Show flat buttons. It's not intuitive, I know, but it will make the open application buttons look nicer and transparent.

Window buttons

Flat window buttons, panel

Bottom panel, clock color

Remember theme editing? Well, the easier, cleaner, more elegant solution is to make changes to the gtkrc-2.0 file. And this brings us to the digital clock color. Again, it usually will not auto-change based on the bottom panel tweaks, so the text may disappear. The solution is to change the text color.

This is done in a fashion very similar to the above - and now that you know and somewhat understand the basics of theme editing and manipulation, what you need to do is add or edit a block of attributes in your gtkrc-2.0 config:

style "panel"
{
    fg[NORMAL] = "#FFFFFF"
}

widget_class "*Panel*"      style "panel"
widget "*Panel*"            style "panel"
class "*Panel*"             style "panel"

Log out, log in, change the theme, or restart the panel to see the effect:

xfce4-panel -r

And the effects be thusly:

Clock color

More reading

And of course, you may want to check these, too:

CentOS 7 Xfce setup

CentOS 7 Xfce with Numix icons

CentOS 7 Xfce taming 'n' pimping

Conclusion

Are these tweaks necessary? Nope. And in an ideal world, one should never have to tweak their desktop any which way. But if you are using the Xfce environment, and you'd like to make it ever so slightly friendlier and better suited for everyday days, these tips, in addition to my previous pimping guides, ought to help you get the best from it.

Today, we focused mostly on the panel and system area, some desktop icon tweaks, but mostly, on how to work with configuration files and make special changes that are not necessarily reflected through any GUI tool. In the end, modern desktops are like web pages, so you become a creator slash artist. Well, that would be all for today.

Cheers.