1 #!/bin/bash
   2 
   3 grep '^bind\|^# \w' ~/.config/i3/config |
   4 sed '$d' | sed '
   5     1d; $d
   6     s/"//g
   7     s/$\?exec//
   8     s/--release//
   9     s/Mod1+/Alt+/
  10     s/Mod4+/Win+/
  11     s/Super_L/Win/
  12     s/+grave/+`/
  13     s/+space/+Space/
  14     s/Sys_Req/Print/
  15     s/+Shift+\(\w\) /+\u\1 /
  16     s/Control+/^+/
  17     s/Shift+/<+/
  18 ' | while read _ k v; do
  19     [[ $v == \{\{\{ ]] &&
  20     printf '\n\e[1;33m%21s:\e[0m\n' ${k^^} ||
  21     printf '  \e[33m%20s\e[0m %s\n' $k "$v"
  22 done | less -r