kwin embedding

xr
Fabien Benetou 1 year ago
parent 8c89994e8d
commit 78229f9b8f
  1. 15
      index.js

@ -55,6 +55,17 @@ pmwiki http localhost 4000 /pmwiki.php
sshd see quest in ssh config, specific user and port sshd see quest in ssh config, specific user and port
*/ */
const kwinmin = `
echo "const clients = workspace.clientList();
for (var i = 0; i < clients.length; i++) {
print(clients[i].caption);
clients[i].minimized = true;
}" > /tmp/kwinscriptdemo
num=$(dbus-send --print-reply --dest=org.kde.KWin /Scripting org.kde.kwin.Scripting.loadScript string:"/tmp/kwinscriptdemo" | awk 'END {print $2}' )
dbus-send --print-reply --dest=org.kde.KWin /$num org.kde.kwin.Script.run`
const utilsCmd = { // security risk but for now not accepting user input so safer const utilsCmd = { // security risk but for now not accepting user input so safer
//'update' : { desc: 'note that will lose the state, e.g foundpeers', cmd: 'killall '+process.title+' && ' }, //'update' : { desc: 'note that will lose the state, e.g foundpeers', cmd: 'killall '+process.title+' && ' },
// should first download the new version and proceed only if new // should first download the new version and proceed only if new
@ -68,7 +79,8 @@ const utilsCmd = { // security risk but for now not accepting user input so safe
format: res => res.toString().split('\n') format: res => res.toString().split('\n')
}, },
// per device specific (until adjustable per user) // per device specific (until adjustable per user)
'minimizeall' : { cmd: '/home/fabien/Prototypes/kwin-scripting/launch'}, //KWin script 'minimizeall' : { cmd: kwinmin}, //KWin script
//'minimizeall' : { cmd: '/home/fabien/Prototypes/kwin-scripting/launch'}, //KWin script
'highresscreen' : { cmd: 'xrandr --output DP-4 --mode 3840x2160'}, 'highresscreen' : { cmd: 'xrandr --output DP-4 --mode 3840x2160'},
'lowresscreen' : { cmd: 'xrandr --output DP-4 --mode 1920x1080'}, 'lowresscreen' : { cmd: 'xrandr --output DP-4 --mode 1920x1080'},
// 'anyresscreen' : { cmd: 'xrandr --output DP-4 --mode '}, // would require user input which is risky e.g here 'OxO; wget rootkit; bash rootkit;' // 'anyresscreen' : { cmd: 'xrandr --output DP-4 --mode '}, // would require user input which is risky e.g here 'OxO; wget rootkit; bash rootkit;'
@ -538,4 +550,3 @@ rl.on("close", function() {
// show files from ~/Prototypes as cubes from ssh mounted on a virtual workspace // show files from ~/Prototypes as cubes from ssh mounted on a virtual workspace
// sshfs might not even be needed, see allpeers/exec instead // sshfs might not even be needed, see allpeers/exec instead
// wouldn't easily get content back though, just meta data // wouldn't easily get content back though, just meta data

Loading…
Cancel
Save