Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 36 additions & 1 deletion CassiaWindowList@klangman/4.0/applet.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,9 @@ const MouseAction = {
GroupedWindow3: 37,
GroupedWindow4: 38,
MoveHere: 39, // Change the windows monitor and workspace to be the current monitor and workspace
AlwaysOnTop: 40 // Toggle the windows "Always on top" state
AlwaysOnTop: 40, // Toggle the windows "Always on top" state
CloseAll: 41, // Close all windows for this application
CloseAllOthers: 42 // Close all windows for this application except the active one
}

// Possible value for the Mouse scroll wheel action setting (used when the Thumbnail menu is closed, or the Thumbnail scroll action is disabled)
Expand Down Expand Up @@ -3216,6 +3218,39 @@ class WindowListButton {
}
}
break;
case MouseAction.CloseAll: {
let btns = this._workspace._lookupAllAppButtonsForApp(this._app);
if (this.getNumberOfWindow() > 1) {
for (let i = this.getNumberOfWindow() - 1; i >= 0; i--) {
this._windows[i].delete(global.get_current_time());
}
} else if (btns.length > 1) {
for (let i = btns.length - 1; i >= 0; i--) {
btns[i]._currentWindow.delete(global.get_current_time());
}
} else if (window) {
window.delete(global.get_current_time());
}
break;
}
case MouseAction.CloseAllOthers: {
if (!window) break;
let btns = this._workspace._lookupAllAppButtonsForApp(this._app);
if (this.getNumberOfWindow() > 1) {
for (let i = this.getNumberOfWindow() - 1; i >= 0; i--) {
if (this._windows[i] !== window) {
this._windows[i].delete(global.get_current_time());
}
}
} else if (btns.length > 1) {
for (let i = btns.length - 1; i >= 0; i--) {
if (btns[i]._currentWindow !== window) {
btns[i]._currentWindow.delete(global.get_current_time());
}
}
}
break;
}
}
}

Expand Down
14 changes: 14 additions & 0 deletions CassiaWindowList@klangman/4.0/settings-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,8 @@
"Tile bottom": 31,
"Tile bottom left": 32,
"Untile window": 33,
"Close all": 41,
"Close all others": 42,
"Do nothing": 12
},
"description": "Thumbnail window middle button action"
Expand Down Expand Up @@ -490,6 +492,8 @@
"Tile bottom": 31,
"Tile bottom left": 32,
"Untile window": 33,
"Close all": 41,
"Close all others": 42,
"Do nothing": 12
},
"description": "Thumbnail window back button action"
Expand Down Expand Up @@ -532,6 +536,8 @@
"Tile bottom": 31,
"Tile bottom left": 32,
"Untile window": 33,
"Close all": 41,
"Close all others": 42,
"Do nothing": 12
},
"description": "Thumbnail window forward button action"
Expand Down Expand Up @@ -626,6 +632,8 @@
"Tile bottom": 31,
"Tile bottom left": 32,
"Untile window": 33,
"Close all": 41,
"Close all others": 42,
"Do nothing": 12
},
"description": "Middle button action",
Expand Down Expand Up @@ -675,6 +683,8 @@
"Tile bottom": 31,
"Tile bottom left": 32,
"Untile window": 33,
"Close all": 41,
"Close all others": 42,
"Do nothing": 12
},
"description": "Back button action",
Expand Down Expand Up @@ -724,6 +734,8 @@
"Tile bottom": 31,
"Tile bottom left": 32,
"Untile window": 33,
"Close all": 41,
"Close all others": 42,
"Do nothing": 12
},
"description": "Forward button action",
Expand Down Expand Up @@ -879,6 +891,8 @@
"Tile bottom": 31,
"Tile bottom left": 32,
"Untile window": 33,
"Close all": 41,
"Close all others": 42,
"Do nothing": 12
}
}
Expand Down
37 changes: 36 additions & 1 deletion CassiaWindowList@klangman/5.4/applet.js
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,9 @@ const MouseAction = {
GroupedWindow3: 37,
GroupedWindow4: 38,
MoveHere: 39, // Change the windows monitor and workspace to be the current monitor and workspace
AlwaysOnTop: 40 // Toggle the windows "Always on top" state
AlwaysOnTop: 40, // Toggle the windows "Always on top" state
CloseAll: 41, // Close all windows for this application
CloseAllOthers: 42 // Close all windows for this application except the active one
}

