paths: use unified env var for lib dir
CAELESTIA_BD_PATH -> CAELESTIA_LIB_DIR/beat_detector
This commit is contained in:
parent
0dc6fa62e0
commit
f1dc78d154
4 changed files with 5 additions and 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";
|
||||
};
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
'';
|
||||
|
|
|
|||
|
|
@ -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])/);
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue