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 {
|
pkgs.mkShellNoCC {
|
||||||
inputsFrom = [shell];
|
inputsFrom = [shell];
|
||||||
packages = with pkgs; [material-symbols rubik nerd-fonts.caskaydia-cove];
|
packages = with pkgs; [material-symbols rubik nerd-fonts.caskaydia-cove];
|
||||||
CAELESTIA_BD_PATH = "${shell}/bin/beat_detector";
|
CAELESTIA_LIB_DIR = "${shell}/lib";
|
||||||
CAELESTIA_II_PATH = "${shell}/bin/inhibit_idle";
|
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -94,7 +94,7 @@ in
|
||||||
makeWrapper ${quickshell}/bin/qs $out/bin/caelestia-shell \
|
makeWrapper ${quickshell}/bin/qs $out/bin/caelestia-shell \
|
||||||
--prefix PATH : "${lib.makeBinPath runtimeDeps}" \
|
--prefix PATH : "${lib.makeBinPath runtimeDeps}" \
|
||||||
--set FONTCONFIG_FILE "${fontconfig}" \
|
--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 \
|
--set CAELESTIA_XKB_RULES_PATH ${xkeyboard-config}/share/xkeyboard-config-2/rules/base.lst \
|
||||||
--add-flags "-p $out/share/caelestia-shell"
|
--add-flags "-p $out/share/caelestia-shell"
|
||||||
'';
|
'';
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
pragma Singleton
|
pragma Singleton
|
||||||
|
|
||||||
|
import qs.utils
|
||||||
import Quickshell
|
import Quickshell
|
||||||
import Quickshell.Io
|
import Quickshell.Io
|
||||||
|
|
||||||
|
|
@ -10,7 +11,7 @@ Singleton {
|
||||||
|
|
||||||
Process {
|
Process {
|
||||||
running: true
|
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 {
|
stdout: SplitParser {
|
||||||
onRead: data => {
|
onRead: data => {
|
||||||
const match = data.match(/BPM: ([0-9]+\.[0-9])/);
|
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 config: `${StandardPaths.standardLocations(StandardPaths.GenericConfigLocation)[0]}/caelestia`
|
||||||
|
|
||||||
readonly property url imagecache: `${cache}/imagecache`
|
readonly property url imagecache: `${cache}/imagecache`
|
||||||
|
readonly property string libdir: Quickshell.env("CAELESTIA_LIB_DIR") || "/usr/lib/caelestia"
|
||||||
|
|
||||||
function stringify(path: url): string {
|
function stringify(path: url): string {
|
||||||
let str = path.toString();
|
let str = path.toString();
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue