repos/scripts

Simple scripts that I made for my personal computer to map keys, make bluetooth work, brightness keys, etc.
Commits Files Refs README LICENSE
tmux_status.sh (19 lines)
   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"