URI:
       tmux: tweak bar 💫 - dotfiles - 🍚 personal arsenal of "rice"
  HTML git clone https://git.drkhsh.at/dotfiles.git
   DIR Log
   DIR Files
   DIR Refs
   DIR Submodules
   DIR README
   DIR LICENSE
       ---
   DIR commit 2b373b67b8d2c3fa3fd6e4fbbaae4b91f67468a2
   DIR parent d3ecf3088c2d4ceb66c2b0745ffe5dba69e376ff
  HTML Author: drkhsh <me@drkhsh.at>
       Date:   Sun, 15 Sep 2024 23:45:26 +0200
       
       tmux: tweak bar 💫
       
       Diffstat:
         M tmux/.config/tmux/tmux.conf         |       3 ++-
         A tmux/.local/bin/tmux-status         |      83 +++++++++++++++++++++++++++++++
       
       2 files changed, 85 insertions(+), 1 deletion(-)
       ---
   DIR diff --git a/tmux/.config/tmux/tmux.conf b/tmux/.config/tmux/tmux.conf
       @@ -41,7 +41,8 @@ set-option -g bell-action none
        set -g status on
        set -g status-left '#{tmux_mode_indicator} '
        set -g status-style "bg=colour0,fg=colour1"
       -set -g status-right "#[bg=colour241,fg=colour0,noreverse]▓▒░ #S #[bg=colour246,fg=colour241,noreverse]▓▒░#[bg=colour246,fg=colour0,noreverse] #H#[] "
       +set -g status-right '#(~/.local/bin/tmux-status)'
       +set -g status-right-length 128
        setw -g window-status-format "#[bg=colour239,fg=colour0,noreverse] #F#I:#W ░▒▓#[bg=colour0,fg=colour1] "
        setw -g window-status-current-format "#[bg=colour4,fg=colour237,noreverse] #F#I:#W #[bg=colour4,fg=colour0,noreverse]░▒▓#[bg=colour0,fg=colour1] "
        
   DIR diff --git a/tmux/.local/bin/tmux-status b/tmux/.local/bin/tmux-status
       @@ -0,0 +1,83 @@
       +#!/bin/bash
       +#    ██
       +#   ░██
       +#  ██████ ██████████  ██   ██ ██   ██
       +# ░░░██░ ░░██░░██░░██░██  ░██░░██ ██
       +#   ░██   ░██ ░██ ░██░██  ░██ ░░███
       +#   ░██   ░██ ░██ ░██░██  ░██  ██░██
       +#   ░░██  ███ ░██ ░██░░██████ ██ ░░██
       +#    ░░  ░░░  ░░  ░░  ░░░░░░ ░░   ░░
       +#
       +# based on xero's tmux-status script, thx <3
       +# modified by drkhsh
       +
       +#----------------------------------------------------------// vars
       +[[ -z "$UI_THEME" ]] && UI_THEME="EVANGELION"
       +FULL=━
       +EMPTY=┄
       +if [[ "$UI_THEME" == "EVANGELION" ]]; then
       +        C0=#201430
       +        C1=#3b3847
       +        C2=#a4d2ec
       +        C3=#db6088
       +        C4=#875FAF
       +        C5=#ccd2d9
       +        C6=#e1d6f8
       +        C7=#ab92fc
       +else
       +        C0="#000000"
       +        C1="#222222"
       +        C2="#8FBCBB"
       +        C3="#B3291C"
       +        C4="#685742"
       +        C5="#d7c483"
       +        C6="#C9A554"
       +        C7="#78824b"
       +fi
       +
       +#--------------------------------------------------// progress bar
       +draw() {
       +        perc=$1
       +        size=$2
       +        inc=$((perc * size / 125))
       +        out=
       +        for v in $(seq 0 $((size - 1))); do
       +                [[ "$v" -le "$inc" ]] &&
       +                        out="${out}#[fg=$C1]${FULL}" ||
       +                        out="${out}#[fg=$C6]${EMPTY}"
       +        done
       +        printf "%s" "$out"
       +}
       +
       +#-------------------------------------------------------// compute
       +FRONT="#[bg=$C7]#[fg=0]▓▒░"
       +RAM=$(free | awk '/Mem:/ {print int($3/$2 * 100.0)}')
       +CPU=$(printf "%.0f" "$(grep 'cpu ' /proc/stat |
       +        awk '{usage=($2+$4)*100/($2+$4+$5)} END {print usage}')")
       +SYS=$({
       +        printf "#[fg=%s] %s %s " "$C0" "${RAM}%" "$(draw "$RAM" 4)"
       +        printf "#[fg=%s] %s %s" "$C0" "${CPU}%" "$(draw "$CPU" 4)"
       +})
       +D1=$(df -h | grep '/$' | tr -s ' ' | cut -d ' ' -f5 | sed 's/%//')
       +D2=$(df -h | grep 'x0' | tr -s ' ' | cut -d ' ' -f5 | sed 's/%//')
       +DISK=$({
       +        [[ -n "$D1" ]] &&
       +                printf "#[fg=%s]󰽄 %s %s" "$C0" "${D1}%" "$(draw "$D1" 4)"
       +        [[ -n "$D2" ]] &&
       +                printf " #[fg=%s]󰖟 %s %s" "$C0" "${D2}%" "$(draw "$D2" 4)"
       +})
       +SESSION=$({
       +        printf "#[bg=%s]#[fg=%s]░▒#[bg=%s]#[fg=%s]▓\
       +                #[fg=%s]#[bg=%s] %s" \
       +                "$C7" "$C4" "$C7" "$C4" "$C5" "$C4" \
       +                "#S"
       +})
       +HOST=$({
       +        printf "#[bg=%s]#[fg=%s]░▒#[bg=%s]#[fg=%s]▓\
       +                #[fg=%s]#[bg=%s] %s #[bg=0]#[fg=%s]▓▒░" \
       +                "$C4" "$C3" "$C1" "$C3" "$C0" "$C3" \
       +                "#H" "$C3"
       +})
       +
       +#--------------------------------------------------------// render
       +printf "%s %s %s %s %s" "$FRONT" "$SYS" "$DISK" "$SESSION" "$HOST"