From 8d845e0fc8c6f16a94d0c8a866daac1d4195cd48 Mon Sep 17 00:00:00 2001 From: david Date: Thu, 20 Nov 2025 10:24:22 -0600 Subject: [PATCH] Use --skip-theme-config flag in box_setup, adjust nvim and tmux settings --- box_setup.sh | 10 ++++----- copy_dotfiles.sh | 8 +++---- docs/workflow-and-workspaces-scheme.md | 22 ++++++++++++++----- ...udio => custom_linux_debian_bitwig_studio} | 0 installs_and_builds/programs.csv | 4 ++-- src_files/.config/nvim/lua/auto_commands.lua | 12 ++++++++++ src_files/.config/nvim/lua/key_mappings.lua | 6 ++--- .../.config/nvim/lua/plugins_lazy/themes.lua | 2 +- .../tmux/.tmux-session-hydrate-default | 2 -- .../.config/tmux/.tmux-session-hydrate-hub | 4 ++++ src_files/.config/tmux/tmux.conf | 1 + src_files/.local/scripts/tmux-session-init | 10 +++++---- src_files/shell/profile | 3 ++- theme_config.sh | 6 +++-- 14 files changed, 60 insertions(+), 30 deletions(-) rename installs_and_builds/{custom_linux_alpine_bitwig_studio => custom_linux_debian_bitwig_studio} (100%) create mode 100644 src_files/.config/tmux/.tmux-session-hydrate-hub diff --git a/box_setup.sh b/box_setup.sh index 04327d7..4fee2c2 100755 --- a/box_setup.sh +++ b/box_setup.sh @@ -2,8 +2,8 @@ [[ $1 = "--help" ]] && { echo "\nusage: ./box_setup.sh [system-type]" - echo "\nsystem-type options: personal, studio-music, work-placeholder" - echo "\nexamples:\n ./box_setup.sh\n ./box_setup.sh studio-music\n" + echo "\nsystem-type options: work" + echo "\nexamples:\n ./box_setup.sh\n ./box_setup.sh work\n" exit 0 } @@ -51,11 +51,11 @@ export BOX_SETUP_UPDATE_PKGS_CMD="$update_pkgs_cmd" # make dirs and copy configs/dotfiles . ./src_files/shell/profile ./make_dirs.sh -./copy_dotfiles.sh $1 +./copy_dotfiles.sh "--skip-theme-config" # install programs . $ZDOTDIR/.zshrc ./install_programs.sh $1 -echo "setting the default theme: $DEFAULT_THEME_NAME" -$DIR_SCRIPTS/theme-set $DEFAULT_THEME_NAME +# configure themes +./theme_config.sh diff --git a/copy_dotfiles.sh b/copy_dotfiles.sh index 44d066a..1eb5119 100755 --- a/copy_dotfiles.sh +++ b/copy_dotfiles.sh @@ -58,11 +58,9 @@ IFS=","; for obs_dir in $OBSIDIAN_WORKSPACES_TO_CONFIGURE; do done # TODO: get reaper config set up -# [[ $1 = "studio-music" ]] { -# [[ "$OSTYPE" = *"darwin"* ]] && -# sym_link "$XDG_CONFIG_HOME/REAPER" "$HOME/Library/Application Support/REAPER" -# } +# [[ "$OSTYPE" = *"darwin"* ]] && +# sym_link "$XDG_CONFIG_HOME/REAPER" "$HOME/Library/Application Support/REAPER" # set up themes and theme-switcher -./theme_config.sh +! [ "$1" = "--skip-theme-config" ] && ./theme_config.sh diff --git a/docs/workflow-and-workspaces-scheme.md b/docs/workflow-and-workspaces-scheme.md index 7345d08..e032d63 100644 --- a/docs/workflow-and-workspaces-scheme.md +++ b/docs/workflow-and-workspaces-scheme.md @@ -1,4 +1,4 @@ -# notes regarding my workflow and intended use of workspaces +# notes regarding my workflow and system use ## workspaces layout @@ -19,7 +19,7 @@ idea from the ThePrimeagen: designated workspace/label/desktop per app/purpose | 9. | programming - misc (whatever is not in primary terminal) | 0. | general - misc (catch-all) -### ideas/guidelines: +### guiding ideas - use this consistently accross all machines - if something not applicable for a given machine, just don't have apps or screens present, but maintain absolute position/numbering of each screen @@ -29,12 +29,12 @@ idea from the ThePrimeagen: designated workspace/label/desktop per app/purpose - for me, using peripherals with right hand, so put programs likely to be used with peripherals where my left hand can switch to them single-handedly (screens 1 to 5) -## workflow / use notes +### usage notes - related to the layout above, my approach is to run almost every window in fullscreen - note: on macOS, this is not mac's notion of fullscreen, which basically moves windows to new workspaces/desktops when going to fullscreen mode; instead, when i - say 'fullscreen', the idea is taking up all of the normal screen (excluding the + say 'fullscreen', the idea is taking up all of the normal screen (excluding any menu bar at the top of the screen) - key bindings are set for moving window focus up/down (vim style: mod + k/j) - the mental model here is that every fullscreen window is in a stack, so i can move @@ -49,7 +49,7 @@ idea from the ThePrimeagen: designated workspace/label/desktop per app/purpose many windows and/or tabs open at one time; however, with the designated purpose for each workspace and the mental models above, it rarely takes me long to find what i need -## example cases +### example cases - if i want a particular browser window, i jump to workspace 9, then move focus up or down until i get to the window i want; if the window is right but i need @@ -59,3 +59,15 @@ idea from the ThePrimeagen: designated workspace/label/desktop per app/purpose - variation case: if i want a particular terminal workspace, i jump to workspace 8, but then i'm in tmux land and navigate via the methods i've set up for tmux +## theme usage + +| theme name | focus / use context +|-------------|-------------------- +| pina | default +| tokyodark | programming +| lanterns | (tbd) +| lighthouse | (tbd) +| gruvbox | admin/productivity work +| jade | (tbd) +| mars | night (within 2+ hours of sleep) + diff --git a/installs_and_builds/custom_linux_alpine_bitwig_studio b/installs_and_builds/custom_linux_debian_bitwig_studio similarity index 100% rename from installs_and_builds/custom_linux_alpine_bitwig_studio rename to installs_and_builds/custom_linux_debian_bitwig_studio diff --git a/installs_and_builds/programs.csv b/installs_and_builds/programs.csv index 099d027..353e6a2 100644 --- a/installs_and_builds/programs.csv +++ b/installs_and_builds/programs.csv @@ -31,7 +31,7 @@ git,package_manager,,,, calcurse,package_manager,,,, zathura,package_manager,macos: name='',,, tenacity,package_manager,macos: name='--cask audacity',,work: name='',tenacity not available via homebrew; use audacity in macos -bitwig-studio,package_manager,macos: name='--cask bitwig-studio',artix: kind='aur'; arch: kind='aur'; alpine: kind='build_custom'; debian: kind='build_custom';,work: name='', +bitwig-studio,package_manager,macos: name='--cask bitwig-studio',artix: kind='aur'; arch: kind='aur'; debian: kind='build_custom';,work: name='', gimp,package_manager,macos: name='--cask gimp',,, --cask nikitabobko/tap/aerospace,package_manager,linux: name='',,, -pandoc,package_manager,,arch: name='pandoc-cli'; artix: name='pandoc-bin'; alpine: name='pandoc-cli';,work: name='', +pandoc,package_manager,,arch: name='pandoc-cli'; artix: name='pandoc-bin';,work: name='', diff --git a/src_files/.config/nvim/lua/auto_commands.lua b/src_files/.config/nvim/lua/auto_commands.lua index 0599e80..73db3d6 100644 --- a/src_files/.config/nvim/lua/auto_commands.lua +++ b/src_files/.config/nvim/lua/auto_commands.lua @@ -1,15 +1,27 @@ local autoCmdGroup = vim.api.nvim_create_augroup("autoCmdGroup", { clear = true }) local autoCmd = vim.api.nvim_create_autocmd +-- trim trailing whitespace on save autoCmd({"BufWritePre"}, { group = autoCmdGroup, pattern = "*", command = [[%s/\s\+$//e]], }) +-- set conceallevel = 1 in obsidian vault(s) for obsidian-nvim plugin autoCmd({"BufReadPre"}, { group = autoCmdGroup, pattern = os.getenv("DIR_NOTES") .. "/**/*.md", command = [[lua vim.opt_local.conceallevel = 1]], }) +-- adjust indent spacing for html files +autoCmd({"FileType"}, { + group = autoCmdGroup, + pattern = "html", + callback = function() + vim.opt_local.shiftwidth = 2 + vim.opt_local.tabstop = 2 + vim.opt_local.softtabstop = 2 + end +}) diff --git a/src_files/.config/nvim/lua/key_mappings.lua b/src_files/.config/nvim/lua/key_mappings.lua index 6fb4172..0c21ec8 100644 --- a/src_files/.config/nvim/lua/key_mappings.lua +++ b/src_files/.config/nvim/lua/key_mappings.lua @@ -11,9 +11,9 @@ vim.keymap.set("n", "n", vim.cmd.Ex) vim.keymap.set("v", "J", ":m '>+1gv") vim.keymap.set("v", "K", ":m '<-2gv") --- reduce effective distance of half-page jumps and vertically-pad the cursor -vim.keymap.set("n", "", "4M") -vim.keymap.set("n", "", "4M") +-- add extra vertical padding for the cursor after half-page jumps +vim.keymap.set("n", "", "4") +vim.keymap.set("n", "", "4") -- open folds when iterating search results vim.keymap.set("n", "n", "nzv") diff --git a/src_files/.config/nvim/lua/plugins_lazy/themes.lua b/src_files/.config/nvim/lua/plugins_lazy/themes.lua index beee125..047a966 100644 --- a/src_files/.config/nvim/lua/plugins_lazy/themes.lua +++ b/src_files/.config/nvim/lua/plugins_lazy/themes.lua @@ -7,7 +7,7 @@ return { custom_highlights = function(highlights, palette) highlights.Comment['fg'] = "#8a9097" highlights.LineNr['fg'] = "#8088A8" - highlights.Visual['bg'] = palette.bg4 + highlights.Visual['bg'] = palette.bg3 return highlights end, gamma = 0.92, -- brightness diff --git a/src_files/.config/tmux/.tmux-session-hydrate-default b/src_files/.config/tmux/.tmux-session-hydrate-default index 0039b2f..f7d1fca 100644 --- a/src_files/.config/tmux/.tmux-session-hydrate-default +++ b/src_files/.config/tmux/.tmux-session-hydrate-default @@ -4,7 +4,6 @@ tmux_omitted_dirs=( $DIR_DEV $DIR_GIT_PROJECTS ) - [[ ! ${tmux_omitted_dirs[(re)$(pwd)]} ]] && { tmux new-window -d -n $EDITOR tmux send-keys -t :$EDITOR "$EDITOR ." c-M @@ -14,6 +13,5 @@ tmux_omitted_dirs=( tmux rename-window cmd tmux send-keys -t :cmd "clear; [[ -d .git ]] && git status" c-M } - clear diff --git a/src_files/.config/tmux/.tmux-session-hydrate-hub b/src_files/.config/tmux/.tmux-session-hydrate-hub new file mode 100644 index 0000000..ea558b3 --- /dev/null +++ b/src_files/.config/tmux/.tmux-session-hydrate-hub @@ -0,0 +1,4 @@ +tmux rename-window inbox +tmux send-keys -t :inbox 'cd "$DIR_INBOX"; clear; ls' c-M +clear + diff --git a/src_files/.config/tmux/tmux.conf b/src_files/.config/tmux/tmux.conf index 73145b4..db66427 100644 --- a/src_files/.config/tmux/tmux.conf +++ b/src_files/.config/tmux/tmux.conf @@ -46,6 +46,7 @@ bind-key C-f run-shell "tmux neww $DIR_SCRIPTS/tmux-session-init" bind-key C-s choose-session bind-key S choose-window bind-key C-h run-shell "tmux neww $DIR_SCRIPTS/tmux-session-init hub" +bind-key C-j run-shell "tmux neww $DIR_SCRIPTS/tmux-session-init notes" bind-key -r C-l switch-client -l bind-key -r C-o last-window bind-key -r C-n next-window diff --git a/src_files/.local/scripts/tmux-session-init b/src_files/.local/scripts/tmux-session-init index 5069ebc..57bf7f6 100755 --- a/src_files/.local/scripts/tmux-session-init +++ b/src_files/.local/scripts/tmux-session-init @@ -1,13 +1,14 @@ #!/bin/zsh tmux_switch_to() { - [[ -z $TMUX ]] && tmux attach-session -t $1 || tmux switch-client -t $1 + [ -z "$TMUX" ] && tmux attach-session -t "$1" || tmux switch-client -t "$1" } tmux_hydrate() { - local tmux_hydrate_path="$XDG_CONFIG_HOME/tmux/.tmux-session-hydrate-default" - [[ -f $2/.tmux-session-hydrate ]] && tmux_hydrate_path="$2/.tmux-session-hydrate" - [[ -f $tmux_hydrate_path ]] && tmux send-keys -t $1 ". $tmux_hydrate_path" c-M + hydrate_path="$XDG_CONFIG_HOME/tmux/.tmux-session-hydrate-default" + [ "$1" = "hub" ] && hydrate_path="$XDG_CONFIG_HOME/tmux/.tmux-session-hydrate-hub" + [ -f "$2/.tmux-session-hydrate" ] && hydrate_path="$2/.tmux-session-hydrate" + [ -f "$hydrate_path" ] && tmux send-keys -t $1 ". $hydrate_path" c-M } tmux_existing_sessions=$(tmux list-sessions 2> /dev/null || echo '') @@ -24,6 +25,7 @@ tmux_target_path='' if [[ $tmux_target_path = "." ]]; then tmux_target_name=$(basename $(pwd)) && tmux_target_path=$(pwd); elif [[ $tmux_target_path = "hub" ]]; then tmux_target_name="hub" && tmux_target_path="$HOME"; +elif [[ $tmux_target_path = "notes" ]]; then tmux_target_name="notes" && tmux_target_path="$DIR_NOTES"; elif [[ -n $tmux_target_path ]]; then tmux_target_name=$(basename "$tmux_target_path" | tr . _); fi diff --git a/src_files/shell/profile b/src_files/shell/profile index f7fcf6a..35b0b53 100644 --- a/src_files/shell/profile +++ b/src_files/shell/profile @@ -5,6 +5,7 @@ export TERMINAL='kitty' # env vars used for my organization structure export DIR_HOME_BOX="$HOME/dbox" +export DIR_INBOX="$DIR_HOME_BOX/inbox" export DIR_NOTES="$DIR_HOME_BOX/notes" export DIR_MUSIC="$DIR_HOME_BOX/music/listen" export DIR_DEV="$HOME/dev" @@ -27,7 +28,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="gruvbox" +export DEFAULT_THEME_NAME="pina" # ksh/oksh export ENV="$HOME/.config/ksh/kshrc" # ENV var should be ignored by zsh and bash diff --git a/theme_config.sh b/theme_config.sh index 00379cf..59ebb33 100755 --- a/theme_config.sh +++ b/theme_config.sh @@ -28,10 +28,12 @@ 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" -! [ -L "$DIR_THEME_SETTINGS/.current-theme" ] && - sym_link $DIR_THEME_SETTINGS/$DEFAULT_THEME_NAME $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_NAME" +$DIR_SCRIPTS/theme-set $DEFAULT_THEME_NAME +