GTKDock is a GTKmm4 based Dock that tries to be WM agnostic inspired by nwg-dock.
It is very much still in development. Right now it works best on hyprland but needs a little coding knowledge to add support for other window managers.
If WM is wayland it has to support gtk-layer-shell
Compiletime: GLM GTKmm4 gtk-layer-shell
Runtime: Wayland: hyprctl (for hyprland)
Build with make: make clean && make -j $(nproc --ignore=2)
Installation: ln -s $(pwd)/GTKDock $HOME/.local/bin
Or (if ~/.config/GTKDock exists): mv ./GTKDock ~/.local/bin/
GTKDock -d[monIdx] -e[edgeIdx] -a[alignmentIdx]
(Dock Edge Possible values: 0 = left 1 = top 2 = right 3 = bottom)
(Dock Alignment Possible values: 0 = center 1 = left 2 = top 3 = right 4 = bottom)
conf/pinnedApps stores the pinned Apps and their order in the Format
name:execCmd:iconPath:desptopFilePath
you can add reorder the lines to change the ordering of pinned Apps in the Dock
futher configuration is available in conf/settings.conf
There are two ways of using GTKDock either leaving it in its Project Dir and linking to it
or moving config and imgs folders to ~/.config/GTKDock so one can use the executable anywhere
-d Controlls which monitor the dock gets created on and controlls (if isolated_to_monitor is 1)
-e Controlls which edge the dock sticks to and ianimates into (sildes in and out of)
-a Controlls the dock alignment on the display edge (ex. dock is on the bottom on the left or dock is on the left edge on the topside ...)
./GTKDock -d1 -e3 -a0
GTKDock has been tested on Hyprland and GNOME on wayland
to add support to other WM's you'd need to
- add functionlity for function in
wm-specific-impl.cpp - extend list_windows.bash to work for your WM (if it doesn't)
Bash script that queries the wm for running applications
Returned format should be:
monitorIdx-:-specificWindowTitle-:-windowClass-:-isFullscreen (0 or 1)-:-PID
hyprland is implemented
each line is directly tied to an AppInstance in GTKDock
defines the wm-specific functions these function are then implemented in wm-specific-impl.cpp
void GLS_setup_top_layer(Gtk::Window * win, int dispIdx, int edgeMargin, const std::string& name, DockEdge edge)
Is run on wayland to make window appear in the TOP layer and be anchored to a display edge
Chganges the distance between the window edge and the display edge on wayland
makes WM get the instance i.e. focus on it / bring it back from minimized status ...
makes WM close the instance(window)
checks if gtk-layer-shell protocol is supported
adds buttons to the context menu of an instance that can do arbitrary functionality
for example toggle floating on hyprland
imgs/launcher.png is used for the launcher button and conf/style.css is used to style all the elements in the Dock.
conf/settings.conf controlls:
- icon size
- padding
- hotspot height i. e. region that activates the dock
- auto-hide timeout (time to wait before hiding dock) and animation duration
- to draw launcher btn or not
- margin from screen edge
- cmd to be executed when launcher btn is pressed
- if dock is isolated to the apps running in its monitor or whether it should show windows on all screens
- exclusive mode creates a zone where only the dock exists (this is a wayland only feature)
- hotfix_height and hotfix_width is a little fix for compatibility with other topbars / exclusive zone windows that may exist
You might want to use GTK_DEBUG=interactive to help with customization :)


