Last active
October 8, 2023 12:52
-
-
Save qexat/0de06137e79c02ac86c625a53ae2cdb1 to your computer and use it in GitHub Desktop.
my current tmux conf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| unbind C-b | |
| set-option -g prefix C-a | |
| bind-key C-a send-prefix | |
| set-option -gs default-terminal "xterm-256color" | |
| set-option -gas terminal-overrides "*:Tc" | |
| set-option -gas terminal-overrides "*:RGB" | |
| set-option -gas terminal-overrides '*:Smulx=\E[4::%p1%dm' | |
| set-option -gas terminal-overrides '*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m' | |
| set -g window-style 'fg=grey,bg=black' | |
| set -g window-active-style 'fg=terminal,bg=terminal' | |
| set -s escape-time 10 | |
| set-option -g repeat-time 200 | |
| set -g history-limit 5000 | |
| bind C-c run "tmux save-buffer - | xclip -i -sel clip" | |
| bind C-v run "tmux set-buffer $(xclip -o -sel clip); tmux paste-buffer" | |
| set -s exit-empty off | |
| # reload | |
| bind r source-file ~/.tmux.conf | |
| set -g status-style 'bg=color9,fg=color0' | |
| set -g window-status-current-style 'bg=terminal,fg=color9' | |
| set -g status-left '' | |
| set -g status-right "#[fg=color174]|#[fg=default] #(batterycon) %H:%M " |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # works on my machine, might not work on yours :') | |
| battery=$(cat /sys/class/power_supply/BAT1/capacity) | |
| if [ "$battery" -le 5 ]; then | |
| printf '#[fg=#ff0000]\uf244#[fg=default]' | |
| elif [ "$battery" -le 25 ]; then | |
| printf '\uf243' | |
| elif [ "$battery" -le 50 ]; then | |
| printf '\uf242' | |
| elif [ "$battery" -le 75 ]; then | |
| printf '\uf241' | |
| elif [ "$battery" -le 100 ]; then | |
| printf '\uf240' | |
| fi | |
| # leading space for the icon so it does not overlap with what comes next | |
| printf ' ' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment