73 lines
1.3 KiB
QML
73 lines
1.3 KiB
QML
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: "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 {
|
|
name: "toggle-drawing"
|
|
|
|
onPressed: {
|
|
const state = ShellState.forActive();
|
|
state.isDrawing = !state.isDrawing;
|
|
}
|
|
}
|
|
|
|
CustomShortcut {
|
|
name: "toggle-nc"
|
|
|
|
onPressed: {
|
|
const state = ShellState.forActive();
|
|
state.sidebar = !state.sidebar;
|
|
}
|
|
}
|
|
|
|
CustomShortcut {
|
|
name: "show-osd"
|
|
|
|
onPressed: {
|
|
const state = ShellState.forActive();
|
|
state.osd = !state.osd;
|
|
}
|
|
}
|
|
|
|
CustomShortcut {
|
|
name: "toggle-settings"
|
|
|
|
onPressed: {
|
|
const state = ShellState.forActive();
|
|
state.settings = !state.settings;
|
|
}
|
|
}
|
|
|
|
CustomShortcut {
|
|
name: "toggle-clipboard"
|
|
|
|
onPressed: {
|
|
const state = ShellState.forActive();
|
|
state.clipboard = !state.clipboard;
|
|
}
|
|
}
|
|
}
|