Skip to content

Commit 5491cee

Browse files
committed
remove inappropriate configuration module entry in metadata; add debug info refactor
1 parent ee607d3 commit 5491cee

File tree

7 files changed

+28
-3
lines changed

7 files changed

+28
-3
lines changed

always-open-on-active-screen/CHANGELOG.bbcode

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
[h2]v2.8[/h2]
2+
[list]\n[*] remove inappropriate configuration module entry in metadata
3+
[*] add debug info
4+
[*] refactor
5+
[/list]
6+
17
[h2]v2.7[/h2]
28
[list]
39
[*] fix desktop background disappearing

always-open-on-active-screen/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## v2.8
2+
- remove inappropriate configuration module entry in metadata
3+
- add debug info
4+
- refactor
5+
16
## v2.7
27
- fix desktop background disappearing
38

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
- remove inappropriate configuration module entry in metadata
2+
- add debug info
3+
- refactor

always-open-on-active-screen/contents/code/main.js

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,28 @@ KWin Script Always Open on Active Screen
44
GNU General Public License v3.0
55
*/
66

7+
// initialization
8+
const debugMode = readConfig("debugMode", true);
9+
function debug(...args) {if (debugMode)
10+
console.debug("alwaysopenonactivescreen:", ...args);}
11+
debug("initializing");
12+
713
// when a client is added
8-
workspace.clientAdded.connect(function(client) {
14+
workspace.clientAdded.connect(client => {
15+
debug("client", JSON.stringify(client, undefined, 2));
16+
917
// get active screen
1018
activeScreen = workspace.activeScreen;
19+
debug("active screen", activeScreen);
1120

21+
// abort if client is null or not a normal window
1222
if (!client || client.dock || client.desktopWindow) return;
23+
24+
// abort if client is already on the right screen
1325
if (client.screen == activeScreen) return;
1426

1527
// move client to active screen
16-
console.debug("sending client", client.caption, "to active screen", activeScreen);
28+
debug("sending client", client.caption, "to active screen", activeScreen);
1729
workspace.sendClientToScreen(client, activeScreen);
1830

1931
// clip and move client into bounds of screen dimensions

always-open-on-active-screen/metadata.desktop

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Comment[nl]=Opent nieuwe vensters altijd op het scherm met de cursor]
1212
Icon=preferences-system-windows
1313

1414
X-KDE-PluginInfo-Name=alwaysopenonactivescreen
15-
X-KDE-PluginInfo-Version=2.7
15+
X-KDE-PluginInfo-Version=2.8
1616
X-KDE-PluginInfo-Author=Natalie Clarius
1717
X-KDE-PluginInfo-Email[email protected]
1818
X-KDE-PluginInfo-License=GPL v3.0

0 commit comments

Comments
 (0)