From 31e78e64c1f421318f18c2f45d9b8fff244a7a7c Mon Sep 17 00:00:00 2001 From: Alexandru Macocian Date: Tue, 9 Jun 2026 13:16:06 +0200 Subject: [PATCH] Make quick-visor a standalone executable --- PKGBUILD.template | 3 +-- README.md | 11 +++++------ VERSION | 2 +- bin/quick-visor | 2 +- bin/quick-visor-toggle | 3 --- qml/VisorService.qml | 3 ++- qml/shell.qml | 9 --------- 7 files changed, 10 insertions(+), 23 deletions(-) delete mode 100755 bin/quick-visor-toggle diff --git a/PKGBUILD.template b/PKGBUILD.template index 27033d8..03199ba 100644 --- a/PKGBUILD.template +++ b/PKGBUILD.template @@ -20,9 +20,8 @@ package() { install -dm755 "${pkgdir}/usr/share/quickshell/${pkgname}" install -m644 qml/* "${pkgdir}/usr/share/quickshell/${pkgname}/" - install -Dm755 bin/quick-visor "${pkgdir}/usr/bin/quick-visor" - install -Dm755 bin/quick-visor-toggle "${pkgdir}/usr/bin/quick-visor-toggle" + install -Dm755 bin/quick-visor "${pkgdir}/usr/bin/quick-visor" install -Dm644 README.md "${pkgdir}/usr/share/doc/${pkgname}/README.md" install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" diff --git a/README.md b/README.md index 6ffe04a..efeeb9d 100644 --- a/README.md +++ b/README.md @@ -10,23 +10,22 @@ Install from the AUR: paru -S quick-visor ``` -Start the resident Quickshell instance once per session: +Launch the display layout window: -```conf -exec-once = quick-visor +```sh +quick-visor ``` -Bind a key to toggle the overlay: +Optionally bind a key to launch it: ```conf -bind = SUPER, M, exec, quick-visor-toggle +bind = SUPER, D, exec, quick-visor ``` For local development, run directly from the clone: ```sh quickshell -n -p qml/shell.qml -quickshell ipc -p qml/shell.qml call quick-visor toggle ``` ## Configuration diff --git a/VERSION b/VERSION index 8acdd82..4e379d2 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.0.1 +0.0.2 diff --git a/bin/quick-visor b/bin/quick-visor index 2ca5a77..7b1b3e2 100755 --- a/bin/quick-visor +++ b/bin/quick-visor @@ -1,3 +1,3 @@ #!/bin/sh -# Launches the quick-visor Quickshell instance. Run once at session start. +# Launches the quick-visor display layout window. exec quickshell -n -p /usr/share/quickshell/quick-visor/shell.qml "$@" diff --git a/bin/quick-visor-toggle b/bin/quick-visor-toggle deleted file mode 100755 index 1d0f061..0000000 --- a/bin/quick-visor-toggle +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -# Toggle the quick-visor overlay from a compositor keybinding. -exec quickshell ipc -p /usr/share/quickshell/quick-visor/shell.qml call quick-visor toggle diff --git a/qml/VisorService.qml b/qml/VisorService.qml index 47533e3..0e02a56 100644 --- a/qml/VisorService.qml +++ b/qml/VisorService.qml @@ -7,7 +7,7 @@ import Quickshell.Io QtObject { id: root - property bool visible: false + property bool visible: true property int selectedIndex: 0 property var monitors: [] property var arrangedPositions: ({}) @@ -24,6 +24,7 @@ QtObject { function close() { visible = false; + Qt.callLater(Qt.quit); } function toggle() { diff --git a/qml/shell.qml b/qml/shell.qml index 54d7357..b643b19 100644 --- a/qml/shell.qml +++ b/qml/shell.qml @@ -1,15 +1,6 @@ import Quickshell -import Quickshell.Io ShellRoot { - IpcHandler { - target: "quick-visor" - function toggle(): void { VisorService.toggle(); } - function open(): void { VisorService.open(); } - function close(): void { VisorService.close(); } - function refresh(): void { VisorService.refresh(); } - } - Visor {} Variants {