Advertisement
Mako-chan

Umbra

Aug 5th, 2015
673
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.21 KB | None | 0 0
  1. #! /bin/env bash
  2. # Author: <mvdw at airmail dot cc>
  3.  
  4. # Only works when you use rxvt-unicode and have applicable .Xresources file.
  5. SCHEME() { cat $HOME/.Xresources|grep ^URxvt.color[0-9]|grep r$1:|awk '{print$(NF)}'; }
  6.  
  7. F=3 B=4
  8. for J in F B; do
  9.     for I in {0..7}; do
  10.         printf -v $J$I %b "\033[${!J}${I}m"
  11.     done
  12. done
  13.  
  14. D=$'\033[1m'
  15. T=$'\033[0m'
  16. V=$'\033[7m'
  17.  
  18. cat << EOF
  19.  
  20.     $F0 ███ 0       $D ███ 8$T
  21.     $F0 ███ $(SCHEME 0) $D ███ $(SCHEME 8)$T
  22.     $F1 ███ 1       $D ███ 9$T
  23.     $F1 ███ $(SCHEME 1) $D ███ $(SCHEME 9)$T
  24.     $F2 ███ 2       $D ███ 10$T
  25.     $F2 ███ $(SCHEME 2) $D ███ $(SCHEME 10)$T
  26.     $F3 ███ 3       $D ███ 11$T
  27.     $F3 ███ $(SCHEME 3) $D ███ $(SCHEME 11)$T
  28.     $F4 ███ 4       $D ███ 12$T
  29.     $F4 ███ $(SCHEME 4) $D ███ $(SCHEME 12)$T
  30.     $F5 ███ 5       $D ███ 13$T
  31.     $F5 ███ $(SCHEME 5) $D ███ $(SCHEME 13)$T
  32.     $F6 ███ 6       $D ███ 14$T
  33.     $F6 ███ $(SCHEME 6) $D ███ $(SCHEME 14)$T
  34.     $F7 ███ 7       $D ███ 15$T
  35.     $F7 ███ $(SCHEME 7) $D ███ $(SCHEME 15)$T
  36.  
  37. EOF
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement