refactor: extract PowerProfileService singleton; reducedMotion auto-enables on power-saver profile

This commit is contained in:
Damocles 2026-04-15 19:08:46 +02:00
parent c96b023fbe
commit dd5ca9d263
4 changed files with 63 additions and 51 deletions

View file

@ -35,7 +35,8 @@ QtObject {
property int groupSpacing: 6
property int radius: 4
property int screenRadius: 15
property bool reducedMotion: false
property bool _reducedMotionConfig: false
readonly property bool reducedMotion: _reducedMotionConfig || PowerProfileService.powerSaver
property FileView _themeFile: FileView {
path: (Quickshell.env("XDG_CONFIG_HOME") || (Quickshell.env("HOME") + "/.config")) + "/nova-shell/theme.json"
@ -77,6 +78,6 @@ QtObject {
if (data.screenRadius !== undefined)
root.screenRadius = data.screenRadius;
if (data.reducedMotion !== undefined)
root.reducedMotion = data.reducedMotion;
root._reducedMotionConfig = data.reducedMotion;
}
}