LinuxCommandLibrary

kdocker

Dock KDE applications into the system tray

TLDR

Display a cursor to send a window to the system tray when pressing the left mouse button (press any other mouse button to cancel)

$ kdocker
copy

Open an application and send it to the system tray
$ kdocker [application]
copy

Send focused window to the system tray
$ kdocker -f
copy

Display a cursor to send a window to the system tray with a custom icon when pressing the left mouse button
$ kdocker -i [/path/to/icon]
copy

Open an application, send it to the system tray and if focus is lost, minimize it
$ kdocker -l [application]
copy

Display version
$ kdocker --version
copy

SYNOPSIS

kdocker [options] [command]

PARAMETERS

-h, --help
    Display help message and exit.

-v, --version
    Display version information and exit.

-w , --window
    Specify a window ID to dock.

-n , --name
    Specify the window name of the application to dock (useful for application started before kdocker).

-i , --icon
    Specify the path to the icon to use in the system tray.

-t , --title
    Set the tooltip title for the system tray icon.

-f, --force
    Force docking even if the application already has a system tray icon.

-d , --delay
    Specify a delay in milliseconds before docking the application.

DESCRIPTION

kdocker is a utility that allows you to dock almost any application into the system tray (also known as the notification area). This is particularly useful for applications that don't natively support system tray integration. By launching an application via kdocker, its window will be hidden from the taskbar, and instead, an icon representing the application will appear in the system tray.

This can help reduce clutter on your taskbar and provide a more discreet way to manage running applications. kdocker essentially 'reparents' the application window to the system tray. When the user clicks on the system tray icon, the original application window is restored (or a menu of options is provided, depending on the application and kdocker's configuration). kdocker is mostly used for legacy applications that doesn't support system tray docking.

CAVEATS

kdocker may not work perfectly with all applications. Some applications may have unexpected behavior when docked, or may not be dockable at all. Compatibility depends on the application and the window manager used.

It depends on X11 and therefore won't function properly on Wayland without XWayland.

EXAMPLES

Docking the application 'firefox':
kdocker firefox

Docking with a specified icon and title:
kdocker -i /path/to/icon.png -t "My Application" myapp

HISTORY

kdocker emerged as a solution to provide system tray functionality for applications predating widespread system tray integration. It gained popularity among users of older or less feature-rich window managers or desktop environments. Its usage has decreased with more modern applications and desktop environments natively supporting system tray functionality.

SEE ALSO

wmctrl(1), xprop(1), xdotool(1)

Copied to clipboard