Gamescope DBus is an open source daemon for Linux that can be used to control the Gamescope compositor over DBus. This interface provides a UI-agnostic way to interact with Gamescope to make it easier to write your own user interface and integrate it with Gamescope.
You can install with:
make build
sudo make install
If you are using ArchLinux, you can install Gamescope DBus from the AUR:
yay -S gamescope-dbus-bin
Then start the service with:
systemctl --user enable --now gamescope-dbus
XML specifications for all interfaces can be found in bindings/dbus-xml.
Individual interface documentation can be found here:
When Gamescope DBus is running as a service, you can interact with it over DBus. There are various DBus libraries available for popular programming languages like Python, Rust, C , etc.
You can also interface with DBus using the busctl
command:
busctl --user tree org.shadowblip.Gamescope
└─ /org
└─ /org/shadowblip
└─ /org/shadowblip/Gamescope
├─ /org/shadowblip/Gamescope/Manager
├─ /org/shadowblip/Gamescope/Wayland0
├─ /org/shadowblip/Gamescope/XWayland0
└─ /org/shadowblip/Gamescope/XWayland1
busctl --user introspect org.shadowblip.Gamescope /org/shadowblip/Gamescope/XWayland0
NAME TYPE SIGNATURE RESULT/VALUE FLAGS
org.freedesktop.DBus.Introspectable interface - - -
.Introspect method - s -
org.freedesktop.DBus.Peer interface - - -
.GetMachineId method - s -
.Ping method - - -
org.freedesktop.DBus.Properties interface - - -
.Get method ss v -
.GetAll method s a{sv} -
.Set method ssv - -
.PropertiesChanged signal sa{sv}as - -
org.shadowblip.Gamescope.XWayland interface - - -
.GetAllWindows method u au -
.GetAppId method u u -
.GetWindowChildren method u au -
.GetWindowName method u s -
.HasAppId method u b -
.SetAppId method uu - -
.Name property s ":2" emits-change
.Primary property b true emits-change
.RootWindowId property u 962 emits-change
org.shadowblip.Gamescope.XWayland.Primary interface - - -
.GetBaselayerWindow method - u -
.GetOverlay method u u -
.IsFocusableApp method u b -
.RemoveBaselayerWindow method - - -
.RequestScreenshot method - - -
.SetBaselayerWindow method u - -
.SetExternalOverlay method uu - -
.SetInputFocus method uu - -
.SetMainApp method u - -
.SetNotification method uu - -
.SetOverlay method uu - -
.AllowTearing property b false emits-change writable
.BlurMode property u 0 emits-change writable
.BlurRadius property u 0 emits-change writable
.FocusableApps property au 1 4194306 emits-change
.FocusableWindowNames property as - emits-change
.FocusableWindows property au 3 4194306 4194306 64337 emits-change
.FocusedApp property u 0 emits-change
.FocusedAppGfx property u 0 emits-change
.FocusedWindow property u 4194306 emits-change
.FpsLimit property u 0 emits-change writable
.OverlayFocused property b false emits-change
.BaselayerWindowUpdated signal - - -
When Gamescope DBus is running, you can test setting properties with:
busctl set-property org.shadowblip.Gamescope /org/shadowblip/Gamescope/XWayland0 org.shadowblip.Gamescope.Primary BlurMode "u" 2
Gamescope DBus is licensed under THE GNU GPLv3 . See LICENSE for details.