bg mode
This commit is contained in:
1 parent
70a6437c7f
commit
ed75fa0db9
4 files changed
+41
-14
No files matched your search
+20
-4
@@ -1,6 +1,7 @@
|
||||
import Quickshell
|
||||
import QtQuick
|
||||
import Quickshell.Io
|
||||
import Quickshell.Hyprland
|
||||
|
||||
ShellRoot {
|
||||
id: shell
|
||||
@@ -8,23 +9,38 @@ ShellRoot {
|
||||
property bool launcherOpen: true
|
||||
property AppConfig config: AppConfig {}
|
||||
|
||||
function goToEmptyWorkspace(): void {
|
||||
Hyprland.dispatch("workspace empty");
|
||||
}
|
||||
|
||||
IpcHandler {
|
||||
target: "launcher"
|
||||
|
||||
function toggle(): void {
|
||||
shell.launcherOpen = !shell.launcherOpen;
|
||||
if (shell.config.backgroundMode)
|
||||
shell.goToEmptyWorkspace();
|
||||
else
|
||||
shell.launcherOpen = !shell.launcherOpen;
|
||||
}
|
||||
function open(): void {
|
||||
shell.launcherOpen = true;
|
||||
if (shell.config.backgroundMode)
|
||||
shell.goToEmptyWorkspace();
|
||||
else
|
||||
shell.launcherOpen = true;
|
||||
}
|
||||
function close(): void {
|
||||
shell.launcherOpen = false;
|
||||
if (!shell.config.backgroundMode)
|
||||
shell.launcherOpen = false;
|
||||
}
|
||||
}
|
||||
|
||||
LauncherWindow {
|
||||
shellOpen: shell.launcherOpen
|
||||
onRequestClose: shell.launcherOpen = false
|
||||
backgroundMode: shell.config.backgroundMode
|
||||
onRequestClose: {
|
||||
if (!shell.config.backgroundMode)
|
||||
shell.launcherOpen = false
|
||||
}
|
||||
apps: shell.config.appConfig
|
||||
enableCacheFolder: shell.config.enableCacheFolder
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user