This KWin effect provides a tactile, spring-y horizontal slide for Plasma notifications, replacing the default fade animations. Originally designed for KDE Neon, this version has been updated with a generic build system to support various Plasma 6 distributions.
This project file reworked to make a successful generic CMakeLists.txt and SlidingEffects.cpp plugin
- Horizontal Only: Strict lock on the Y and Z axes to prevent diagonal drifting.
- Tactile Entrance: Uses an OutBack easing curve for a physical “snap” feel.
- Stealth Exit: A manual timer-based exit that “cuts the feed” before KWin unmaps the window, eliminating final-frame stutter.
- Notification Sound: Automatically triggers a notification sound using
pw-play. - Generic Compatibility: Uses CMake discovery to find KWin headers regardless of whether the distro uses
/usr/include/kwinor/usr/include/KWin.
To build this plugin, you need the C++ development environment and KWin/KF6 headers.
sudo apt install g++ cmake extra-cmake-modules libkwin-dev \
libkf6config-dev libkf6configwidgets-dev libkf6coreaddons-dev \
libkf6windowsystem-dev qt6-base-devsudo dnf install gcc-c++ cmake extra-cmake-modules kwin-devel \
kf6-kconfig-devel kf6-kconfigwidgets-devel kf6-kcoreaddons-devel \
kf6-kwindowsystem-devel qt6-qtbase-develsudo pacman -S base-devel cmake extra-cmake-modules kwin \
kconfig kconfigwidgets kcoreaddons kwindowsystem qt6-baseThe effect is hardcoded to play a sound via PipeWire on window entry:
- Command:
/usr/bin/pw-play - Target:
/usr/share/sounds/oxygen/stereo/message-new-instant.ogg
Note: If the sound file or pw-play is missing, the plugin will remain silent and continue to function normally without crashing.
The generic CMakeLists.txt will automatically detect your system's library paths.
mkdir build && cd build
cmake ..
makeThis will install the plugin to the appropriate KDE Qt6 plugin directory:
sudo make installEnable the plugin and tell KWin to reload its effects without restarting your session:
# Enable the plugin
kwriteconfig6 --file kwinrc --group Plugins --key kwin_final_slidingEnabled true
# Reload KWin effects
qdbus6 org.kde.KWin /Effects org.kde.KWin.Effects.loadDefaultEffectsKWin 6 headers are not considered a stable API. If the build fails:
- Missing Headers: Ensure
libkwin-dev(or your distro's equivalent) is installed. The CMake script looks foreffect/effect.h. - Library Mismatch: The script looks for
libkwin.so.6. If you are on an older or experimental system, verify your KWin library version in/usr/lib/. - Logs: Check
journalctl -fwhile reloading effects to see if KWin reports any "Plugin could not be loaded" errors.
