Skip to content

Commit

Permalink
filter windows by activity; port away from deprecated Window::desktop
Browse files Browse the repository at this point in the history
  • Loading branch information
nclarius committed Dec 14, 2022
1 parent df317bf commit ee27d33
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.bbcode
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Automatically raises all other visible windows of the same application together when activating one of them, effectively creating application groups to task-switch between.

[b]Please make sure to install the most recent version (v1.5) and to not use Discover for installation.[/b] For more information on installation, setup and usage as well as any requests, please visit [url=https://github.com/nclarius/kwin-application-switcher]the GitHub page[/url].
[b]Please make sure to install the most recent version (v1.6) and to not use Discover for installation.[/b] For more information on installation, setup and usage as well as any requests, please visit [url=https://github.com/nclarius/kwin-application-switcher]the GitHub page[/url].

This extension gives rise to an application-centric task switching workflow as known from environments such as GNOME or MacOS, where an application’s windows are treated as a group, and task switching can take place at two levels: one mode for switching applications and one mode for switching between windows of an application.

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Seen in the screencast: Switching from Konsole back to Dolphin also brings the o

### Installation via graphical interface

**Please make sure to select the most recent version (v1.5)** in the installation process.
**Please make sure to select the most recent version (v1.6)** in the installation process.

A [bug](https://bugs.kde.org/show_bug.cgi?id=453521) in Discover causes a wrong version to be installed, so using the installation module in System Settings instead is recommended.

Expand Down Expand Up @@ -55,7 +55,7 @@ If you are intending to have one mode for switching applications and one mode fo

### Limitations

- The KWin scripting API provides no possibility to distinguish how a window was activated (via alt-tabbing, panel task bar clicking, clicking on the window, or being requested from another process), so the plugin can not be applied selectively to only some activation types.
- The KWin scripting API provides no possibility to distinguish how a window was activated (via alt-tabbing, clicking on the task bar, clicking on the window, or being requested from another process), so the plugin can not be applied selectively to only some activation types.
- The KWin scripting API provides no possibility to manipulate the recently used and stacking order without actually activating the window, so focus will briefly shift as windows are being brought to the front; however this happens so fast it shouldn’t be noticeable.

## Small Print
Expand Down
Binary file not shown.
4 changes: 2 additions & 2 deletions contents/code/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ function getAppGroup(current) {
if (!current) return;
let appGroup = appGroups[getApp(current)].filter(window => window &&
!window.minimized &&
(window.desktop == current.desktop ||
window.onAllDesktops || current.onAllDesktops));
(window.x11DesktopIds.includes(workspace.currentDesktop) || window.x11DesktopIds.length == 0) &&
(window.activities.includes(workspace.currentActivity) || window.activities.length == 0));
debug("getting app group", appGroup.map(window => window.caption));
return appGroup;
}
Expand Down
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"KWin/Script",
"KCModule"
],
"Version": "1.5",
"Version": "1.6",
"Website": ""
},
"X-Plasma-API": "javascript",
Expand Down

0 comments on commit ee27d33

Please sign in to comment.