XFCE: Hiding an application from the taskbar
A way to do it without Devil's Pie (2):
Do:
xprop | grep "CLASS"
and click on the window you want to remove from taskbar.
This will return something like
WM_CLASS(STRING) = "name", "name"
Make a program startup script or run once, depending on your preference:
wmctrl -x -r name.name -b add,skip_taskbar
Sources:
- https://forum.xfce.org/viewtopic.php?id=6755
- https://bbs.archlinux.org/viewtopic.php?id=133254
Devil's Pie is supposedly the easiest way to get this done, but it doesn't work as expected in Xubuntu or Xfce to be specific. The same applies to Devilspie2.
Setup requirement
Ensure that 'skip' property is not handled by the window manager. This is required in Xfce, but may be unnecessary in other desktop environments.
In Xfce, go to Settings Manager > Window Manager Tweaks > Cycling and look for this option Skip windows that have "skip pager" or "skip taskbar" properties set and disable the option (checkbox is empty). If the option remain enabled (checkbox is filled), the application will be hidden entirely altogether, which will give a "false result" as explained in my original answer.
Using Devil's Pie
For example, to hide Xfce4 Dictionary application window from the taskbar.
Open a text editor and type the following.
(if (is (application_name) "xfce4-dict") (skip_tasklist))
Save as
$HOME/.devilspie/hide.ds
(the filename can be anything, but must have.ds
extension).Run
devilspie
in Terminal.
In step 1, an alternative is to use (window_name) "Dictionary"
that will match the text that appears in titlebar. But some applications will change the text according to the content, so using (application_name)
is preferred instead.
Using Devilspie2
The same example is adapted for using Devilspie2.
Open a text editor and type the following.
if (get_application_name()=="xfce4-dict") then set_skip_tasklist(true); end
Save as
$HOME/.config/devilspie2/skip.lua
(the filename can be anything, but must have.lua
extension).Run
devilspie2
in Terminal.
Which one: Devil's Pie or Devilspie2
Use either one, whichever user prefers. Devil's Pie and Devilspie2 have similar features however, each scripting is different and incompatible to each other. Devilspie2 looks for LUA scripts and the rules of the original Devil's Pie are not supported.
Both are available in universe repository of any supported releases of Ubuntu, according to this Ubuntu Packages search result.
Both have
-d
option for verbose output, which will print debug information. Devilspie2 has several more options, such as option to specify folder to look for scripts outside the default path$HOME/.config/devilspie2
.Both have been tested working in Xubuntu 14.04 (Xfce 4.10), with respect to the question asked by the original poster in 2015.
Development status: This GNOME Wiki noted that Devil's Pie isn't really maintained and similarly the developer site noted version 0.22 was the last version updated in late 2007. This changelog on Launchpad noted that new maintainer is handling Devil's Pie from version 0.22-2.
The fastest and easiest way to remove from taskbar a particular window is to use the special string :SELECT:
in wmctrl:
wmctrl -r :SELECT: -b add,skip_taskbar
...now you will only have to click on the window that you want to hide.
If you need to return this window to the taskbar, use
wmctrl -r :SELECT: -b remove,skip_taskbar
Sourses:
- Muehe answer is helped me
wmctrl -h