From bb97234f1bc650bddd5384c53d2ab9d9c642d3e0 Mon Sep 17 00:00:00 2001 From: david Date: Fri, 14 Nov 2025 00:29:18 -0600 Subject: [PATCH] Adjust install, file-copy, and theme logic after first run on arch linux --- box_setup.sh | 4 +++- copy_dotfiles.sh | 1 + docs/attribution.md | 18 ++++++++---------- docs/post-run.md | 9 +++++++++ docs/todo.md | 2 +- install_programs.sh | 5 ++++- installs_and_builds/programs.csv | 2 -- .../.config/nvim/lua/plugins_lazy/lsp.lua | 2 +- .../nvim/lua/plugins_lazy/treesitter.lua | 1 - src_files/.config/zsh/.zshenv | 1 + src_files/.local/scripts/theme-set | 4 ++-- theme_config.sh | 7 ++----- 12 files changed, 32 insertions(+), 24 deletions(-) diff --git a/box_setup.sh b/box_setup.sh index 56938ef..060504e 100755 --- a/box_setup.sh +++ b/box_setup.sh @@ -28,7 +28,7 @@ echo "---- settings vars for system type -----" [[ "$setup_os" = "linux" ]] && { case $setup_distro in (arch | artix) - install_cmd="sudo pacman -S" + install_cmd="sudo pacman -S --noconfirm" update_pkg_manager_and_defs_cmd='' # don't; update system instead? update_pkgs_cmd='sudo pacman -Syu' ;; @@ -58,3 +58,5 @@ source $ZDOTDIR/.zshenv source $ZDOTDIR/.zshrc ./install_programs.sh $1 +echo "setting the default theme: $DEFAULT_THEME_NAME" +$DIR_SCRIPTS/theme-set $DEFAULT_THEME_NAME diff --git a/copy_dotfiles.sh b/copy_dotfiles.sh index 0dbf36c..291c8d3 100755 --- a/copy_dotfiles.sh +++ b/copy_dotfiles.sh @@ -60,3 +60,4 @@ done # set up themes and theme-switcher ./theme_config.sh + diff --git a/docs/attribution.md b/docs/attribution.md index 11bb5f9..90fc3c8 100644 --- a/docs/attribution.md +++ b/docs/attribution.md @@ -1,14 +1,14 @@ # attribution -## Original pattern/approach and some key config logic +## Original pattern/approach and some core config logic -The original pattern and approach for this project, the program-installation scripts and -logic, the copy-configs-and-scripts scripts and logic, the "tmux sessionizer" (tmux -session init logic), my initial neovim and tmux configs, and my general workflow/workspace -strategy, were derived from several of ThePrimeagen's projects and videos, including a -FrontEnd Masters course which he taught (each are listed below). I was unable to locate -any required licenses or copyrights for the code contained within these sources, but I -wanted to give attribution nonetheless. +The original pattern and approach for this project, the original program-installation +and copy-configs-and-files scripts/logic, the "tmux sessionizer" (tmux session init +logic), my initial neovim and tmux configs, and my general workflow/workspace strategy, +were derived from several of ThePrimeagen's (aka Michael Paulson) projects and videos, +including a FrontEnd Masters course which he taught (each are listed below). I was +unable to locate any required licenses or copyrights for the code contained within +these sources, but I wanted to give attribution nonetheless. - [dev/setup/config repo](https://github.com/ThePrimeagen/dev) - [neovim config](https://github.com/ThePrimeagen/init.lua) @@ -16,8 +16,6 @@ wanted to give attribution nonetheless. - [YouTube video - neovim config video](https://www.youtube.com/watch?v=w7i4amO_zaE) - [FrontEnd Masters course - dev productivity v2](https://frontendmasters.com/courses/developer-productivity-v2/) -Author: ThePrimeagen (Michael Paulson) - ## Idea of using a list of programs in a file for build/install The idea of using a file with a list of programs in it for building and/or diff --git a/docs/post-run.md b/docs/post-run.md index eafeabe..4d5e097 100644 --- a/docs/post-run.md +++ b/docs/post-run.md @@ -1,5 +1,14 @@ # Manual steps needed after dotfile copy and/or installs +## all systems + +- shell + - check user's shell using `echo $SHELL` or otherwise + - if not the desired shell: + - `chsh -l` to see options; if target shell isn't listed, then add it + to `/etc/shells` + - then change the shell with `chsh -s ` + ## macOS - aerospace diff --git a/docs/todo.md b/docs/todo.md index 8569521..f843885 100644 --- a/docs/todo.md +++ b/docs/todo.md @@ -1,6 +1,6 @@ # todo items -- config for shell (likely oksh) +- config for shell (using zsh for now, but considering oksh) - config for calcurse - config for mpd, and client(s), (mpd clients to consider: mpc, ncmpcpp, ncmpc, inori) - hyprland config and install on linux diff --git a/install_programs.sh b/install_programs.sh index 6cf5f60..3be6275 100755 --- a/install_programs.sh +++ b/install_programs.sh @@ -49,7 +49,10 @@ sed 1d "installs_and_builds/programs.csv" | [[ $name = 'zz_skip' || $kind = 'zz_skip' ]] && continue - [[ $kind = 'package_manager' ]] && ${=BOX_SETUP_INSTALL_COMMAND} ${=name} || { + echo "-- installing $name" + [[ $kind = 'package_manager' ]] && { + ${=BOX_SETUP_INSTALL_COMMAND} ${=name} + }|| { [[ $kind = 'build_custom' ]] && build_custom $name } done diff --git a/installs_and_builds/programs.csv b/installs_and_builds/programs.csv index 216ce73..00e2f71 100644 --- a/installs_and_builds/programs.csv +++ b/installs_and_builds/programs.csv @@ -1,8 +1,6 @@ name,kind,os_overrides,distro_overrides,system_type_overrides,notes gcc,package_manager,macos: name='',,, -g++,package_manager,macos: name='',,, clang,package_manager,macos: name='',,, -clang++,package_manager,macos: name='',,, musl,package_manager,macos: name='',,, coreutils,package_manager,linux: name='',,, findutils,package_manager,linux: name='',,, diff --git a/src_files/.config/nvim/lua/plugins_lazy/lsp.lua b/src_files/.config/nvim/lua/plugins_lazy/lsp.lua index 700cf16..7e75ff9 100644 --- a/src_files/.config/nvim/lua/plugins_lazy/lsp.lua +++ b/src_files/.config/nvim/lua/plugins_lazy/lsp.lua @@ -29,7 +29,7 @@ return { ensure_installed = { "clangd", "lua_ls", - "ruby_lsp", + -- "ruby_lsp", -- "gopls", -- "tailwindcss", }, diff --git a/src_files/.config/nvim/lua/plugins_lazy/treesitter.lua b/src_files/.config/nvim/lua/plugins_lazy/treesitter.lua index 0231eea..a96d3be 100644 --- a/src_files/.config/nvim/lua/plugins_lazy/treesitter.lua +++ b/src_files/.config/nvim/lua/plugins_lazy/treesitter.lua @@ -1,7 +1,6 @@ return { { "nvim-treesitter/nvim-treesitter", - branch = 'master', lazy = false, build = ":TSUpdate", config = function() diff --git a/src_files/.config/zsh/.zshenv b/src_files/.config/zsh/.zshenv index 72a64b7..af2dad6 100644 --- a/src_files/.config/zsh/.zshenv +++ b/src_files/.config/zsh/.zshenv @@ -27,6 +27,7 @@ export XDG_DATA_DIRS="/usr/local/share:/usr/share" # directory for theme/style stuff export DIR_THEME_SETTINGS="$XDG_CONFIG_HOME/zz-this-box/themes" +export DEFAULT_THEME_NAME="tokyodark" # zsh export ZDOTDIR="$XDG_CONFIG_HOME/zsh" # may already be set, set anyway diff --git a/src_files/.local/scripts/theme-set b/src_files/.local/scripts/theme-set index b1419de..cadbc00 100755 --- a/src_files/.local/scripts/theme-set +++ b/src_files/.local/scripts/theme-set @@ -50,7 +50,7 @@ theme_update_browser() { # actually applied, leaving here as is for now; TODO: fix or just remove defaults write com.brave.browser $policy -string "$color_hex" } - brave --refresh-platform-policy --no-startup-window + brave --refresh-platform-policy --no-startup-window > /dev/null } [[ ! -z $1 ]] && raw_target="$1" || @@ -62,7 +62,7 @@ theme_update_browser() { target_theme="$DIR_THEME_SETTINGS/$(echo $raw_target | tr ' ' '-' | tr '[:upper:]' '[:lower:]')" [[ ! -d "$target_theme" ]] && echo "theme not found: $target_theme" && exit 1 -ln -sF "$target_theme" $DIR_THEME_SETTINGS/.current-theme +ln -snf "$target_theme" $DIR_THEME_SETTINGS/.current-theme theme_update_terminal theme_update_tmux diff --git a/theme_config.sh b/theme_config.sh index 94ab1a8..8cc97c3 100755 --- a/theme_config.sh +++ b/theme_config.sh @@ -28,13 +28,10 @@ nvim_themes_dir=$XDG_CONFIG_HOME/nvim/themes cp -p src_files/imports/themes-omarchy-extra/pina/pina.nvim/colors/pina.vim $nvim_themes_dir/pina/colors/ echo "setting sym-links for theme-switching" -default_theme="tokyodark" -sym_link $DIR_THEME_SETTINGS/$default_theme $DIR_THEME_SETTINGS/.current-theme +! [ -L "$DIR_THEME_SETTINGS/.current-theme" ] && + sym_link $DIR_THEME_SETTINGS/$DEFAULT_THEME_NAME $DIR_THEME_SETTINGS/.current-theme sym_link $DIR_THEME_SETTINGS/.current-theme/kitty.conf $XDG_CONFIG_HOME/kitty/theme.conf sym_link $DIR_THEME_SETTINGS/.current-theme/tmux.conf $XDG_CONFIG_HOME/tmux/theme.conf sym_link $DIR_THEME_SETTINGS/.current-theme/neovim.lua $XDG_CONFIG_HOME/nvim/current-theme # TODO: set additional links per theme-set script -echo "setting the default theme: $default_theme" -$DIR_SCRIPTS/theme-set $default_theme -