Skip to content

Commit

Permalink
refactor: standardize config file structure
Browse files Browse the repository at this point in the history
  • Loading branch information
WilliamHsieh committed Jan 8, 2024
1 parent 560ddea commit ff88339
Show file tree
Hide file tree
Showing 52 changed files with 20 additions and 11 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
18 changes: 14 additions & 4 deletions config/.tmux.conf → config/tmux/tmux.conf
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@
set -sa terminal-overrides ',*-256color:Ms=\E]52;%p1%s;%p2%s\007' # clipboard
set -ga terminal-overrides ',*:Ss=\E[%p1%d q:Se=\E[2 q' # cursor

# enlarge history limit
set -g history-limit 100000
# enlarge history limit TODO: is this slowing down tmux?
set -g history-limit 20000

# update env whenever a session is created or attached
set -g update-environment "SSH_TTY DISPLAY"
Expand All @@ -70,6 +70,8 @@

# passthrough terminl escape sequence
set -g allow-passthrough on

set -g detach-on-destroy off
# }}}


Expand Down Expand Up @@ -156,6 +158,8 @@
bind s choose-tree -s -O name
bind h display-popup -E -w 85% -h 85% "TERM=xterm htop -d 5"
bind -n C-F4 run "bash ~/dotfiles/t"
# }}}
Expand All @@ -178,7 +182,7 @@
# statusline
set -g status-style 'bg=#24273a,fg=#24273a'
set -g status-left '#{prefix_highlight}#[fg=default,bg=#c6a0f6] #{b:session_path} #[reverse]#[fg=#8087a2,bg=default,none]  %m/%d'
set -g status-right '#[fg=#8087a2] %H:%M:%S #[fg=#ee99a0]#[reverse]  #S #[bg=#f0c6c6]#[fg=default,none] #[bold] #H '
set -g status-right '#[fg=#8087a2] %H:%M:%S #[fg=#ee99a0]#[reverse]  #S #[bg=#f0c6c6]#[fg=default,none] #[bold]󰒋 #H '
set -g status-right-length 90
set -g status-left-length 90
Expand All @@ -200,14 +204,15 @@
# Plugins
# {{{
# tmux-logging{{{
# TODO: move .tmux into ~/.local/share/tmux
set -g @plugin 'tmux-plugins/tmux-logging'
set -g @save-complete-history-path "$HOME/.tmux"
set -g @save-complete-history-key 'P'
# }}}
# tmux-prefix-highlight{{{
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
set -g @prefix_highlight_output_prefix ' '
set -g @prefix_highlight_output_prefix ' '
set -g @prefix_highlight_output_suffix ' #[fg=#c6a0f6]#[reverse] '
set -g @prefix_highlight_prefix_prompt '#[bold]Prefix'
Expand Down Expand Up @@ -239,6 +244,11 @@ set -g @extrakto_copy_key "ctrl-y"
set -g @extrakto_insert_key "enter"
set -g @extrakto_clip_tool "bash ~/dotfiles/config/zsh/autoload/yank"
# }}}
# tmux fingers
set -g @fingers-key C-f
run-shell ~/.tmux/plugins/tmux-fingers/tmux-fingers.tmux
# }}}
Expand Down
File renamed without changes.
13 changes: 6 additions & 7 deletions home/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -66,20 +66,19 @@ in
xdg.enable = true;

xdg.configFile = {
"nvim".source = link ".config/nvim";
"alacritty".source = link ".config/alacritty";
"starship.toml".source = link ".config/starship.toml";
"nvim".source = link "nvim";
"alacritty".source = link "alacritty";
"starship".source = link "starship";
"home-manager".source = link "..";
"zsh/.p10k.zsh".source = link "zsh/.p10k.zsh";
"clangd/config.yaml".text = ''
${lib.removeSuffix "\n" (builtins.readFile ../config/.config/clangd/config.yaml)}
${lib.removeSuffix "\n" (builtins.readFile ../config/clangd/config.yaml)}
Compiler: ${pkgs.gcc}/bin/g++
'';
};

home.file = {
".vimrc".source = link ".vimrc";
".tmux.conf".source = link ".tmux.conf";
".vimrc".source = link "vim/.vimrc";
};

nix = {
Expand Down Expand Up @@ -146,7 +145,7 @@ in
plugins = with pkgs.tmuxPlugins; [
{
plugin = prefix-highlight;
extraConfig = "source-file ~/.tmux.conf";
extraConfig = "source-file ${dotfilesDir}/config/tmux/tmux.conf";
}
extrakto
tmux-fzf
Expand Down

0 comments on commit ff88339

Please sign in to comment.