Skip to content

Instantly share code, notes, and snippets.



Last active Feb 19, 2021
What would you like to do?
My tAF setup
# Use `tmux` to launch or `tmux attach` if already running
# First install and then
# TRIGGER + I for the plugins. Below works for tmux 2.3.
# Change TRIGGER
unbind C-b
set -g prefix F11
bind F11 send-prefix
# Reload the file with TRIGGER+r
bind r source-file ~/.tmux.conf \; display "tmux config reloaded :)"
# Redefine pane splitting; retain current directory of existing pane
bind \\ split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
# Add shortcuts for new and kill sessions
bind X confirm-before kill-session
# No delays
set -s escape-time 1
# Enable mouse selections
set-option -g mouse on
# bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "pbcopy"
# Set base index for windows and panes to 1 instead of 0
set -g base-index 1
setw -g pane-base-index 1
# Set the default terminal mode to 256color mode
set -g default-terminal "screen-256color"
# Theme
set-option -g status-position top
set -g status-bg colour103
set -g status-fg colour215
set -g status-right-length 120
set -g status-left-length 50
set -g window-status-style fg=colour215
# setw -g window-style fg=colour240
# setw -g window-active-style fg=white
# set -g pane-border-style fg=colour240
set -g pane-active-border-style fg=colour215
# Center the window list in the status line
set -g status-justify centre
# left status: session | battery | date and time
set -g status-left " #S"
# right status: Kubernetes context, see
# and AWS context, see
set -g status-right "#(bash ~/.tmux/aws-tmux/aws.tmux)"
# Resurrect, see
# Restore sessions TRIGGER + Ctrl-s (safe) / Ctrl-r (restore)
set -g @plugin 'tmux-plugins/tmux-resurrect'
# tmux-continuum, see
# saves/restores automatically (15min interval)
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @continuum-restore 'on'
# battery, see
set -g @plugin 'tmux-plugins/tmux-battery'
# The tmux plugin manager, see
run '~/.tmux/plugins/tpm/tpm'
set -g default-shell /bin/sh
set -g default-command $SHELL
# Configuration for Alacritty, the GPU enhanced terminal emulator.
# Window dimensions (changes require restart)
# Specified in number of columns/lines, not pixels.
# If both are `0`, this setting is ignored.
columns: 80
lines: 24
# Window position (changes require restart)
# Specified in number of pixels.
# If the position is not set, the window manager will handle the placement.
x: 0
y: 0
# Window padding (changes require restart)
# Blank space added around the window in pixels. This padding is scaled
# by DPI and the specified value is always added at both opposing sides.
x: 0
y: 24
# Spread additional padding evenly around the terminal content.
dynamic_padding: false
# Window decorations
# Values for `decorations`:
# - full: Borders and title bar
# - none: Neither borders nor title bar
# Values for `decorations` (macOS only):
# - transparent: Title bar, transparent background and title bar buttons
# - buttonless: Title bar, transparent background, but no title bar buttons
# decorations: buttonless
decorations: none
# Startup Mode (changes require restart)
# Values for `startup_mode`:
# - Windowed
# - Maximized
# - Fullscreen
# Values for `startup_mode` (macOS only):
# - SimpleFullscreen
startup_mode: Maximized
# startup_mode: Windowed
# Window title
#title: Alacritty
# Maximum number of lines in the scrollback buffer.
# Specifying '0' will disable scrolling.
history: 10000
# Scrolling distance multiplier.
multiplier: 10
# Font configuration
# Normal (roman) font face
# Font family
family: "FiraCode Nerd Font"
# The `style` can be specified to pick a specific face.
style: Regular
family: "FiraCode Nerd Font"
style: Medium
# Point size
size: 17.0
x: 0
y: 2
draw_bold_text_with_bright_colors: false
# Base16 Atelier Dune - alacritty color config
background: '0x20201d'
foreground: '0xa6a28c'
text: '0x20201d'
cursor: '0xa6a28c'
black: '0x20201d'
red: '0xd73737'
green: '0x60ac39'
yellow: '0xae9513'
blue: '0x6684e1'
magenta: '0xb854d4'
cyan: '0x1fad83'
white: '0xa6a28c'
black: '0x7d7a68'
red: '0xb65611'
green: '0x292824'
yellow: '0x6e6b5e'
blue: '0x999580'
magenta: '0xe8e4cf'
cyan: '0xd43552'
white: '0xfefbec'
# Bell
# Visual Bell Animation
animation: EaseOutExpo
# Background opacity
background_opacity: 0.80
#semantic_escape_chars: ",│`|:\"' ()[]{}<>\t"
# When set to `true`, selected text will be copied to the primary clipboard.
save_to_clipboard: true
# Cursor style
# Values for `style`:
# - ▇ Block
# - _ Underline
# - | Beam
style: Underline
# Vi mode cursor style
# If the vi mode cursor style is `None` or not specified, it will fall back to
# the style of the active value of the normal cursor.
# See `` for available options.
vi_mode_style: None
# If this is `true`, the cursor will be rendered as a hollow box when the
# window is not focused.
unfocused_hollow: true
# Thickness of the cursor relative to the cell width as floating point number
# from `0.0` to `0.70`.
thickness: 0.15
# Live config reload (changes require restart)
live_config_reload: true
# Shell
# You can set `shell.program` to the path of your favorite shell, e.g. `/bin/fish`.
# Entries in `shell.args` are passed unmodified as arguments to the shell.
# Default:
# - (macOS) /bin/bash --login
# - (Linux/BSD) user login shell
# - (Windows) powershell
program: /usr/local/bin/fish
- -l
- -i
- -c
- "tmux new-session -A -s zzz"
# Startup directory
# Directory the shell is started in. If this is unset, or `None`, the working
# directory of the parent process will be used.
working_directory: None
# Send ESC (\x1b) before characters when alt is pressed.
#alt_send_esc: true
# If this is `true`, the cursor is temporarily hidden when typing.
hide_when_typing: true
program: "/Applications/"
# args:
# - --new-window
# URL modifiers
# modifiers: Command
# Key bindings
# A full list with available key codes can be found here:
- { key: L, mods: Control|Shift, action: ClearHistory }
- { key: Key0, mods: Command, action: ResetFontSize }
- { key: Equals, mods: Command, action: IncreaseFontSize }
- { key: Add, mods: Command, action: IncreaseFontSize }
- { key: Minus, mods: Command, action: DecreaseFontSize }
- { key: V, mods: Command, action: Paste }
- { key: C, mods: Command, action: Copy }
- { key: Q, mods: Command, action: Quit }
- { key: W, mods: Command, action: Quit }
- { key: N, mods: Command, action: SpawnNewInstance }
- { key: Slash, mods: Command, chars: "++" }
- { key: Backslash, mods: Command, chars: "+=" }
- { key: Key3, mods: Alt, chars: "\x23" }
# set environment variables
set -x FZF_DEFAULT_OPTS "-m --bind='ctrl-o:execute(nvim {})+abort'"
set -x FZF_DEFAULT_COMMAND 'rg --files'
set -g FZF_CTRL_T_COMMAND "command find -L \$dir -type f 2> /dev/null | sed '1d; s#^\./##'"
set -x EDITOR nvim
set -x KUBE_EDITOR nvim
set -x GOPATH /Users/hausenbl/go
function fish_prompt
set -l retc red
test $status = 0; and set retc blue
set -q __fish_git_prompt_showupstream
or set -g __fish_git_prompt_showupstream auto
function _nim_prompt_wrapper
set retc $argv[1]
set field_name $argv[2]
set field_value $argv[3]
set_color normal
set_color $retc
echo -n ''
set_color -o blue
echo -n '['
set_color normal
test -n $field_name
and echo -n $field_name:
set_color $retc
echo -n $field_value
set_color -o blue
echo -n ']'
set_color $retc
echo -n '┬─'
set_color -o blue
echo -n [
set_color normal
set_color c07933
echo -n (prompt_pwd)
set_color -o blue
echo -n ']'
# Virtual Environment
and _nim_prompt_wrapper $retc V (basename "$VIRTUAL_ENV")
# git
set prompt_git (fish_git_prompt | string trim -c ' ()')
test -n "$prompt_git"
and _nim_prompt_wrapper $retc G $prompt_git
# New line
# Background jobs
set_color normal
for job in (jobs)
set_color $retc
echo -n ''
set_color brown
echo $job
set_color blue
echo -n '╰─> '
set_color -o blue
echo -n '$ '
set_color normal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment