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:
nvrl committed 2026-10-04 23:10:19 +02:00
1 parent 864420281b
commit c36a74e861
20 files changed
+396 -128

No files matched your search

+68
View File
@@ -0,0 +1,68 @@
pragma Singleton
import QtQuick
import Quickshell
import Quickshell.Hyprland
import Quickshell.Wayland
import "root:/services"
// What happens when nobody is at the machine. There is no hypridle: the shell
// already owns the lock screen, so it owns the clock that leads up to it.
//
// dim the screen slowly darkens, so the lock does not arrive unannounced
// lock the session lock (lock/Lock.qml)
// off the displays power down; any input wakes them
// suspend only on battery, and only after a long while
//
// Every stage respects idle inhibitors, so a fullscreen video or a call that
// asks the compositor to stay awake holds all of them off. `stayAwake` is the
// same thing by hand (`qs ipc call shell toggleStayAwake`).
Singleton {
id: root
// Seconds of no input before each stage.
readonly property int dimAfter: 240
readonly property int lockAfter: 300
readonly property int offAfter: 360
readonly property int suspendAfter: 900
property bool stayAwake: false
readonly property bool dimmed: dimMon.isIdle && !Actions.lockRequested
function toggleStayAwake() { root.stayAwake = !root.stayAwake; }
IdleMonitor {
id: dimMon
enabled: !root.stayAwake
respectInhibitors: true
timeout: root.dimAfter
}
IdleMonitor {
id: lockMon
enabled: !root.stayAwake
respectInhibitors: true
timeout: root.lockAfter
onIsIdleChanged: if (isIdle) Actions.lock()
}
IdleMonitor {
id: offMon
enabled: !root.stayAwake
respectInhibitors: true
timeout: root.offAfter
// Input ends the idle period, so the displays come back on the same
// event that would have woken them anyway.
onIsIdleChanged: Hyprland.dispatch(
"hl.dsp.dpms({ action = \"" + (isIdle ? "off" : "on") + "\" })")
}
IdleMonitor {
id: suspendMon
enabled: !root.stayAwake && Battery.onBattery
respectInhibitors: true
timeout: root.suspendAfter
onIsIdleChanged: if (isIdle) Actions.suspend()
}
}