No description
Find a file
2026-10-05 10:33:20 -05:00
close-activity-windows.desktop first com 2026-10-05 10:33:20 -05:00
close-activity-windows.sh first com 2026-10-05 10:33:20 -05:00
install.sh first com 2026-10-05 10:33:20 -05:00
README.txt first com 2026-10-05 10:33:20 -05:00
uninstall.sh first com 2026-10-05 10:33:20 -05:00

Close Activity Windows
======================

Purpose
-------
Closes normal, closeable windows assigned exclusively to the currently active
KDE Plasma Activity.

It intentionally does NOT close:
- Windows assigned to All Activities.
- Windows assigned to more than one Activity.
- Plasma/KWin special windows such as panels, desktop surfaces, and splash windows.
- Windows KWin reports as not closeable.

Safety
------
Launching the application does not immediately close anything. A KDE warning
confirmation is shown first. Applications with unsaved work may show their own
save/discard confirmation when KWin requests that they close.

Install
-------
1. Open a terminal in this directory.
2. Run:

   ./install.sh

3. Search the KDE Application Launcher for:

   Close Activity Windows

Uninstall
---------
Run:

   ./uninstall.sh

Technical design
----------------
The launcher is a Bash wrapper that shows a kdialog confirmation. After approval,
it loads a one-shot JavaScript into KWin over its D-Bus scripting interface.
The JavaScript reads workspace.currentActivity and workspace.stackingOrder, then
calls closeWindow() only for windows whose activities list contains exactly that
one Activity.

The activities-list rule is important: KWin represents a window assigned to
All Activities with an empty activities list.