Krolyxon
Commit 28d213d

Branches

Refs →

aurora28d213d

aurora: keep the wallpaper record in ~/.local/state, not hyprpaper.conf

Author
krolyxon
Date
2026-10-29 11:49 +0530
Parent
0b9794e
Commit
28d213d73db98b3f0f0c51de7cfd6890fae6758d

+10 −13

2 files changed

  1. M .config/quickshell/aurora/Wall.qml +9 −12
  2. M .local/bin/setwall +1 −1
M .config/quickshell/aurora/Wall.qml View
@@ -4,8 +4,8 @@ import Quickshell
44 import Quickshell.Io
55
66 // Wallpapers: folder listing, cached thumbnails, and applying them. aurora owns the wallpaper and draws it itself
7−// (Back.qml / WallView.qml, look = Settings.wallLook): apply() records the path in hyprpaper.conf (only as the record,
8−// hyprpaper isn't run any more) and runs matugen (all colours, terminal included; Theme then recolours itself). recolor() re-runs just matugen when the scheme/contrast setting changes.
7+// (Back.qml / WallView.qml, look = Settings.wallLook): apply() records the path in ~/.local/state/aurora/wallpaper
8+// and runs matugen (all colours, terminal included; Theme then recolours itself). recolor() re-runs just matugen when the scheme/contrast setting changes.
99 // ~/.local/bin/setwall is only a CLI front-end for the IPC calls (wallrandom / wall / wallset).
1010 Singleton {
1111 id: root
@@ -13,7 +13,7 @@ Singleton {
1313 readonly property string home: Quickshell.env("HOME")
1414 property string rootDir: home + "/pix/wallpapers"
1515 property string folder: Settings.wallFolder // default dusky-dark
16− readonly property string conf: home + "/.config/hypr/hyprpaper.conf"
16+ readonly property string record: home + "/.local/state/aurora/wallpaper" // the current wallpaper's path
1717 readonly property string thumbDir: home + "/.cache/aurora/thumbs"
1818
1919 property var folders: [] // subfolder names; "" = everything under rootDir
@@ -41,16 +41,13 @@ Singleton {
4141 "-regextype", "posix-extended", "-iregex", ".*\\.(png|jpe?g|webp)"]
4242 listProc.running = true
4343 }
44− // hyprpaper.conf is the record of the current wallpaper (kept in hyprpaper's format, so it still works if
45− // hyprpaper is ever started again)
4644 readonly property string applyJob:
47− 'p="$1"; c="$2"; ' +
48− 'printf "splash = false\\nwallpaper {\\n monitor =\\n path = %s\\n}\\n" "$p" > "$c"; ' +
45+ 'p="$1"; c="$2"; mkdir -p "${c%/*}"; printf "%s\\n" "$p" > "$c"; ' +
4946 'matugen image "$p" -m dark -t "$3" --contrast="$4" --prefer saturation -q'
5047 function apply(path) {
5148 if (!path) return
5249 current = path
53− Quickshell.execDetached(["sh", "-c", applyJob, "sh", path, conf, Settings.matuScheme, String(Settings.matuContrast)])
50+ Quickshell.execDetached(["sh", "-c", applyJob, "sh", path, record, Settings.matuScheme, String(Settings.matuContrast)])
5451 }
5552
5653 // matugen only. --prefer: v4 otherwise asks on stdin when the image has several source colours.
@@ -149,15 +146,15 @@ Singleton {
149146 }
150147 }
151148
152− // current wallpaper, from its record in hyprpaper.conf. None yet (fresh install): pick a random one.
149+ // current wallpaper, from its record. None yet (fresh install): pick a random one.
153150 FileView {
154− path: root.conf
151+ path: root.record
155152 watchChanges: true
156153 onFileChanged: reload()
157154 onLoadFailed: root.random()
158155 onLoaded: {
159− var m = text().match(/^\s*path\s*=\s*(.+)$/m)
160− if (m) root.current = m[1].trim()
156+ var p = text().trim()
157+ if (p) root.current = p
161158 if (!root.checkedColours) { root.checkedColours = true; root.recolor(true) }
162159 }
163160 }
M .local/bin/setwall View
@@ -1,6 +1,6 @@
11 #!/bin/sh
22 # Set the wallpaper through aurora. aurora owns the wallpaper: it draws it itself (mono dots, colour dots or photo,
3−# see its settings), records it in hyprpaper.conf and runs matugen (colours). This is just the CLI front-end for its IPC.
3+# see its settings), records it in ~/.local/state/aurora/wallpaper and runs matugen (colours). This is just the CLI front-end for its IPC.
44 #
55 # setwall random wallpaper from the folder selected in aurora's picker
66 # setwall -m open (toggle) aurora's wallpaper picker