feat(quickshell): idle chain, drifting wallpaper, and a few fixes
- Idle is handled in the shell instead of hypridle: the screen dims slowly at 4 minutes, locks at 5, powers down at 6, and suspends at 15 on battery. Idle inhibitors hold every stage off; Super+Shift+I does the same by hand and puts a cup on the rail. - The shell draws the wallpaper (backdrop/), so hyprpaper is gone. The picture is drawn a little larger than the screen and drifts with the workspace a beat after the windows, and dims a shade while windows are open. The path lives in quickshell/wallpaper. - The lock screen and power menu say "Take your time." instead of the NieR slogan. - hyprpaper is no longer launched twice, the media module keeps the player that played last instead of an empty browser tab, and grouped windows show thin untitled tabs with their place in the group (2/3) in the bar title. - qt6ct uses Darkly; the package list gains adw-gtk-theme and darkly-bin.
This commit is contained in:
1 parent
864420281b
commit
c36a74e861
20 files changed
+396
-128
No files matched your search
@@ -20,6 +20,31 @@ Item {
|
||||
|| toplevel.monitor.id === root.monitor.id)
|
||||
|
||||
readonly property string incomingTitle: mine && toplevel.title ? toplevel.title : "—"
|
||||
|
||||
// Where the focused window sits in its group, as "2/3", or "" when it is
|
||||
// not grouped. Hyprland's group bar draws only indicator lines (see
|
||||
// hypr/lua/look.lua), so the bar is the one place the title is written.
|
||||
readonly property string groupLabel: {
|
||||
const ipc = root.mine ? root.toplevel.lastIpcObject : null;
|
||||
const members = ipc?.grouped ?? [];
|
||||
if (members.length < 2) return "";
|
||||
const bare = a => String(a).replace(/^0x/, "");
|
||||
const at = members.findIndex(m => bare(m) === bare(root.toplevel.address));
|
||||
return (at < 0 ? "?" : at + 1) + "/" + members.length;
|
||||
}
|
||||
|
||||
// lastIpcObject is a snapshot, refreshed only on request. Ask again
|
||||
// whenever focus or group membership may have changed.
|
||||
Connections {
|
||||
target: Hyprland
|
||||
function onRawEvent(event) {
|
||||
const n = event.name;
|
||||
if (n === "activewindowv2" || n === "togglegroup"
|
||||
|| n === "moveintogroup" || n === "moveoutofgroup"
|
||||
|| n === "closewindow" || n === "openwindow")
|
||||
Hyprland.refreshToplevels();
|
||||
}
|
||||
}
|
||||
property string displayedTitle: "—"
|
||||
|
||||
// Which toplevel the landing transition last played for. The landing is a
|
||||
@@ -30,7 +55,8 @@ Item {
|
||||
// The bar shrinks this when the three clusters would otherwise collide.
|
||||
property real maxWidth: 240
|
||||
|
||||
implicitWidth: Math.min(maxWidth, Math.max(70, label.implicitWidth + 4))
|
||||
implicitWidth: Math.min(maxWidth,
|
||||
Math.max(70, label.implicitWidth + 4 + (groupTag.visible ? groupTag.width + Theme.padS : 0)))
|
||||
implicitHeight: 20
|
||||
|
||||
Behavior on implicitWidth {
|
||||
@@ -45,7 +71,7 @@ Item {
|
||||
Text {
|
||||
id: label
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
width: parent.width
|
||||
width: parent.width - (groupTag.visible ? groupTag.width + Theme.padS : 0)
|
||||
text: root.displayedTitle
|
||||
color: root.mine ? Theme.subtext : Theme.muted
|
||||
elide: Text.ElideRight
|
||||
@@ -61,7 +87,7 @@ Item {
|
||||
Text {
|
||||
id: ghost
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
width: parent.width
|
||||
width: label.width
|
||||
text: root.displayedTitle
|
||||
color: Theme.accent
|
||||
opacity: 0
|
||||
@@ -69,6 +95,18 @@ Item {
|
||||
font: label.font
|
||||
renderType: Text.NativeRendering
|
||||
}
|
||||
|
||||
Text {
|
||||
id: groupTag
|
||||
anchors.right: parent.right
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
visible: root.groupLabel !== ""
|
||||
text: root.groupLabel
|
||||
color: Theme.muted
|
||||
font.family: Theme.fontMono
|
||||
font.pixelSize: Theme.fsMicro
|
||||
renderType: Text.NativeRendering
|
||||
}
|
||||
}
|
||||
|
||||
// Adopt the settled caption, and stamp it only when focus actually moved.
|
||||
|
||||
@@ -137,6 +137,19 @@ PanelWindow {
|
||||
|
||||
Divider { visible: tray.visible }
|
||||
|
||||
// Only there while the idle chain is held off by hand, so it is
|
||||
// obvious why the screen never locked.
|
||||
RailIcon {
|
||||
id: awakeIcon
|
||||
visible: Idle.stayAwake
|
||||
icon: ""
|
||||
label: "Stay awake"
|
||||
statusText: "Screen will not dim or lock"
|
||||
hint: "Click to allow sleep"
|
||||
live: true
|
||||
onClicked: Idle.toggleStayAwake()
|
||||
}
|
||||
|
||||
RailIcon {
|
||||
id: bellIcon
|
||||
icon: Notifs.icon
|
||||
|
||||
Reference in new issue
Block a user