mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 11:46:41 +01:00
parent
5e2e0438a4
commit
86941305a4
7 changed files with 41 additions and 27 deletions
|
|
@ -25,7 +25,7 @@ path = "./deps/tengri/proc"
|
||||||
path = "./deps/rust-jack"
|
path = "./deps/rust-jack"
|
||||||
|
|
||||||
[workspace.dependencies]
|
[workspace.dependencies]
|
||||||
tek = { path = "./tek" }
|
tek = { path = "./tek" }
|
||||||
|
|
||||||
atomic_float = { version = "1.0.0" }
|
atomic_float = { version = "1.0.0" }
|
||||||
backtrace = { version = "0.3.72" }
|
backtrace = { version = "0.3.72" }
|
||||||
|
|
|
||||||
6
Justfile
6
Justfile
|
|
@ -1,4 +1,4 @@
|
||||||
export RUSTFLAGS := "--cfg procmacro2_semver_exempt -Zmacro-backtrace"
|
export RUSTFLAGS := "--cfg procmacro2_semver_exempt -Zmacro-backtrace -Clink-arg=-fuse-ld=mold"
|
||||||
export RUST_BACKTRACE := "1"
|
export RUST_BACKTRACE := "1"
|
||||||
|
|
||||||
debug := "reset && cargo run --"
|
debug := "reset && cargo run --"
|
||||||
|
|
@ -19,7 +19,9 @@ default:
|
||||||
bacon:
|
bacon:
|
||||||
bacon -s
|
bacon -s
|
||||||
check:
|
check:
|
||||||
cargo check
|
reset && cargo check
|
||||||
|
build:
|
||||||
|
reset && cargo build
|
||||||
run:
|
run:
|
||||||
{{debug}}
|
{{debug}}
|
||||||
run-init:
|
run-init:
|
||||||
|
|
|
||||||
2
deps/tengri
vendored
2
deps/tengri
vendored
|
|
@ -1 +1 @@
|
||||||
Subproject commit 18b6803912105cc6a23217641a68967695a2166b
|
Subproject commit a4dbf88220f75ccaf9d14cc2e4fb7c00479e3940
|
||||||
46
shell.nix
46
shell.nix
|
|
@ -1,32 +1,40 @@
|
||||||
#!/usr/bin/env nix-shell
|
#!/usr/bin/env nix-shell
|
||||||
{pkgs?import<nixpkgs>{}}:let
|
{pkgs?import<nixpkgs>{}}:let
|
||||||
stdenv = pkgs.clang19Stdenv;
|
|
||||||
name = "tek";
|
name = "tek";
|
||||||
nativeBuildInputs = with pkgs; [ pkg-config freetype libclang ];
|
stdenv = pkgs.clang19Stdenv;
|
||||||
buildInputs = with pkgs; let
|
nativeBuildInputs = [
|
||||||
#suil = pkgs.enableDebugging (pkgs.suil.overrideAttrs (a: b: {
|
pkgs.pkg-config
|
||||||
#dontStrip = true; separateDebugInfo = true;
|
pkgs.freetype
|
||||||
#}));
|
pkgs.libclang
|
||||||
in [ jack2 lilv serd libclang /*suil*/ glib gtk3 ];
|
pkgs.mold
|
||||||
|
];
|
||||||
|
buildInputs = [
|
||||||
|
pkgs.jack2
|
||||||
|
pkgs.lilv
|
||||||
|
pkgs.serd
|
||||||
|
pkgs.libclang
|
||||||
|
];
|
||||||
VST3_SDK_DIR = "/home/user/Lab/Music/tek/vst3sdk/";
|
VST3_SDK_DIR = "/home/user/Lab/Music/tek/vst3sdk/";
|
||||||
LIBCLANG_PATH = "${pkgs.libclang.lib.outPath}/lib";
|
LIBCLANG_PATH = "${pkgs.libclang.lib.outPath}/lib";
|
||||||
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath (with pkgs; [
|
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath [
|
||||||
pipewire.jack
|
pkgs.pipewire.jack
|
||||||
# for ChowKick.lv2:
|
# for ChowKick.lv2:
|
||||||
freetype
|
pkgs.freetype
|
||||||
libgcc.lib
|
pkgs.libgcc.lib
|
||||||
# for Panagement
|
# for Panagement
|
||||||
xorg.libX11
|
pkgs.xorg.libX11
|
||||||
xorg.libXcursor
|
pkgs.xorg.libXcursor
|
||||||
xorg.libXi
|
pkgs.xorg.libXi
|
||||||
libxkbcommon
|
pkgs.libxkbcommon
|
||||||
|
pkgs.lilv
|
||||||
|
pkgs.serd
|
||||||
#suil
|
#suil
|
||||||
# for Helm:
|
# for Helm:
|
||||||
alsa-lib
|
pkgs.alsa-lib
|
||||||
curl
|
pkgs.curl
|
||||||
libglvnd
|
pkgs.libglvnd
|
||||||
#xorg_sys_opengl
|
#xorg_sys_opengl
|
||||||
]);
|
];
|
||||||
in pkgs.mkShell.override {
|
in pkgs.mkShell.override {
|
||||||
inherit stdenv;
|
inherit stdenv;
|
||||||
} {
|
} {
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,9 @@ path = "tek.rs"
|
||||||
name = "tek"
|
name = "tek"
|
||||||
path = "tek_cli.rs"
|
path = "tek_cli.rs"
|
||||||
|
|
||||||
|
[target.'cfg(target_os = "linux")']
|
||||||
|
rustflags = ["-C", "link-arg=-fuse-ld=mold"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
tengri = { workspace = true }
|
tengri = { workspace = true }
|
||||||
tengri_proc = { workspace = true }
|
tengri_proc = { workspace = true }
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@
|
||||||
(mode :menu (keys :axis/y :confirm) :menu)
|
(mode :menu (keys :axis/y :confirm) :menu)
|
||||||
(keys :confirm
|
(keys :confirm
|
||||||
(@enter confirm))
|
(@enter confirm))
|
||||||
(view :menu (bg (g 40) (bsp/s
|
(view :menu (bg (g 0) (bsp/s
|
||||||
:ports/out
|
:ports/out
|
||||||
(bsp/n :ports/in (bg (g 30) (bsp/s (fixed/y 7 :logo) (fill/xy :dialog/menu)))))))
|
(bsp/n :ports/in (bg (g 30) (bsp/s (fixed/y 7 :logo) (fill/xy :dialog/menu)))))))
|
||||||
(view :ports/out (fill/x (fixed/y 3 (bsp/a
|
(view :ports/out (fill/x (fixed/y 3 (bsp/a
|
||||||
|
|
|
||||||
|
|
@ -268,8 +268,9 @@ impl ScenesView for App {
|
||||||
|
|
||||||
impl Draw<TuiOut> for App {
|
impl Draw<TuiOut> for App {
|
||||||
fn draw (&self, to: &mut TuiOut) {
|
fn draw (&self, to: &mut TuiOut) {
|
||||||
for dsl in self.mode.view.iter() {
|
for (index, dsl) in self.mode.view.iter().enumerate() {
|
||||||
let _ = self.view(to, dsl).expect("render failed");
|
to.place(&Align::nw(Push::y(1 + index as u16 * 2, dsl.src().unwrap())));
|
||||||
|
//let _ = self.view(to, dsl).expect("render failed");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -449,7 +450,7 @@ impl App {
|
||||||
Some("menu") => to.place(&if let Dialog::Menu(selected, items) = &self.dialog {
|
Some("menu") => to.place(&if let Dialog::Menu(selected, items) = &self.dialog {
|
||||||
let items = items.clone();
|
let items = items.clone();
|
||||||
let selected = selected;
|
let selected = selected;
|
||||||
Some(Fill::x(Thunk::new(move|to: &mut TuiOut|{
|
Some(Fill::xy(Thunk::new(move|to: &mut TuiOut|{
|
||||||
for (index, MenuItem(item, _)) in items.0.iter().enumerate() {
|
for (index, MenuItem(item, _)) in items.0.iter().enumerate() {
|
||||||
to.place(&Push::y((2 * index) as u16,
|
to.place(&Push::y((2 * index) as u16,
|
||||||
Tui::fg_bg(
|
Tui::fg_bg(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue