Use --skip-theme-config flag in box_setup, adjust nvim and tmux settings
This commit is contained in:
10
box_setup.sh
10
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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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='',
|
||||
|
||||
|
@@ -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
|
||||
})
|
||||
|
||||
@@ -11,9 +11,9 @@ vim.keymap.set("n", "<leader>n", vim.cmd.Ex)
|
||||
vim.keymap.set("v", "J", ":m '>+1<CR>gv")
|
||||
vim.keymap.set("v", "K", ":m '<-2<CR>gv")
|
||||
|
||||
-- reduce effective distance of half-page jumps and vertically-pad the cursor
|
||||
vim.keymap.set("n", "<C-d>", "<C-d>4<C-y>M")
|
||||
vim.keymap.set("n", "<C-u>", "<C-u>4<C-e>M")
|
||||
-- add extra vertical padding for the cursor after half-page jumps
|
||||
vim.keymap.set("n", "<C-d>", "<C-d>4<C-e>")
|
||||
vim.keymap.set("n", "<C-u>", "<C-u>4<C-y>")
|
||||
|
||||
-- open folds when iterating search results
|
||||
vim.keymap.set("n", "n", "nzv")
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
4
src_files/.config/tmux/.tmux-session-hydrate-hub
Normal file
4
src_files/.config/tmux/.tmux-session-hydrate-hub
Normal file
@@ -0,0 +1,4 @@
|
||||
tmux rename-window inbox
|
||||
tmux send-keys -t :inbox 'cd "$DIR_INBOX"; clear; ls' c-M
|
||||
clear
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user