feat: add IPC handler for toggling window fullscreen state
This commit is contained in:
parent
18bc65dff1
commit
899a592c27
1 changed files with 17 additions and 0 deletions
|
|
@ -1,4 +1,5 @@
|
|||
import Quickshell.Io
|
||||
import Quickshell.Wayland
|
||||
|
||||
IpcHandler {
|
||||
property var appLauncherPanel
|
||||
|
|
@ -6,6 +7,22 @@ IpcHandler {
|
|||
|
||||
target: "globalIPC"
|
||||
|
||||
// Toggle Fullscreen
|
||||
function toggleFullscreen(): void {
|
||||
console.log("[IPC] toggleFullscreen() called")
|
||||
if (ToplevelManager.activeToplevel) {
|
||||
if (ToplevelManager.activeToplevel.fullscreen) {
|
||||
// Exit fullscreen
|
||||
ToplevelManager.activeToplevel.fullscreen = false;
|
||||
} else {
|
||||
// Enter fullscreen
|
||||
ToplevelManager.activeToplevel.fullscreen = true;
|
||||
}
|
||||
} else {
|
||||
console.warn("[IPC] No active toplevel window to toggle fullscreen");
|
||||
}
|
||||
}
|
||||
|
||||
// Toggle Applauncher visibility
|
||||
function toggleLauncher(): void {
|
||||
if (!appLauncherPanel) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue