import ZShell import Quickshell import Quickshell.Io import qs.Components import qs.Helpers import qs.Services Scope { id: root readonly property bool hasFullscreen: Hypr.focusedWorkspace?.toplevels.values.some(t => t.lastIpcObject.fullscreen === 2) ?? false property bool launcherInterrupted CustomShortcut { description: "Open screenshot" name: "screenshot" onPressed: { const states = ShellState.allStates(); for (const s of states) { s.screenshot = true; } } } CustomShortcut { description: "Toggle launcher" name: "toggle-launcher" onPressed: { root.launcherInterrupted = false; if (!root.launcherInterrupted && !root.hasFullscreen) { const state = ShellState.forActive(); state.launcher = !state.launcher; } root.launcherInterrupted = false; } } CustomShortcut { description: "Toggle drawing" name: "toggle-drawing" onPressed: { const state = ShellState.forActive(); state.isDrawing = !state.isDrawing; } } CustomShortcut { description: "Toggle sidebar" name: "toggle-nc" onPressed: { const state = ShellState.forActive(); state.sidebar = !state.sidebar; } } CustomShortcut { description: "Show On-Screen-Display" name: "show-osd" onPressed: { const state = ShellState.forActive(); state.osd = !state.osd; } } CustomShortcut { description: "Toggle settings" name: "toggle-settings" onPressed: { const state = ShellState.forActive(); state.settings = !state.settings; } } CustomShortcut { description: "Toggle clipboard" name: "toggle-clipboard" onPressed: { const state = ShellState.forActive(); state.clipboard = !state.clipboard; } } }