add smart-close KWin script to minimize Cisco Secure Client
vpnui's GTK window quits the whole process on close, removing its tray icon. This KWin script registers a shortcut that minimizes the window when Cisco Secure Client is focused and closes any other window normally, so binding it to the window-close shortcut keeps vpnui in the tray.
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
// Smart Close: minimize Cisco Secure Client, close everything else.
|
||||
registerShortcut(
|
||||
"SmartCloseWindow",
|
||||
"Smart Close Window (minimize Cisco Secure Client)",
|
||||
"Ctrl+Alt+Shift+F4", // placeholder default; rebind to your real close shortcut
|
||||
function () {
|
||||
var w = workspace.activeWindow;
|
||||
if (!w) {
|
||||
return;
|
||||
}
|
||||
var cls = String(w.resourceClass).toLowerCase();
|
||||
if (cls.indexOf("secureclient") !== -1) {
|
||||
w.minimized = true;
|
||||
} else {
|
||||
w.closeWindow();
|
||||
}
|
||||
}
|
||||
);
|
||||
Reference in New Issue
Block a user