Use --skip-theme-config flag in box_setup, adjust nvim and tmux settings
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user