diff options
| -rw-r--r-- | flake.nix | 3 | ||||
| -rw-r--r-- | nix/default.nix | 2 | ||||
| -rw-r--r-- | services/BeatDetector.qml | 3 | ||||
| -rw-r--r-- | utils/Paths.qml | 1 |
4 files changed, 5 insertions, 4 deletions
@@ -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(); |