⚡ Logout dialog (dbus autorun still not working)
This commit is contained in:
parent
15be72893c
commit
5dd77c49a0
@ -7,7 +7,7 @@ pos=@Point(1094 150)
|
|||||||
size=@Size(640 585)
|
size=@Size(640 585)
|
||||||
|
|
||||||
[RepoTreeView]
|
[RepoTreeView]
|
||||||
expandedCategories-e77d1fb=Ned\xe1vno aktualizovan\xe9\tMoje knihovny\tSd\xedleno se skupinama
|
expandedCategories-e77d1fb=Moje knihovny\tSd\xedleno se skupinama\tNed\xe1vno aktualizovan\xe9
|
||||||
|
|
||||||
[Settings]
|
[Settings]
|
||||||
computerName=TUXEDO-InfinityBook-s15gen6
|
computerName=TUXEDO-InfinityBook-s15gen6
|
||||||
|
@ -9,6 +9,19 @@ const css= echo.css`
|
|||||||
$.api()
|
$.api()
|
||||||
.version("2024-02-29")
|
.version("2024-02-29")
|
||||||
.describe("Workarounds for KDE6.")
|
.describe("Workarounds for KDE6.")
|
||||||
|
.command("logout")
|
||||||
|
.action(function(){
|
||||||
|
$.is_silent= true;
|
||||||
|
const res= s.run([
|
||||||
|
"echo ::options::",
|
||||||
|
"|",
|
||||||
|
"rofi -dmenu -p 'Logout' -l 4 -theme-str 'window { width: 25ch; }' -normal-window"
|
||||||
|
].join(" "), {
|
||||||
|
options: [ "-", "poweroff", "reboot" ].join("\n")
|
||||||
|
}).trim();
|
||||||
|
if(res && res!=="-") s.run(res);
|
||||||
|
$.exit(0);
|
||||||
|
})
|
||||||
.command("klipper-edit", "Edit last item in klipper.")
|
.command("klipper-edit", "Edit last item in klipper.")
|
||||||
.action(async function(){
|
.action(async function(){
|
||||||
$.is_silent= true;
|
$.is_silent= true;
|
||||||
@ -45,11 +58,17 @@ $.api()
|
|||||||
s.run`qdbus org.kde.KWin /KWin org.kde.KWin.setCurrentDesktop ${desktop[0]}`;
|
s.run`qdbus org.kde.KWin /KWin org.kde.KWin.setCurrentDesktop ${desktop[0]}`;
|
||||||
$.exit(0);
|
$.exit(0);
|
||||||
})
|
})
|
||||||
.command("desktops-last <dbus>", "Workaround for KDE6 alt-tab between virtual desktops.")
|
.command("desktops-last-dbus")
|
||||||
.describe([
|
.action(function(){
|
||||||
"Use",
|
echo([
|
||||||
echo.format('%cdbus-monitor "interface=org.kde.KWin.VirtualDesktopManager" "member=currentChanged" | xargs -e -I {} kde6-workarounds.mjs desktops-last {}', css.code)
|
"dbus-monitor",
|
||||||
])
|
'"interface=org.kde.KWin.VirtualDesktopManager" "member=currentChanged"',
|
||||||
|
"|",
|
||||||
|
'xargs -e -I {} kde6-workarounds.mjs desktops-last-save {}'
|
||||||
|
].join(" "));
|
||||||
|
$.exit(0);
|
||||||
|
})
|
||||||
|
.command("desktops-last-save <dbus>", "Workaround for KDE6 alt-tab between virtual desktops.")
|
||||||
.action(function(dbus){
|
.action(function(dbus){
|
||||||
if(-1===dbus.indexOf("path=/VirtualDesktopManager; interface=org.kde.KWin.VirtualDesktopManager; member=currentChanged"))
|
if(-1===dbus.indexOf("path=/VirtualDesktopManager; interface=org.kde.KWin.VirtualDesktopManager; member=currentChanged"))
|
||||||
return $.exit(1);
|
return $.exit(1);
|
||||||
@ -57,5 +76,3 @@ $.api()
|
|||||||
s.echo(desktop).toEnd(pathLastDesktop());
|
s.echo(desktop).toEnd(pathLastDesktop());
|
||||||
})
|
})
|
||||||
.parse();
|
.parse();
|
||||||
|
|
||||||
/* rofi -dmenu -l 4 --theme-str 'window { width: 50ch; }' -p "promt" */
|
|
||||||
|
Loading…
Reference in New Issue
Block a user