// Possible value for the Mouse scroll wheel action setting (used when the Thumbnail menu is closed, or the Thumbnail scroll action is disabled)
Expand Down Expand Up @@ -3282,6 +3284,39 @@ class WindowListButton {
}
}
break;
case MouseAction.CloseAll: {
let btns = this._workspace._lookupAllAppButtonsForApp(this._app);
if (this.getNumberOfWindow() > 1) {
for (let i = this.getNumberOfWindow() - 1; i >= 0; i--) {
this._windows[i].delete(global.get_current_time());
}
} else if (btns.length > 1) {
for (let i = btns.length - 1; i >= 0; i--) {
btns[i]._currentWindow.delete(global.get_current_time());
}
} else if (window) {
window.delete(global.get_current_time());
}
break;
}
case MouseAction.CloseAllOthers: {
if (!window) break;
let btns = this._workspace._lookupAllAppButtonsForApp(this._app);
if (this.getNumberOfWindow() > 1) {
for (let i = this.getNumberOfWindow() - 1; i >= 0; i--) {
if (this._windows[i] !== window) {
this._windows[i].delete(global.get_current_time());
}
}
} else if (btns.length > 1) {
for (let i = btns.length - 1; i >= 0; i--) {
if (btns[i]._currentWindow !== window) {
btns[i]._currentWindow.delete(global.get_current_time());
}
}
}
break;
}
}
}

Expand Down
14 changes: 14 additions & 0 deletions CassiaWindowList@klangman/5.4/settings-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,8 @@
"Tile bottom": 31,
"Tile bottom left": 32,
"Untile window": 33,
"Close all": 41,
"Close all others": 42,
"Do nothing": 12
},
"description": "Thumbnail window middle button action"
Expand Down Expand Up @@ -497,6 +499,8 @@
"Tile bottom": 31,
"Tile bottom left": 32,
"Untile window": 33,
"Close all": 41,
"Close all others": 42,
"Do nothing": 12
},
"description": "Thumbnail window back button action"
Expand Down Expand Up @@ -539,6 +543,8 @@
"Tile bottom": 31,
"Tile bottom left": 32,
"Untile window": 33,
"Close all": 41,
"Close all others": 42,
"Do nothing": 12
},
"description": "Thumbnail window forward button action"
Expand Down Expand Up @@ -633,6 +639,8 @@
"Tile bottom": 31,
"Tile bottom left": 32,
"Untile window": 33,
"Close all": 41,
"Close all others": 42,
"Do nothing": 12
},
"description": "Middle button action",
Expand Down Expand Up @@ -682,6 +690,8 @@
"Tile bottom": 31,
"Tile bottom left": 32,
"Untile window": 33,
"Close all": 41,
"Close all others": 42,
"Do nothing": 12
},
"description": "Back button action",
Expand Down Expand Up @@ -731,6 +741,8 @@
"Tile bottom": 31,
"Tile bottom left": 32,
"Untile window": 33,
"Close all": 41,
"Close all others": 42,
"Do nothing": 12
},
"description": "Forward button action",
Expand Down Expand Up @@ -886,6 +898,8 @@
"Tile bottom": 31,
"Tile bottom left": 32,
"Untile window": 33,
"Close all": 41,
"Close all others": 42,
"Do nothing": 12
}
}
Expand Down
14 changes: 14 additions & 0 deletions CassiaWindowList@klangman/6.0/settings-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,8 @@
"Tile bottom": 31,
"Tile bottom left": 32,
"Untile window": 33,
"Close all": 41,
"Close all others": 42,
"Do nothing": 12
},
"description": "Thumbnail window middle button action"
Expand Down Expand Up @@ -497,6 +499,8 @@
"Tile bottom": 31,
"Tile bottom left": 32,
"Untile window": 33,
"Close all": 41,
"Close all others": 42,
"Do nothing": 12
},
"description": "Thumbnail window back button action"
Expand Down Expand Up @@ -539,6 +543,8 @@
"Tile bottom": 31,
"Tile bottom left": 32,
"Untile window": 33,
"Close all": 41,
"Close all others": 42,
"Do nothing": 12
},
"description": "Thumbnail window forward button action"
Expand Down Expand Up @@ -633,6 +639,8 @@
"Tile bottom": 31,
"Tile bottom left": 32,
"Untile window": 33,
"Close all": 41,
"Close all others": 42,
"Do nothing": 12
},
"description": "Middle button action",
Expand Down Expand Up @@ -682,6 +690,8 @@
"Tile bottom": 31,
"Tile bottom left": 32,
"Untile window": 33,
"Close all": 41,
"Close all others": 42,
"Do nothing": 12
},
"description": "Back button action",
Expand Down Expand Up @@ -731,6 +741,8 @@
"Tile bottom": 31,
"Tile bottom left": 32,
"Untile window": 33,
"Close all": 41,
"Close all others": 42,
"Do nothing": 12
},
"description": "Forward button action",
Expand Down Expand Up @@ -886,6 +898,8 @@
"Tile bottom": 31,
"Tile bottom left": 32,
"Untile window": 33,
"Close all": 41,
"Close all others": 42,
"Do nothing": 12
}
}
Expand Down
Loading