From 558e795078289349ca01373afa382814b41e41fd Mon Sep 17 00:00:00 2001 From: Jeff LANCE Date: Thu, 14 Aug 2025 00:48:48 +0200 Subject: [PATCH] up --- home/.chezmoi.toml.tmpl | 6 +-- ...once_after_20-install-asdf-plugins.sh.tmpl | 8 ++-- ... => run_once_after_30-nvim-config.sh.tmpl} | 13 +----- .../run_once_after_30-quarto-config.sh.tmpl | 30 +++++++++++++ .../run_once_after_40-install-shell.sh.tmpl | 10 ----- scripts/manjaro.sh | 42 +++++-------------- 6 files changed, 48 insertions(+), 61 deletions(-) rename home/.chezmoiscripts/{run_once_after_30-devel-config.sh.tmpl => run_once_after_30-nvim-config.sh.tmpl} (51%) create mode 100644 home/.chezmoiscripts/run_once_after_30-quarto-config.sh.tmpl diff --git a/home/.chezmoi.toml.tmpl b/home/.chezmoi.toml.tmpl index fa05218..b98cd34 100644 --- a/home/.chezmoi.toml.tmpl +++ b/home/.chezmoi.toml.tmpl @@ -7,8 +7,7 @@ command = "meld" {{ $hasNVim := promptBool "Do i install Neovim " false}} {{ $hasDevel := promptBool "Do i install programming languages " false }} {{ $hasLatex := promptBool "Do i install LaTeX " false }} -{{ $hasVSCode := promptBool "Do i install VSCode " false }} -{{ $hasQuarto := promptBool "Do i install Quarto " false }} +{{ $hasIDE := promptBool "Do i install IDE's " false }} [git] autoCommit = true autoPush = true @@ -16,8 +15,7 @@ autoPush = true hasNVim = {{ $hasNVim }} hasDevel = {{ $hasDevel }} hasLatex = {{ $hasLatex }} -hasVSCode = {{ $hasVSCode }} -hasQuarto = {{ $hasQuarto }} +hasIDE = {{ $hasIDE }} email = {{ $email | quote }} signingkey = {{ $signingkey | quote }} diff --git a/home/.chezmoiscripts/run_once_after_20-install-asdf-plugins.sh.tmpl b/home/.chezmoiscripts/run_once_after_20-install-asdf-plugins.sh.tmpl index c8edfc3..2809f4c 100644 --- a/home/.chezmoiscripts/run_once_after_20-install-asdf-plugins.sh.tmpl +++ b/home/.chezmoiscripts/run_once_after_20-install-asdf-plugins.sh.tmpl @@ -8,15 +8,15 @@ declare -A plugins plugins=( ['direnv']='' + ['starship']='' ['golang']='https://github.com/asdf-community/asdf-golang.git' - ['julia']='https://github.com/rkyleg/asdf-julia.git' - ['lua']='https://github.com/Stratus3D/asdf-lua.git' ['nodejs']='https://github.com/asdf-vm/asdf-nodejs.git' ['opam']='https://github.com/asdf-community/asdf-opam.git' - ['r']='https://github.com/asdf-community/asdf-r.git' ['ruby']='https://github.com/asdf-vm/asdf-ruby.git' ['rust']='https://github.com/code-lever/asdf-rust.git' - ['starship']='' + ['python']='https://github.com/asdf-community/asdf-python.git' + ['julia']='https://github.com/rkyleg/asdf-julia.git' + ['r']='https://github.com/asdf-community/asdf-r.git' ) diff --git a/home/.chezmoiscripts/run_once_after_30-devel-config.sh.tmpl b/home/.chezmoiscripts/run_once_after_30-nvim-config.sh.tmpl similarity index 51% rename from home/.chezmoiscripts/run_once_after_30-devel-config.sh.tmpl rename to home/.chezmoiscripts/run_once_after_30-nvim-config.sh.tmpl index 6f79a37..76bb0a7 100644 --- a/home/.chezmoiscripts/run_once_after_30-devel-config.sh.tmpl +++ b/home/.chezmoiscripts/run_once_after_30-nvim-config.sh.tmpl @@ -9,9 +9,10 @@ lua_version="latest:5.1" {{- if (ne .hasNVim false) }} - log "Set Lua version for NVim" + log "Install Lua version for NVim via asdf" inf "Lua ${lua_version}..." + asdf plugin add lua 'https://github.com/Stratus3D/asdf-lua.git' asdf install lua ${lua_version} asdf set lua ${lua_version} @@ -19,13 +20,3 @@ lua_version="latest:5.1" {{- end }} -log "Set Jupyter kernels" - -inf "R kernel" -Rscript -e "install.packages('IRkernel', repos='https://cloud.r-project.org')" \ - -e "IRkernel::installspec(user = TRUE)" - -inf "Julia kernel" -julia -e 'using Pkg; Pkg.add("IJulia")' - -log "Jypyter kernels set" diff --git a/home/.chezmoiscripts/run_once_after_30-quarto-config.sh.tmpl b/home/.chezmoiscripts/run_once_after_30-quarto-config.sh.tmpl new file mode 100644 index 0000000..c0c34b8 --- /dev/null +++ b/home/.chezmoiscripts/run_once_after_30-quarto-config.sh.tmpl @@ -0,0 +1,30 @@ +#!{{ lookPath "bash" }} + +# include lib +. ${CHEZMOI_WORKING_TREE}/scripts/utils.sh + + +{{- if (ne .hasIDE false) }} + + log "Finalize quarto install" + + # inf "Install tinytex" + # if [[ $(command -v quarto) ]]; then + # quarto install tinytex + # fi + # + # inf "Install python dependencies" + # python3 -m pip install jupyter jupyterlab ipykernel matplotlib plotly pandas + # + # inf "Install Jupyter kernels" + # python3 -m ipykernel install --user --name python-asdf --display-name "Python (asdf)" + # + # Rscript -e "install.packages('IRkernel', repos='https://cloud.r-project.org')" \ + # -e "IRkernel::installspec(user = FALSE)" + # + # julia -e 'using Pkg; Pkg.add("IJulia")' + + log "Quarto install complete" + +{{- end }} + diff --git a/home/.chezmoiscripts/run_once_after_40-install-shell.sh.tmpl b/home/.chezmoiscripts/run_once_after_40-install-shell.sh.tmpl index 61e89e4..cdb8cb4 100644 --- a/home/.chezmoiscripts/run_once_after_40-install-shell.sh.tmpl +++ b/home/.chezmoiscripts/run_once_after_40-install-shell.sh.tmpl @@ -16,16 +16,6 @@ inf "installing cargo-update..." cargo install cargo-update -### Install Atuin -#inf "installing atuin..." -# -#cargo install atuin -# -### Reshim -#inf "asdf reshim..." -# -#asdf reshim - ### Config Zsh ### inf "installing zim framework" diff --git a/scripts/manjaro.sh b/scripts/manjaro.sh index 4f2ff44..9f4fa27 100644 --- a/scripts/manjaro.sh +++ b/scripts/manjaro.sh @@ -9,11 +9,10 @@ usage() { printf "\nUsage:\n" echo " --base Install base packages" echo " --devel Install development languages" - echo " --nvim Install deps for NeoVim" - echo " --zsh Install deps for zsh" - echo " --latex Install deps for latex" - echo " --quarto Install deps for quarto" - echo " --vscode Install deps for VSCode" + echo " --nvim Install NeoVim and dependencies" + echo " --zsh Install zsh and dependencies" + echo " --latex Install latex and dependencies" + echo " --ide Install IDE's" } # packages to install @@ -52,7 +51,6 @@ install_devel() { packages+=( gcc-fortran go - lua nodejs npm python @@ -97,39 +95,20 @@ install_latex() { ) } -install_vscode() { +install_ide() { packages+=( code - ) -} - -install_quarto() { - packages+=( quarto-cli-bin - jupyter-nbclient - jupyter-nbformat - python-jupyter-core - python-matplotlib - python-pandas - python-plotly ) } -configure_quarto() { - if [[ ! $(command -v quarto) ]]; then - install_quarto - fi - quarto install tinytex -} - # cli options BASE=false DEVEL=false NVIM=false ZSH=false LATEX=false -VSCODE=false -QUARTO=false +IDE=false if [ "$#" -eq 0 ]; then usage @@ -143,8 +122,7 @@ while [ "$#" -gt 0 ]; do --nvim) NVIM=true ;; --zsh) ZSH=true ;; --latex) LATEX=true ;; - --vscode) VSCODE=true;; - --quarto) QUARTO=true;; + --ide) IDE=true;; *) usage exit 1 @@ -160,10 +138,10 @@ main() { "$NVIM" && install_nvim "$ZSH" && install_zsh "$LATEX" && install_latex - "$VSCODE" && install_vscode - if [[ $QUARTO == true ]]; then - install_quarto + "$IDE" && install_ide + if [[ $IDE == true ]]; then configure_quarto + configure_jupyter_kernels fi ## Install yay