shell: add bash and tmux configs
6f3f05a6ad1b0c83447c64dda756b2927806075e
Oliver Jan Krylow <oliver@bugabinga.net> ·
unsigned
- Parent 1: c2168034d121
bugabingas dorkfiles
6f3f05a6ad1b0c83447c64dda756b2927806075e
Oliver Jan Krylow <oliver@bugabinga.net> ·
unsigned
+136 / −0 text lines
new file mode 100644+11 / −0 text lines
new file mode 100644+41 / −0 text lines
# Bash interactive config from dotfiles.case "$-" in *i*) ;; *) return ;;esac# Linux virtual console colors. No sudo, no effect in terminal emulators._nugu_console_theme() { [ "${TERM:-}" = linux ] || return 0 local mode="${1:-light}" local theme="$HOME/.config/bash/linux-console/nugu-$mode.sh" if [ ! -r "$theme" ]; then printf 'missing theme: %s\n' "$theme" >&2 return 1 fi . "$theme" clear}tt() { case "${1:-toggle}" in dark|light) _nugu_console_theme "$1" ;; toggle) case "${NUGU_CONSOLE_THEME:-light}" in light) _nugu_console_theme dark ;; dark) _nugu_console_theme light ;; *) _nugu_console_theme light ;; esac ;; *) printf 'usage: tt [dark|light]\n' >&2 return 2 ;; esac}_nugu_console_theme lightnew file mode 100644+84 / −0 text lines
# Minimal tmux config.# One thing to remember: Prefix h = help.# Prefix is default: Ctrl-b.##### fix Pi warning / modern keyboard inputset -g extended-keys onset -g extended-keys-format csi-u##### sane defaultsset -g mouse onset -g history-limit 50000set -g renumber-windows onset -g base-index 1setw -g pane-base-index 1setw -g mode-keys viset -g status-keys viset -g escape-time 10set -g focus-events onset -g set-clipboard on##### colorset -g default-terminal "tmux-256color"set -as terminal-features ',*:RGB'##### new panes/windows open where you arebind c new-window -c "#{pane_current_path}"unbind %unbind '"'bind | split-window -h -c "#{pane_current_path}"bind - split-window -v -c "#{pane_current_path}"##### quick reloadbind r source-file ~/.config/tmux/tmux.conf \; display-message "tmux config reloaded"##### help: the only shortcut to memorizebind h display-popup -w 82% -h 82% -k 'sh -c "cat <<EOFTMUX QUICK HELP press any key to closePrefix: Ctrl-bHelp: Prefix hSessions tmux new -s work start named session tmux ls list sessions tmux attach -t work attach session Prefix d detachWindows Prefix c new window Prefix 1..9 jump window Prefix , rename window Prefix & kill windowPanes Prefix | split right Prefix - split down Prefix arrows move between panes Prefix z zoom pane Prefix x kill paneScroll/copy Prefix [ copy/scroll mode q leave copy/scroll mode / search in copy modeMore help Prefix ? built-in key list Prefix : tmux command prompt man tmux full manualEOFsleep 100000"'##### tiny status barset -g status-position topset -g status-interval 5set -g status-style "bg=#11111b,fg=#cdd6f4"set -g status-left-length 40set -g status-left " #[fg=#a6e3a1,bold]#S #[fg=#6c7086]│ #[fg=#89b4fa]C-b h help "set -g status-right "#[fg=#6c7086]#(whoami)@#h #[fg=#f5c2e7]%H:%M "setw -g window-status-format " #[fg=#6c7086]#I:#W "setw -g window-status-current-format " #[fg=#f9e2af,bold]#I:#W "setw -g pane-border-style "fg=#313244"setw -g pane-active-border-style "fg=#89b4fa"