My distro-hopping that has been going on for several years now recently came to an end after I found MX-Linux. Based on Debian, this distribution is stable, has a well maintained repository with plenty of packages and most of all, doesn’t need to be updated regularly like some rolling releases I had previously used in the past.
Since I was planning on transitioning completely from Windows, I wanted to replicate some of my workflow and one of the first things I set out to look for was a replacement for Rocket Dock.
Fortunately, there is no shortage of docks in the Linux world. I tried a couple and was almost settling for Cairo Dock until I realized it was too much for my modest needs.Then, whilst tweaking the main panel it occurred to me I could easily re-purpose one of the XFCE panels as a dock.
Here’s how to configure one in your XFCE desktop.
XFCE Panel Dock
- Right-click on your desktop then navigate to
Applications > Settings > Panel
- In the Panel Preferences window click the plus icon to add a new panel.
- Configure the panel’s mode and measurements to your liking so that it looks like a dock.
- Next, right-click the panel and select Add New Items…
- Now just add all the items you need in your dock, including some handy widgets. For programs use the Launcher option and for folders use the Directory Menu or Places widgets. You can also add a separator to group your items into various sections.
- Once you’ve added all the items you require, right-click on each item and select Properties to configure their actions. You can add any programs installed to the Launcher item and any folder in your computer to the directory menu.
You can also add a little flair to the appearance of your folders by changing the icon. Just select from the Location Icons and choose a style that you like.
Note: These icons are dependent on the theme you’re using; so if you happen to change the style, the icons may show up as blank.
Fix Panel from Sticking Above Windows and Taking Space
As shown above, our dock should be good to go, however you’ll notice that it sticks above other windows and takes up space if you’ve attached it to one of the edges.
To fix the latter, just go to the panel preferences and enable the option Don't reserve space on borders
.
For the former, we need to add a script that will select the panel at start-up and make it stay below other windows. To do that, create a new file somewhere in your Home directory and save the following code in it:
#!/bin/bash
# Wait for all panels to load
while [ "$(wmctrl -l | grep -c xfce4-panel)" -lt "2" ];
do
sleep 0.05s
done
# Determine identifier
ID=$(wmctrl -l | grep xfce4-panel | sed 3p | awk '{ print $1 }' | tail -1)
# Place panel at desktop-level
wmctrl -i -r $ID -b add,below
[This script is courtesy of this thread on the XFCE forums. Please check it along with the other linked threads for more options.]
The above script assumes you have two XFCE panels and are targeting the second one. If it’s the first panel, change tail -1
into head -1
.
Next go to Settings > Session and Startup > Application Autostart
and add the file to the startup list by pointing to it in the command box.
When you’re done reboot or simply log out then in and start using your custom lightweight dock!