# Use a 256 color terminal. set -g default-terminal "tmux-256color" # Useful if using base16-shell. set -g allow-passthrough 1 # Add base16-tmux plugin to the list of TPM (Tmux Plugin Manager) plugins. set -g @plugin 'tinted-theming/base16-tmux' # remap prefix from 'C-b' to 'C-q'. unbind C-b set-option -g prefix C-q bind-key C-q send-prefix # Start window numbering at 1. set -g base-index 1 # Customize status line (indicates Caps lock on, Num lock off, power supply and # battery status, time and date). Date specification is documented here: # https://linux.die.net/man/3/strftime set -g status-interval 3 set -g status-right-length 57 set -g status-right "#(\ if [ -e $(find /sys/class/leds -name "*capslock"|head -1)/brightness ]\ && [ $(cat $(find /sys/class/leds -name\ "*capslock"|head -1)/brightness) != 0 ]; then\ printf 'Caps Lock on ';\ else\ printf ' ';\ fi;\ if [ -e $(find /sys/class/leds -name "*numlock"|head -1)/brightness ]\ && [ $(cat $(find /sys/class/leds -name\ "*numlock"|head -1)/brightness) = 0 ]; then\ printf 'Num Lock off ';\ else\ printf ' ';\ fi;\ if [ -e /sys/class/power_supply/ADP1/online ]; then\ if [ $(cat /sys/class/power_supply/ADP1/online) = 1 ]; then\ printf 'CHG ';\ else\ printf 'BAT ';\ fi;\ else\ printf ' ';\ fi;\ if [ -e /sys/class/power_supply/BAT1/capacity ]; then\ if [ -e /sys/class/power_supply/ADP1/online ]\ && [ $(cat /sys/class/power_supply/ADP1/online) != 1 ]\ && [ $(cat /sys/class/power_supply/BAT1/capacity) -lt 20 ]; then\ printf '% 3d%%%' \ $(cat /sys/class/power_supply/BAT1/capacity);\ else\ printf '% 3d%%%' $(cat /sys/class/power_supply/BAT1/capacity);\ fi;\ else\ printf ' ';\ fi;\ ) %H:%M %Y-%m-%d(%a)" # Enable mouse scrolling. set -g mouse on # Activate tmux-resurrect plugin (~/.tmux/plugins/resurrect is a clone of # https://github.com/tmux-plugins/tmux-resurrect). run-shell ~/.tmux/plugins/resurrect/resurrect.tmux