refactor
This commit is contained in:
parent
66c05f9093
commit
45d6f4b0f3
205 changed files with 9040 additions and 342 deletions
5
modules/nixos/cli-apps/tmux/config/continuum.tmux
Normal file
5
modules/nixos/cli-apps/tmux/config/continuum.tmux
Normal file
|
@ -0,0 +1,5 @@
|
|||
# Enable saving sessions.
|
||||
set -g @continuum-restore 'on'
|
||||
|
||||
# Save every 30 minutes.
|
||||
set -g @continuum-save-interval '30'
|
15
modules/nixos/cli-apps/tmux/config/extrakto.tmux
Normal file
15
modules/nixos/cli-apps/tmux/config/extrakto.tmux
Normal file
|
@ -0,0 +1,15 @@
|
|||
# Create a vertical split to show search & results to keep
|
||||
# the content visible.
|
||||
set -g @extrakto_split_direction "v"
|
||||
|
||||
# Override the way that Extrakto copies text. By default
|
||||
# it was trying to use xclip and would not properly pick
|
||||
# up on $XDG_SESSION_TYPE being wayland. Instead, use
|
||||
# Tmux's built-in clipboard functionality.
|
||||
set -g @extrakto_clip_tool_run "tmux_osc52"
|
||||
|
||||
# FIXME: The current version of Extrakto in
|
||||
# NixPkgs is out of date and does not support wayland.
|
||||
# This overrides the clipping tool to ensure that it works
|
||||
# under wayland.
|
||||
set -g @extrakto_clip_tool "wl-copy"
|
2
modules/nixos/cli-apps/tmux/config/fzf.tmux
Normal file
2
modules/nixos/cli-apps/tmux/config/fzf.tmux
Normal file
|
@ -0,0 +1,2 @@
|
|||
# Change default keybinding.
|
||||
TMUX_FZF_LAUNCH_KEY="C-f"
|
38
modules/nixos/cli-apps/tmux/config/general.tmux
Normal file
38
modules/nixos/cli-apps/tmux/config/general.tmux
Normal file
|
@ -0,0 +1,38 @@
|
|||
# Lower delay waiting for chord after escape key press.
|
||||
set -g escape-time 0
|
||||
|
||||
# Change the prefix from C-b to C-s to make it easier to type.
|
||||
set -g prefix C-s
|
||||
unbind C-b
|
||||
bind C-s send-prefix
|
||||
|
||||
# Start window numbers at 1 rather than 0.
|
||||
set -g base-index 1
|
||||
|
||||
# Use h, j, k, l for movement between panes.
|
||||
bind h select-pane -L
|
||||
bind j select-pane -D
|
||||
bind k select-pane -U
|
||||
bind l select-pane -R
|
||||
|
||||
# Fix colors being wrong in programs like Neovim.
|
||||
set-option -ga terminal-overrides ",xterm-256color:Tc"
|
||||
|
||||
# Expand the left status to accomodate longer session names.
|
||||
set-option -g status-left-length 20
|
||||
|
||||
# One of the plugins binds C-l, make sure we have accces to it.
|
||||
unbind C-l
|
||||
bind -n C-l send-keys C-l
|
||||
|
||||
# Don't require a prompt to detach from the current session.
|
||||
unbind -n M-E
|
||||
bind -n M-E detach-client
|
||||
|
||||
# Reload tmux configuration from ~/.config/tmux/tmux.conf instead
|
||||
# of Tilish's default of ~/.tmux.conf.
|
||||
unbind -n M-C
|
||||
bind -n M-C source-file "~/.config/tmux/tmux.conf"
|
||||
|
||||
# Use M-z to zoom and unzoom panes.
|
||||
bind -n M-z resize-pane -Z
|
21
modules/nixos/cli-apps/tmux/config/navigator.tmux
Normal file
21
modules/nixos/cli-apps/tmux/config/navigator.tmux
Normal file
|
@ -0,0 +1,21 @@
|
|||
# Smart pane switching with awareness of Vim splits.
|
||||
# See: https://github.com/christoomey/vim-tmux-navigator
|
||||
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
|
||||
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
|
||||
|
||||
bind-key -n 'M-h' if-shell "$is_vim" 'send-keys M-h' 'select-pane -L'
|
||||
bind-key -n 'M-j' if-shell "$is_vim" 'send-keys M-j' 'select-pane -D'
|
||||
bind-key -n 'M-k' if-shell "$is_vim" 'send-keys M-k' 'select-pane -U'
|
||||
bind-key -n 'M-l' if-shell "$is_vim" 'send-keys M-l' 'select-pane -R'
|
||||
tmux_version='$(tmux -V | sed -En "s/^tmux ([0-9]+(.[0-9]+)?).*/\1/p")'
|
||||
if-shell -b '[ "$(echo "$tmux_version < 3.0" | bc)" = 1 ]' \
|
||||
"bind-key -n 'M-\\' if-shell \"$is_vim\" 'send-keys M-\\' 'select-pane -l'"
|
||||
if-shell -b '[ "$(echo "$tmux_version >= 3.0" | bc)" = 1 ]' \
|
||||
"bind-key -n 'M-\\' if-shell \"$is_vim\" 'send-keys M-\\\\' 'select-pane -l'"
|
||||
|
||||
bind-key -T copy-mode-vi 'M-h' select-pane -L
|
||||
bind-key -T copy-mode-vi 'M-j' select-pane -D
|
||||
bind-key -T copy-mode-vi 'M-k' select-pane -U
|
||||
bind-key -T copy-mode-vi 'M-l' select-pane -R
|
||||
bind-key -T copy-mode-vi 'M-p' select-pane -l
|
||||
|
37
modules/nixos/cli-apps/tmux/config/nord.tmux
Normal file
37
modules/nixos/cli-apps/tmux/config/nord.tmux
Normal file
|
@ -0,0 +1,37 @@
|
|||
|
||||
# Copyright (C) 2017-present Arctic Ice Studio <development@arcticicestudio.com>
|
||||
# Copyright (C) 2017-present Sven Greb <development@svengreb.de>
|
||||
# Copyright (C) 2022-present Jake Hamilton <jake.hamilton@hey.com>
|
||||
|
||||
# Project: Nord tmux
|
||||
# Repository: https://github.com/arcticicestudio/nord-tmux
|
||||
# License: MIT
|
||||
|
||||
#+----------------+
|
||||
#+ Plugin Support +
|
||||
#+----------------+
|
||||
#+--- tmux-prefix-highlight ---+
|
||||
set -g @prefix_highlight_output_prefix "#[fg=brightcyan]#[bg=black]#[nobold]#[noitalics]#[nounderscore]#[bg=brightcyan]#[fg=black]"
|
||||
set -g @prefix_highlight_output_suffix ""
|
||||
set -g @prefix_highlight_copy_mode_attr "fg=brightcyan,bg=black,bold"
|
||||
|
||||
#+--------+
|
||||
#+ Status +
|
||||
#+--------+
|
||||
#+--- Bars ---+
|
||||
set -g status-left "#[fg=brightblack,bg=black]#[fg=white,bg=brightblack,bold] #S #[fg=brightblack,bg=black,nobold,noitalics,nounderscore]"
|
||||
set -g status-right "#{prefix_highlight}#[fg=brightblack,bg=black,nobold,noitalics,nounderscore]#[fg=white,bg=brightblack,nobold] #H #[fg=brightblack,bg=black,nobold]"
|
||||
|
||||
#+--- Windows ---+
|
||||
set -g window-status-format "#[fg=brightblack,bg=black,nobold,noitalics,nounderscore]#[fg=white,bg=brightblack] #I#[fg=white,bg=brightblack,nobold,noitalics,nounderscore]: #W #[fg=brightblack,bg=black,nobold,noitalics,nounderscore]"
|
||||
set -g window-status-current-format "#[fg=#5e81ac,bg=black]#[fg=white,bg=#5e81ac,bold,noitalics,nounderscore] #I#[fg=white,bg=#5e81ac,bold,noitalics,nounderscore]: #W #[fg=#5e81ac,bg=black,nobold,noitalics,nounderscore]"
|
||||
set -g window-status-separator " "
|
||||
|
||||
# Center the window list (yes, this value has to be written as "centre").
|
||||
set -g status-justify centre
|
||||
|
||||
#+----------------+
|
||||
#+ Windows +
|
||||
#+----------------+
|
||||
#+--- Bars ---+
|
||||
set -g pane-active-border-style "bg=default fg=blue"
|
12
modules/nixos/cli-apps/tmux/config/tilish.tmux
Normal file
12
modules/nixos/cli-apps/tmux/config/tilish.tmux
Normal file
|
@ -0,0 +1,12 @@
|
|||
# Integrate Tmux and Neovim movement.
|
||||
set -g @tilish-navigator "on"
|
||||
|
||||
# Default to splitting once vertically and then splitting horizontally
|
||||
# after that.
|
||||
select-layout "main-vertical"
|
||||
select-layout -E
|
||||
set -g @tilish-default "main-vertical"
|
||||
|
||||
|
||||
bind-key -n "M-q" kill-pane
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue