move playtwitch to seperate dune project

This commit is contained in:
LordMZTE 2022-02-08 19:53:55 +01:00
parent 47cda28e7e
commit c70546c767
Signed by: LordMZTE
GPG key ID: B64802DC33A64FF6
9 changed files with 36 additions and 30 deletions

View file

@ -1,10 +0,0 @@
#!/bin/sh
set -e
paru -S --needed --noconfirm \
bash-language-server \
lua-language-server \
rust-analyzer \
taplo-lsp \
vscode-langservers-extracted \
yaml-language-server

View file

@ -13,8 +13,9 @@ lspc.cssls.setup { capabilities = caps }
lspc.eslint.setup { capabilities = caps }
lspc.html.setup { capabilities = caps }
lspc.jsonls.setup { capabilities = caps }
lspc.ocamllsp.setup { capabilities = caps }
lspc.rust_analyzer.setup { capabilities = caps }
lspc.sumneko_lua.setup { -- paru -S lua-language-server
lspc.sumneko_lua.setup {
capabilities = caps,
settings = {
Lua = {

View file

@ -1,9 +1,32 @@
install-scripts target="$HOME/.local/bin":
#!/bin/sh
zig build-exe \
lsps := "
bash-language-server
lua-language-server
rust-analyzer
taplo-lsp
vscode-langservers-extracted
yaml-language-server
"
install-scripts target=(`echo $HOME` + "/.local/bin"):
cd scripts && zig build-exe \
-lc -lX11 -lXinerama \
scripts/randomwallpaper.zig \
randomwallpaper.zig \
-femit-bin={{target}}/randomwallpaper
opam install --yes clap
cd scripts/playtwitch && dune build
cp scripts/playtwitch/_build/default/playtwitch.exe {{target}}/playtwitch
ln -sf \
`pwd`/scripts/{playtwitch,start-joshuto,withjava} \
`pwd`/scripts/{start-joshuto,withjava} \
{{target}}
install-lsps-paru:
#!/bin/sh
paru -S --needed --noconfirm {{replace(lsps, "\n", " ")}}
if which opam &> /dev/null; then
opam install --yes \
ocaml-lsp-server \
ocamlformat
fi

View file

2
scripts/playtwitch/.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
_build/
*.exe

3
scripts/playtwitch/dune Normal file
View file

@ -0,0 +1,3 @@
(executable
(name playtwitch)
(libraries clap))

View file

@ -0,0 +1 @@
(lang dune 2.9)

13
scripts/playtwitch → scripts/playtwitch/playtwitch.ml Executable file → Normal file
View file

@ -1,16 +1,3 @@
#!/usr/bin/env scriptisto
(*
scriptisto-begin
script_src: playtwitch.ml
build_cmd: dune build playtwitch.exe
target_bin: ./_build/default/playtwitch.exe
files:
- path: dune
content: (executable (name playtwitch) (libraries clap))
scriptisto-end
*)
Clap.description "play a twitch stream using streamlink";
let stream_name = Clap.mandatory_string ~placeholder:"stream_name" () in
let quality = Clap.default_string ~placeholder:"quality" "best" in

View file

@ -1,4 +1,3 @@
// zig build-exe -lc -lX11 -lXinerama randomwallpaper.zig -femit-bin=$HOME/.local/bin/randomwallpaper
const std = @import("std");
const mem = std.mem;
const c = @cImport({