From c058edf67d703e5adc22f2953cdcdd696b969f41 Mon Sep 17 00:00:00 2001 From: iceyrazor Date: Sat, 19 Sep 2026 18:21:43 -0500 Subject: Squashed commit of the following: added vis plugin downloader fixed env scripts changed get-reqs priority priority in runs symlinks :> --- README.md | 1 - run.sh | 4 +++- runs-all/48-get-reqs-arch.sh | 45 ++++++++++++++++++++++++++++++++++++++ runs-all/50-env.sh | 39 +++++++++++++++++++++++++++++++++ runs-all/50-mimes.sh | 16 ++++++++++++++ runs-all/51-get-vis-plugins.sh | 15 +++++++++++++ runs-all/env.sh | 34 ---------------------------- runs-all/get-reqs-arch.sh | 45 -------------------------------------- runs-all/get-reqs-arch/vis-reqs.sh | 2 ++ runs-all/mimes.sh | 16 -------------- runs/48-get-reqs-arch.sh | 14 ++++++++++++ runs/50-env.sh | 27 +++++++++++++++++++++++ runs/51-packer.sh | 8 +++++++ runs/env.sh | 15 ------------- runs/get-reqs-arch.sh | 14 ------------ runs/packer.sh | 8 ------- 16 files changed, 169 insertions(+), 134 deletions(-) create mode 100755 runs-all/48-get-reqs-arch.sh create mode 100755 runs-all/50-env.sh create mode 100755 runs-all/50-mimes.sh create mode 100755 runs-all/51-get-vis-plugins.sh delete mode 100755 runs-all/env.sh delete mode 100755 runs-all/get-reqs-arch.sh create mode 100755 runs-all/get-reqs-arch/vis-reqs.sh delete mode 100755 runs-all/mimes.sh create mode 100755 runs/48-get-reqs-arch.sh create mode 100755 runs/50-env.sh create mode 100755 runs/51-packer.sh delete mode 100755 runs/env.sh delete mode 100755 runs/get-reqs-arch.sh delete mode 100755 runs/packer.sh diff --git a/README.md b/README.md index 3aa9255..12e8f08 100644 --- a/README.md +++ b/README.md @@ -103,5 +103,4 @@ i liked how primagen did his dev environment and deploying of scripts. so im mak ## todo -- [ ] make symlink. where if -s. do symlink instead of env - [ ] make fully portable version, all pulled and compiled version bins for just devtools. diff --git a/run.sh b/run.sh index c06feed..72bbf5d 100755 --- a/run.sh +++ b/run.sh @@ -4,12 +4,14 @@ echo DEV_ENV "$DEV_ENV" run_runs_all=0 list_runs=0 -while getopts "al" opt; do +while getopts "als" opt; do case "$opt" in a) run_runs_all=1 ;; l) list_runs=1 ;; + s) export CREATE_SYMLINKS=1 + ;; *) echo invalid args exit ;; diff --git a/runs-all/48-get-reqs-arch.sh b/runs-all/48-get-reqs-arch.sh new file mode 100755 index 0000000..0e31a00 --- /dev/null +++ b/runs-all/48-get-reqs-arch.sh @@ -0,0 +1,45 @@ +#!/bin/bash +. /etc/os-release +if [ "$ID" = "artix" ] || [ "$ID" = "arch" ]; then + sudo="sudo" + which doas > /dev/null && sudo="doas" + + echo GETTING ALL REQS ARCH + + #aur + install_aur=0 + printf "install aur manager? [y/N]" + read -r uin + if [ "$uin" = "y" ] || [ "$uin" = "Y" ]; then + install_aur=1 + fi + + export aurm="paru" + + #ask what to install + reqs_dir="$(find "$script_dir/runs-all/get-reqs-arch" -mindepth 1 -maxdepth 1 -type f -executable)" + reqs_list=() + + for s in $reqs_dir; do + printf -- "%s? [y/N]" "$s" + read -r uin + if [ "$uin" = "y" ] || [ "$uin" = "Y" ]; then + reqs_list+=("$s") + fi + done + echo -------------- + + if [ $install_aur = 1 ]; then + git clone https://aur.archlinux.org/paru.git + cd paru || exit + makepkg -si + fi + + #install + for s in "${reqs_list[@]}"; do + echo "running $s" + . "$s" + done + + echo --------------- +fi diff --git a/runs-all/50-env.sh b/runs-all/50-env.sh new file mode 100755 index 0000000..a3583b9 --- /dev/null +++ b/runs-all/50-env.sh @@ -0,0 +1,39 @@ +#!/bin/sh +echo DEPLOYING ENV ALL +if [ "$CREATE_SYMLINKS" = 1 ]; then + cp -rs "$script_dir/env/." "$DEV_ENV" + [ -d "$script_dir/env_private/env/" ] && echo LINKING ENV PRIVATE______ && cp -rs "$script_dir/env_private/env/." "$DEV_ENV" +else + cp -r "$script_dir/env/." "$DEV_ENV" + [ -d "$script_dir/env_private/env/" ] && echo COPYING ENV PRIVATE______ && cp -r "$script_dir/env_private/env/." "$DEV_ENV" +fi + + +if [ ! -f "/etc/profile" ]; then + echo NO /etc/profile + echo SKIPPING SETTING \$PATH +else + export PATH="" + . /etc/profile + paths="$PATH" + path_dirs="$(find "$DEV_ENV/.local/bin/scripts" -type d)" + yt_cli_dir="$(find ~/stuff/ -name youtube-playlist-cli -type d)" + + path_dirs="$path_dirs +$yt_cli_dir +$(find ~/stuff/ -name theme-setter -type d) +$(find ~/.local/bin/blender* -maxdepth 0 -type d) +$(find "$script_dir/keep/scripts" -type d) +$(find "$script_dir/env_private/keep/scripts" -type d)" + + for s in $path_dirs; do + echo "adding $s to path" + paths="$paths:$s" + done + + echo "export PATH=\"$paths:\"" > "$DEV_ENV/.local/bin/system/paths.sh" + echo "export YT_PLAYLIST_DIR=\"$yt_cli_dir\"" >> "$DEV_ENV/.local/bin/system/paths.sh" + chmod u+x "$DEV_ENV/.local/bin/system/paths.sh" + +fi +echo ----------------- diff --git a/runs-all/50-mimes.sh b/runs-all/50-mimes.sh new file mode 100755 index 0000000..8e92f8e --- /dev/null +++ b/runs-all/50-mimes.sh @@ -0,0 +1,16 @@ +#!/bin/sh + +echo SETTING MIMES +unset BROWSER +xdg-settings set default-web-browser librewolf.desktop +xdg-mime default librewolf.desktop application/pdf +xdg-mime default pinta.desktop image/jpeg +xdg-mime default pinta.desktop image/png +xdg-mime default pinta.desktop image/webp +xdg-mime default pinta.desktop image/gif +xdg-mime default mpv.desktop video/webm +xdg-mime default mpv.desktop video/mp4 +xdg-mime default mpv.desktop video/quicktime +xdg-mime default mpv.desktop video/x-matroska +xdg-mime default mpv.desktop audio/flac +echo -------- diff --git a/runs-all/51-get-vis-plugins.sh b/runs-all/51-get-vis-plugins.sh new file mode 100755 index 0000000..17b2bde --- /dev/null +++ b/runs-all/51-get-vis-plugins.sh @@ -0,0 +1,15 @@ +#!/bin/sh +echo DOWNLOADING VIS PLUGINS + +plugindir="$DEV_ENV/.config/vis/plugins" + +git clone https://codeberg.org/luxanna/vis-autoclose "$plugindir/vis-autoclose" +git clone git@servgit:iceyrazor/vis-chain "$plugindir/vis-chain" +git clone https://github.com/thimc/vis-colorizer "$plugindir/vis-colorizer" +git clone https://github.com/milhnl/vis-format "$plugindir/vis-format" +git clone https://codeberg.org/muhq/vis-lspc.git "$plugindir/vis-lspc" +echo SKIPPING vis-modal. SITE DOWN +#git clone https://git.symlinx.net/vis-modal/ "$plugindir/vis-modal" +git clone https://codeberg.org/muhq/vis-spellcheck "$plugindir/vis-spellcheck" + +echo ----------------- diff --git a/runs-all/env.sh b/runs-all/env.sh deleted file mode 100755 index a3ae7e7..0000000 --- a/runs-all/env.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh -echo DEPLOYING ENV ALL -cp -r "$script_dir/env/." "$DEV_ENV" -[ -d "$script_dir/env_private/env/" ] && cp -r "$script_dir/env_private/env/." "$DEV_ENV" - - -if [ ! -f "/etc/profile" ]; then - echo NO /etc/profile - echo SKIPPING SETTING \$PATH -else - export PATH="" - . /etc/profile - paths="$PATH" - path_dirs="$(find "$DEV_ENV/.local/bin/scripts" -type d)" - yt_cli_dir="$(find ~/stuff/ -name youtube-playlist-cli -type d)" - - path_dirs="$path_dirs -$yt_cli_dir -$(find ~/stuff/ -name theme-setter -type d) -$(find ~/.local/bin/blender* -maxdepth 0 -type d) -$(find "$script_dir/keep/scripts" -type d) -$(find "$script_dir/env_private/keep/scripts" -type d)" - - for s in $path_dirs; do - echo "adding $s to path" - paths="$paths:$s" - done - - echo "export PATH=\"$paths:\"" > "$DEV_ENV/.local/bin/system/paths.sh" - echo "export YT_PLAYLIST_DIR=\"$yt_cli_dir\"" >> "$DEV_ENV/.local/bin/system/paths.sh" - chmod u+x "$DEV_ENV/.local/bin/system/paths.sh" - -fi -echo ----------------- diff --git a/runs-all/get-reqs-arch.sh b/runs-all/get-reqs-arch.sh deleted file mode 100755 index 0e31a00..0000000 --- a/runs-all/get-reqs-arch.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/bash -. /etc/os-release -if [ "$ID" = "artix" ] || [ "$ID" = "arch" ]; then - sudo="sudo" - which doas > /dev/null && sudo="doas" - - echo GETTING ALL REQS ARCH - - #aur - install_aur=0 - printf "install aur manager? [y/N]" - read -r uin - if [ "$uin" = "y" ] || [ "$uin" = "Y" ]; then - install_aur=1 - fi - - export aurm="paru" - - #ask what to install - reqs_dir="$(find "$script_dir/runs-all/get-reqs-arch" -mindepth 1 -maxdepth 1 -type f -executable)" - reqs_list=() - - for s in $reqs_dir; do - printf -- "%s? [y/N]" "$s" - read -r uin - if [ "$uin" = "y" ] || [ "$uin" = "Y" ]; then - reqs_list+=("$s") - fi - done - echo -------------- - - if [ $install_aur = 1 ]; then - git clone https://aur.archlinux.org/paru.git - cd paru || exit - makepkg -si - fi - - #install - for s in "${reqs_list[@]}"; do - echo "running $s" - . "$s" - done - - echo --------------- -fi diff --git a/runs-all/get-reqs-arch/vis-reqs.sh b/runs-all/get-reqs-arch/vis-reqs.sh new file mode 100755 index 0000000..6ac7b44 --- /dev/null +++ b/runs-all/get-reqs-arch/vis-reqs.sh @@ -0,0 +1,2 @@ +#!/bin/sh +$sudo pacman -S --noconfirm lua52 ncurses lua52-lpeg tree-sitter tree-sitter-c tree-sitter-lua tree-sitter-markdown diff --git a/runs-all/mimes.sh b/runs-all/mimes.sh deleted file mode 100755 index 8e92f8e..0000000 --- a/runs-all/mimes.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh - -echo SETTING MIMES -unset BROWSER -xdg-settings set default-web-browser librewolf.desktop -xdg-mime default librewolf.desktop application/pdf -xdg-mime default pinta.desktop image/jpeg -xdg-mime default pinta.desktop image/png -xdg-mime default pinta.desktop image/webp -xdg-mime default pinta.desktop image/gif -xdg-mime default mpv.desktop video/webm -xdg-mime default mpv.desktop video/mp4 -xdg-mime default mpv.desktop video/quicktime -xdg-mime default mpv.desktop video/x-matroska -xdg-mime default mpv.desktop audio/flac -echo -------- diff --git a/runs/48-get-reqs-arch.sh b/runs/48-get-reqs-arch.sh new file mode 100755 index 0000000..636863f --- /dev/null +++ b/runs/48-get-reqs-arch.sh @@ -0,0 +1,14 @@ +#!/bin/sh +. /etc/os-release +if [ "$ID" = "artix" ] || [ "$ID" = "arch" ]; then + sudo="sudo" + which doas > /dev/null && sudo="doas" + + echo GETTING MIN REQS + + $sudo pacman -S vis # separated incase i have it allready elsewhere + $sudo pacman -S rsync man-db wget git fzf + $sudo pacman -S lf ugrep + + echo ------------- +fi diff --git a/runs/50-env.sh b/runs/50-env.sh new file mode 100755 index 0000000..0e4fb66 --- /dev/null +++ b/runs/50-env.sh @@ -0,0 +1,27 @@ +#!/bin/sh + +echo DEPLOYING ENV + +if [ "$CREATE_SYMLINKS" = 1 ]; then + cp -s "$script_dir/env/.bashrc" "$DEV_ENV" + cp -s "$script_dir/env/.bash_profile" "$DEV_ENV" + cp -s "$script_dir/env/.vimrc" "$DEV_ENV" + mkdir "$DEV_ENV/.config" + cp -s "$script_dir/env/.config/.profile" "$DEV_ENV/.config" + cp -rs "$script_dir/env/.config/nvim" "$DEV_ENV/.config" + cp -rs "$script_dir/env/.config/vis" "$DEV_ENV/.config" + cp -rs "$script_dir/env/.config/tmux" "$DEV_ENV/.config" + cp -rs "$script_dir/env/.config/wezterm" "$DEV_ENV/.config" +else + cp "$script_dir/env/.bashrc" "$DEV_ENV" + cp "$script_dir/env/.bash_profile" "$DEV_ENV" + cp "$script_dir/env/.vimrc" "$DEV_ENV" + mkdir "$DEV_ENV/.config" + cp "$script_dir/env/.config/.profile" "$DEV_ENV/.config" + cp -r "$script_dir/env/.config/nvim" "$DEV_ENV/.config" + cp -r "$script_dir/env/.config/vis" "$DEV_ENV/.config" + cp -r "$script_dir/env/.config/tmux" "$DEV_ENV/.config" + cp -r "$script_dir/env/.config/wezterm" "$DEV_ENV/.config" +fi + +echo "-----------------" diff --git a/runs/51-packer.sh b/runs/51-packer.sh new file mode 100755 index 0000000..6785682 --- /dev/null +++ b/runs/51-packer.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +echo DOWNLOADING PACKER FOR NVIM + +git clone --depth 1 https://github.com/wbthomason/packer.nvim \ +~/.local/share/nvim/site/pack/packer/start/packer.nvim + +echo ---------- diff --git a/runs/env.sh b/runs/env.sh deleted file mode 100755 index 7f34098..0000000 --- a/runs/env.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -echo DEPLOYING ENV - -cp "$script_dir/env/.bashrc" "$DEV_ENV" -cp "$script_dir/env/.bash_profile" "$DEV_ENV" -cp "$script_dir/env/.vimrc" "$DEV_ENV" -mkdir "$DEV_ENV/.config" -cp "$script_dir/env/.config/.profile" "$DEV_ENV/.config" -cp -r "$script_dir/env/.config/nvim" "$DEV_ENV/.config" -cp -r "$script_dir/env/.config/vis" "$DEV_ENV/.config" -cp -r "$script_dir/env/.config/tmux" "$DEV_ENV/.config" -cp -r "$script_dir/env/.config/wezterm" "$DEV_ENV/.config" - -echo "-----------------" diff --git a/runs/get-reqs-arch.sh b/runs/get-reqs-arch.sh deleted file mode 100755 index 636863f..0000000 --- a/runs/get-reqs-arch.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh -. /etc/os-release -if [ "$ID" = "artix" ] || [ "$ID" = "arch" ]; then - sudo="sudo" - which doas > /dev/null && sudo="doas" - - echo GETTING MIN REQS - - $sudo pacman -S vis # separated incase i have it allready elsewhere - $sudo pacman -S rsync man-db wget git fzf - $sudo pacman -S lf ugrep - - echo ------------- -fi diff --git a/runs/packer.sh b/runs/packer.sh deleted file mode 100755 index 6785682..0000000 --- a/runs/packer.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -echo DOWNLOADING PACKER FOR NVIM - -git clone --depth 1 https://github.com/wbthomason/packer.nvim \ -~/.local/share/nvim/site/pack/packer/start/packer.nvim - -echo ---------- -- cgit v1.3