scripts

scripts to make my pc work
Index Commits Files Refs
tmux_status.sh (302B)
   1 #!/bin/sh
   2 
   3 data=$(gitmux -cfg ~/.config/tmux/gitmux.conf $@)
   4 
   5 if [ -z "$data" ]; then
   6     printf "%-56s" "";
   7     exit;
   8 fi
   9 
  10 str=$(echo -n $data | sed -e 's/#\[[^][]*\]//g')
  11 
  12 count=$(echo -n $str | wc -m)
  13 
  14 # 70 are fixed
  15 # padding=$((70 + desired_padding - count))
  16 
  17 padding=170
  18 
  19 printf "%-${padding}s" "$data"