diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-09-24 23:48:47 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-09-24 23:48:47 +1000 |
| commit | 57e3989185b8209a11d79bac477479019d515180 (patch) | |
| tree | 27e94dcaef9f41bb8f294eab1a91a27ce4da03d0 /modules | |
| parent | plugin: sub namespace modules (diff) | |
| download | caelestia-shell-57e3989185b8209a11d79bac477479019d515180.tar.gz caelestia-shell-57e3989185b8209a11d79bac477479019d515180.tar.bz2 caelestia-shell-57e3989185b8209a11d79bac477479019d515180.zip | |
plugin: add hypr extras (#690)
* move machine
* works
* prevent duplicate refreshes
* use instead of hyprctl proc
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/areapicker/Picker.qml | 26 | ||||
| -rw-r--r-- | modules/bar/popouts/KbLayout.qml | 2 |
2 files changed, 5 insertions, 23 deletions
diff --git a/modules/areapicker/Picker.qml b/modules/areapicker/Picker.qml index d51d1f3..1625ccf 100644 --- a/modules/areapicker/Picker.qml +++ b/modules/areapicker/Picker.qml @@ -5,7 +5,6 @@ import qs.services import qs.config import Caelestia import Quickshell -import Quickshell.Io import Quickshell.Wayland import QtQuick import QtQuick.Effects @@ -16,13 +15,10 @@ MouseArea { required property LazyLoader loader required property ShellScreen screen - property int borderWidth - property int rounding - property bool onClient - property real realBorderWidth: onClient ? borderWidth : 2 - property real realRounding: onClient ? rounding : 0 + property real realBorderWidth: onClient ? (Hypr.options["general:border_size"] ?? 1) : 2 + property real realRounding: onClient ? (Hypr.options["decoration:rounding"] ?? 0) : 0 property real ssx property real ssy @@ -89,6 +85,8 @@ MouseArea { cursorShape: Qt.CrossCursor Component.onCompleted: { + Hypr.extras.refreshOptions(); + // Break binding if frozen if (loader.freeze) clients = clients; @@ -186,22 +184,6 @@ MouseArea { } } - Process { - running: true - command: ["hyprctl", "-j", "getoption", "general:border_size"] - stdout: StdioCollector { - onStreamFinished: root.borderWidth = JSON.parse(text).int - } - } - - Process { - running: true - command: ["hyprctl", "-j", "getoption", "decoration:rounding"] - stdout: StdioCollector { - onStreamFinished: root.rounding = JSON.parse(text).int - } - } - Loader { id: screencopy diff --git a/modules/bar/popouts/KbLayout.qml b/modules/bar/popouts/KbLayout.qml index b12f2ef..4ecea9e 100644 --- a/modules/bar/popouts/KbLayout.qml +++ b/modules/bar/popouts/KbLayout.qml @@ -23,6 +23,6 @@ ColumnLayout { Layout.fillWidth: true text: qsTr("Switch layout") - onClicked: Quickshell.execDetached(["hyprctl", "switchxkblayout", "all", "next"]) + onClicked: Hypr.message("switchxkblayout all next") } } |