dotfiles
bugabingas dorkfiles
owned by bugabinga
shell: add bash and tmux configs
d8467acacf9c086cfbb3d766b203ccce3dad6104
Oliver Jan Krylow <oliver@bugabinga.net> ·
unsigned
Browse filesCompare with HEAD
Changed files (3)
new file mode 100644 1 +# Bash login config from dotfiles.
3 +# Preserve local POSIX profile if present.
4 +if [ -r "$HOME/.profile" ]; then
8 +# Shared interactive bash config.
9 +if [ -r "$HOME/.bashrc" ]; then
new file mode 100644 1 +# Bash interactive config from dotfiles.
8 +# Linux virtual console colors. No sudo, no effect in terminal emulators.
9 +_nugu_console_theme() {
10 + [ "${TERM:-}" = linux ] || return 0
12 + local mode="${1:-light}"
13 + local theme="$HOME/.config/bash/linux-console/nugu-$mode.sh"
15 + if [ ! -r "$theme" ]; then
16 + printf 'missing theme: %s\n' "$theme" >&2
25 + case "${1:-toggle}" in
26 + dark|light) _nugu_console_theme "$1" ;;
28 + case "${NUGU_CONSOLE_THEME:-light}" in
29 + light) _nugu_console_theme dark ;;
30 + dark) _nugu_console_theme light ;;
31 + *) _nugu_console_theme light ;;
35 + printf 'usage: tt [dark|light]\n' >&2
41 +_nugu_console_theme light
new file mode 100644 6 +set -g extended-keys on
7 +set -g extended-keys-format csi-u
11 +set -g history-limit 50000
12 +set -g renumber-windows on
14 +setw -g pane-base-index 1
16 +set -g status-keys vi
17 +set -g escape-time 10
18 +set -g focus-events on
19 +set -g set-clipboard on
22 +set -g default-terminal
"tmux-256color" 23 +set -as terminal-features
',*:RGB' 25 +##### new panes/windows open where you are
26 +bind
c new-window -c
"#{pane_current_path}" 29 +bind | split-window -h -c
"#{pane_current_path}" 30 +bind - split-window -v -c
"#{pane_current_path}" 33 +bind r source-file
~/.config/tmux/tmux.conf
\; display-message "tmux config reloaded
" 35 +##### help: the only shortcut to memorize 36 +bind h display-popup -w 82% -h 82% -k 'sh -c "cat <<EOF
37 +TMUX QUICK HELP press any key to close
43 + tmux new -s work start named session
44 + tmux ls list sessions
45 + tmux attach -t work attach session
50 + Prefix
1..9 jump window
51 + Prefix , rename window
52 + Prefix & kill window
55 + Prefix | split right
57 + Prefix arrows move between panes
62 + Prefix [ copy/scroll mode
63 + q leave copy/scroll mode
64 + / search in copy mode
67 + Prefix ? built-in key list
68 + Prefix
: tmux command prompt
69 + man tmux full manual
74 +##### tiny status bar 75 +set -g status-position top 76 +set -g status-interval 5 77 +set -g status-style "bg=#11111b,fg=#cdd6f4
" 78 +set -g status-left-length 40 79 +set -g status-left " #[fg=#a6e3a1,bold]#S #[fg=#6c7086]│ #[fg=#89b4fa]C-b h help
" 80 +set -g status-right "#[fg=#6c7086]#(whoami)@#h #[fg=#f5c2e7]%H:%M
" 81 +setw -g window-status-format " #[fg=#6c7086]#I:#W
" 82 +setw -g window-status-current-format " #[fg=#f9e2af,bold]#I:#W
" 83 +setw -g pane-border-style "fg=#313244
" 84 +setw -g pane-active-border-style "fg=#89b4fa
"