Files
z-bar-qt/Modules/Shortcuts.qml
T
zach 84d5abcaab
C++ / fmt (pull_request) Failing after 6s
C++ / build (pull_request) Failing after 9s
C++ / clang-tidy (pull_request) Failing after 10s
JS/TS / fmt (pull_request) Successful in 13s
JS/TS / lint (pull_request) Successful in 8s
Python / static (pull_request) Successful in 30s
Rust / build (pull_request) Successful in 49s
Rust / fmt (pull_request) Successful in 26s
Python / verify (pull_request) Successful in 1m44s
Rust / clippy (pull_request) Successful in 44s
feat: dashboard show on hover, media and weather tabs added
2026-09-20 12:59:53 +02:00

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;
}
}
}