aboutsummaryrefslogtreecommitdiffstats
path: root/desktop/island
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/island')
-rw-r--r--desktop/island/Capsule.qml2
-rw-r--r--desktop/island/ClockPill.qml17
-rw-r--r--desktop/island/Keyboard.qml7
-rw-r--r--desktop/island/StatusPill.qml10
-rwxr-xr-xdesktop/island/privacy.sh4
5 files changed, 26 insertions, 14 deletions
diff --git a/desktop/island/Capsule.qml b/desktop/island/Capsule.qml
index 76329e0..65c98d9 100644
--- a/desktop/island/Capsule.qml
+++ b/desktop/island/Capsule.qml
@@ -39,7 +39,7 @@ Rectangle {
SmoothedAnimation { velocity: -1; duration: 220; reversingMode: SmoothedAnimation.Immediate }
}
- radius: Math.min(14, width / 2, height / 2)
+ radius: Math.min(17, width / 2, height / 2)
color: Qt.alpha(Theme.base, 0.92)
border.width: 1
border.color: Qt.alpha(Theme.text, 0.12)
diff --git a/desktop/island/ClockPill.qml b/desktop/island/ClockPill.qml
index f1217f1..07a0eb7 100644
--- a/desktop/island/ClockPill.qml
+++ b/desktop/island/ClockPill.qml
@@ -27,6 +27,12 @@ Capsule {
readonly property var entry: flickApp ? DesktopEntries.heuristicLookup(flickApp) : null
readonly property string wsIcon: Workspaces.icon(flickWs)
+ // Resolved paths, not names, decide what shows: a name the icon theme
+ // lacks resolves to "", and testing the name left a blank slot where the
+ // workspace number should have been.
+ readonly property string wsPath: wsIcon ? Quickshell.iconPath(wsIcon, true) : ""
+ readonly property string appPath:
+ flickApp ? Quickshell.iconPath(entry?.icon || flickApp, true) : ""
restWidth: (flicking ? flickRow.implicitWidth : restRow.implicitWidth) + 28
@@ -73,24 +79,23 @@ Capsule {
IconImage {
anchors.verticalCenter: parent.verticalCenter
- visible: pill.wsIcon !== ""
+ visible: pill.wsPath !== ""
implicitSize: 18
- source: pill.wsIcon ? Quickshell.iconPath(pill.wsIcon, true) : ""
+ source: pill.wsPath
}
// A named workspace, or one past eight, has no icon: its number.
Text {
anchors.verticalCenter: parent.verticalCenter
- visible: pill.wsIcon === ""
+ visible: pill.wsPath === ""
text: pill.flickWs
font { family: Theme.fontFamily; pixelSize: Theme.fontSize - 1; weight: Font.DemiBold }
color: Theme.accent
}
IconImage {
anchors.verticalCenter: parent.verticalCenter
- visible: pill.flickApp !== ""
+ visible: pill.appPath !== ""
implicitSize: 18
- source: pill.flickApp
- ? Quickshell.iconPath(pill.entry?.icon || pill.flickApp, true) : ""
+ source: pill.appPath
}
Text {
anchors.verticalCenter: parent.verticalCenter
diff --git a/desktop/island/Keyboard.qml b/desktop/island/Keyboard.qml
index 1cbe9bc..0cd73c8 100644
--- a/desktop/island/Keyboard.qml
+++ b/desktop/island/Keyboard.qml
@@ -26,9 +26,6 @@ Singleton {
property string keymap: ""
readonly property string flag: Logic.flagFor(keymap)
- readonly property string mainKeyboard:
- "hyprctl devices -j | jq -r '.keyboards[] | select(.main) | .name'"
-
Process {
id: query
running: true
@@ -46,8 +43,8 @@ Singleton {
// dir is "next" or "prev", from the caller's own literal, never user text.
function cycle(dir) {
- switcher.command = ["sh", "-c",
- `hyprctl switchxkblayout "$(${root.mainKeyboard})" ${dir}`];
+ // "current" is Hyprland's own name for the main keyboard.
+ switcher.command = ["hyprctl", "switchxkblayout", "current", dir];
switcher.running = false;
switcher.running = true;
}
diff --git a/desktop/island/StatusPill.qml b/desktop/island/StatusPill.qml
index faf24dd..ab62da8 100644
--- a/desktop/island/StatusPill.qml
+++ b/desktop/island/StatusPill.qml
@@ -88,8 +88,16 @@ Capsule {
sourceSize: Qt.size(18, 18)
source: Qt.resolvedUrl("assets/" + Keyboard.flag)
+ // One switch per wheel notch (120). A touchpad sends many small
+ // deltas, and switching on each made the count erratic.
WheelHandler {
- onWheel: event => Keyboard.cycle(event.angleDelta.y > 0 ? "prev" : "next")
+ property real acc: 0
+ onWheel: event => {
+ acc += event.angleDelta.y;
+ if (Math.abs(acc) < 120) return;
+ Keyboard.cycle(acc > 0 ? "prev" : "next");
+ acc = 0;
+ }
}
}
}
diff --git a/desktop/island/privacy.sh b/desktop/island/privacy.sh
index 9d5b360..8e70933 100755
--- a/desktop/island/privacy.sh
+++ b/desktop/island/privacy.sh
@@ -16,7 +16,9 @@
# pw-dump because a capturing source is told from an idle one by its node
# state, which Quickshell's PwNode does not expose.
-dump=$(pw-dump 2>/dev/null)
+# No dump is a broken run, not "nothing is capturing": print nothing, and
+# Privacy.qml keeps its last reading.
+dump=$(pw-dump 2>/dev/null) || exit 1
mic=$(printf '%s' "$dump" | jq '[.[]
| select(.type == "PipeWire:Interface:Node")