diff options
author | jakob.stendahl <jakob.stendahl@infomedia.dk> | 2024-05-06 16:11:37 +0200 |
---|---|---|
committer | jakob.stendahl <jakob.stendahl@infomedia.dk> | 2024-05-06 16:11:37 +0200 |
commit | eaf4ca6b91de4e3efceb092a17b97503cdaa05cd (patch) | |
tree | 3e02ec0ae5c79af7de50aa389ff24acdbe99e3cd | |
parent | 03c510ab2fa66c7783e5df6d61ff6f9d40b1b2d8 (diff) | |
download | dotfiles-eaf4ca6b91de4e3efceb092a17b97503cdaa05cd.tar.gz dotfiles-eaf4ca6b91de4e3efceb092a17b97503cdaa05cd.zip |
Remove non-default settings from tmux
-rwxr-xr-x | Common/nvim/lua/basic.lua | 8 | ||||
-rw-r--r-- | Makefile.m4 | 6 | ||||
-rwxr-xr-x | bin/update-theme | 6 | ||||
-rw-r--r-- | linux/tmux.conf.m4 | 39 |
4 files changed, 12 insertions, 47 deletions
diff --git a/Common/nvim/lua/basic.lua b/Common/nvim/lua/basic.lua index 138d8a1..f5bf3a2 100755 --- a/Common/nvim/lua/basic.lua +++ b/Common/nvim/lua/basic.lua @@ -1,7 +1,3 @@ ---[[ - General ---]] - vim.opt.autoread = true vim.opt.formatoptions:remove("t") vim.opt.path:append("**") @@ -12,10 +8,6 @@ vim.opt.showmatch = true vim.opt.swapfile = false vim.opt.smartindent = true ---[[ - Convenience stuff ---]] - -- Default to the "modern normal" vim.opt.expandtab = true vim.opt.shiftwidth = 4 diff --git a/Makefile.m4 b/Makefile.m4 index 0f2ae6e..f108093 100644 --- a/Makefile.m4 +++ b/Makefile.m4 @@ -28,7 +28,6 @@ endef all: system.m4 install_packages m4_dnl m4_ifelse(DT_VIM, `yes', `$(HOME_DIR)/.vimrc') m4_dnl -m4_ifelse(DT_VIM, `yes', `$(HOME_DIR)/.vim') m4_dnl m4_ifelse(DT_ROFI, `yes', `$(HOME_DIR)/.config/rofi') m4_dnl m4_ifelse(DT_DEADD, `yes', `$(HOME_DIR)/.config/deadd') m4_dnl m4_ifelse(DT_WAYBAR, `yes', `$(HOME_DIR)/.config/waybar') m4_dnl @@ -67,9 +66,6 @@ m4_ifelse(DT_VIM, `yes', `m4_dnl $(HOME_DIR)/.vimrc: Common/vimrc $(call create_dotfile_symlink,Common/vimrc,.vimrc) -$(HOME_DIR)/.vim: Common/vim - $(call create_dotfile_symlink,Common/vim,.vim) - ')m4_dnl m4_ifelse(DT_ROFI, `yes', `m4_dnl $(HOME_DIR)/.config/rofi: linux/rofi @@ -139,7 +135,7 @@ $(HOME_DIR)/.zshrc: Common/zshrc $(call create_dotfile_symlink,Common/zshrc,.zshrc) m4_ifelse(DT_ZSH, `yes', `m4_dnl -$(HOME_DIR)/.p10k.zsh: Common/vim +$(HOME_DIR)/.p10k.zsh: $(call create_dotfile_symlink,Common/p10k.zsh,.p10k.zsh) ')m4_dnl diff --git a/bin/update-theme b/bin/update-theme index 7f71beb..e996a20 100755 --- a/bin/update-theme +++ b/bin/update-theme @@ -3,7 +3,11 @@ ALACRITTYCONF="${HOME}/.config/alacritty/alacritty.toml" CURRENT_WINDOW_NAME=$(tmux display-message -p "#W" | tr '[:upper:]' '[:lower:]') -export $(tmux show-env | grep THEME) +ALACRITTY_THEME=$(tmux show-env | grep '^ALACRITTY_THEME=' | cut -d '=' -f2-) +ALACRITTY_THEME=${ALACRITTY_THEME:-light} + +# Export the ALACRITTY_THEME variable +export ALACRITTY_THEME DARK_THEME="campbell" LIGHT_THEME="papertheme" diff --git a/linux/tmux.conf.m4 b/linux/tmux.conf.m4 index 8d2ef19..11480ab 100644 --- a/linux/tmux.conf.m4 +++ b/linux/tmux.conf.m4 @@ -1,6 +1,6 @@ # -- general ------------------------------------------------------------------- set -g default-terminal "tmux-256color" -set-option -ga terminal-overrides ",xterm-256color:Tc" # don't remember +set -as terminal-overrides ",xterm-256color:Tc" # don't remember set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm' # undercurl support set -as terminal-overrides ',*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m' # underscore colours - needs tmux-3.0 @@ -11,60 +11,37 @@ set-option -g default-shell DT_SHELL set -s focus-events on # -- navigation ---------------------------------------------------------------- - -# Set window notification setw -g monitor-activity on set -g visual-activity off - -# Bells set -g visual-bell on set -g bell-action any +setw -g mode-keys vi + m4_ifelse(DT_DOTFILES_TYPE, `local', `m4_dnl unbind C-b set -g prefix C-a bind C-a send-prefix ')m4_dnl -# Set copying settings -setw -g mode-keys vi -set-option -s set-clipboard off -bind P paste-buffer -bind-key -T copy-mode-vi 'v' send -X begin-selection -bind-key -T copy-mode-vi 'r' send -X rectangle-toggle -bind-key -T copy-mode-vi 'y' send -X copy-pipe-and-cancel 'xclip -sel clip -i' -unbind -T copy-mode-vi Enter -bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel 'xclip -se c -i' - # -- macros -------------------------------------------------------------------- -# Set tmux style on remote -bind-key C-r send-keys C-b ":set status-style 'fg=black,bg=purple'" - -# Synchronize panes bind-key = set-window-option synchronize-panes - -# Reload bind-key r source-file ~/.tmux.conf -# Git author -bind-key s send-keys "DT_GIT_USER <DT_GIT_EMAIL>" - -# Quick notes, diary +m4_changequote({, })m4_dnl +m4_ifelse(DT_DOTFILES_TYPE, {local}, {m4_dnl +bind-key S send-keys "DT_GIT_USER <DT_GIT_EMAIL>" bind -n M-w display-popup -E "nvim -c VimwikiIndex -c Calendar -c 'wincmd p'" bind -n M-C-w display-popup -E "nvim -c VimwikiMakeDiaryNote -c Calendar -c 'wincmd p' -c 'call append(1, strftime(\"- **%T** - **\"))' -c 'call append(2, \"\")' -c 'execute \"normal! 2GA\"'" bind -n M-C-i display-popup -E "nvim -c 'e ~/Nextcloud/wiki/I45/Hendelser.md' -c 'call append(1, strftime(\"- **%d.%m.%Y (%T)** - **\"))' -c 'call append(2, \"\")' -c 'execute \"normal! 2GA\"'" # Theme toggling bind-key T run-shell "toggle-theme" -m4_changequote({, })m4_dnl -m4_ifelse(DT_DOTFILES_TYPE, {local}, {m4_dnl set-hook -g session-window-changed 'run-shell "update-theme"' set-hook -g window-renamed 'run-shell "update-theme"' bind-key C-p run-shell "tmux display-message -p '#W' | grep -q '^PROD' || tmux rename-window 'PROD #{window_name}'" bind-key C-s run-shell "tmux display-message -p '#W' | grep -q '^STAGING' || tmux rename-window 'STAGING #{window_name}'" })m4_dnl -m4_changequote(`, ')m4_dnl -m4_changequote({, })m4_dnl m4_ifelse(DT_TMUX_NAVIGATOR, `yes', { # -- vim-tmux-navigator -------------------------------------------------------- # Smart pane switching with awareness of Vim splits. @@ -92,10 +69,6 @@ m4_changequote(`, ')m4_dnl # -- Theme -------------------------------------------------------------------- m4_ifelse(DT_DOTFILES_TYPE, `local', `m4_dnl -set -g status-justify left -set -g status-interval 2 -set -g status-position bottom - set -g status-left "#{?client_prefix,C-a ,}[#S] " set -g status-right "%d/%m/%y %H:%M:%S [#(cat /sys/class/power_supply/BAT0/capacity)%]" set -g status-style "fg=colour255,bold,bg=black" |