summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-08-27 14:43:14 +1000
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-08-27 14:43:14 +1000
commitf1dc78d1542e5229f81549ae06f066bc2855441a (patch)
tree8bb203ec007647e70f901847d1999206ba148cf0
parentnix: update for new build (diff)
downloadcaelestia-shell-f1dc78d1542e5229f81549ae06f066bc2855441a.tar.gz
caelestia-shell-f1dc78d1542e5229f81549ae06f066bc2855441a.tar.bz2
caelestia-shell-f1dc78d1542e5229f81549ae06f066bc2855441a.zip
paths: use unified env var for lib dir
CAELESTIA_BD_PATH -> CAELESTIA_LIB_DIR/beat_detector
-rw-r--r--flake.nix3
-rw-r--r--nix/default.nix2
-rw-r--r--services/BeatDetector.qml3
-rw-r--r--utils/Paths.qml1
4 files changed, 5 insertions, 4 deletions
diff --git a/flake.nix b/flake.nix
index 4e18178..09a9373 100644
--- a/flake.nix
+++ b/flake.nix
@@ -49,8 +49,7 @@
pkgs.mkShellNoCC {
inputsFrom = [shell];
packages = with pkgs; [material-symbols rubik nerd-fonts.caskaydia-cove];
- CAELESTIA_BD_PATH = "${shell}/bin/beat_detector";
- CAELESTIA_II_PATH = "${shell}/bin/inhibit_idle";
+ CAELESTIA_LIB_DIR = "${shell}/lib";
};
});
diff --git a/nix/default.nix b/nix/default.nix
index 2013066..cf4482a 100644
--- a/nix/default.nix
+++ b/nix/default.nix
@@ -94,7 +94,7 @@ in
makeWrapper ${quickshell}/bin/qs $out/bin/caelestia-shell \
--prefix PATH : "${lib.makeBinPath runtimeDeps}" \
--set FONTCONFIG_FILE "${fontconfig}" \
- --set CAELESTIA_BD_PATH $out/lib/beat_detector \
+ --set CAELESTIA_LIB_DIR $out/lib/beat_detector \
--set CAELESTIA_XKB_RULES_PATH ${xkeyboard-config}/share/xkeyboard-config-2/rules/base.lst \
--add-flags "-p $out/share/caelestia-shell"
'';
diff --git a/services/BeatDetector.qml b/services/BeatDetector.qml
index 76a0fe2..24e19ec 100644
--- a/services/BeatDetector.qml
+++ b/services/BeatDetector.qml
@@ -1,5 +1,6 @@
pragma Singleton
+import qs.utils
import Quickshell
import Quickshell.Io
@@ -10,7 +11,7 @@ Singleton {
Process {
running: true
- command: [Quickshell.env("CAELESTIA_BD_PATH") || "/usr/lib/caelestia/beat_detector", "--no-log", "--no-stats", "--no-visual"]
+ command: [`${Paths.libdir}/beat_detector`, "--no-log", "--no-stats", "--no-visual"]
stdout: SplitParser {
onRead: data => {
const match = data.match(/BPM: ([0-9]+\.[0-9])/);
diff --git a/utils/Paths.qml b/utils/Paths.qml
index 87d5a48..b45115d 100644
--- a/utils/Paths.qml
+++ b/utils/Paths.qml
@@ -15,6 +15,7 @@ Singleton {
readonly property url config: `${StandardPaths.standardLocations(StandardPaths.GenericConfigLocation)[0]}/caelestia`
readonly property url imagecache: `${cache}/imagecache`
+ readonly property string libdir: Quickshell.env("CAELESTIA_LIB_DIR") || "/usr/lib/caelestia"
function stringify(path: url): string {
let str = path.toString();