You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

xresources-to-context 828B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #!/usr/bin/env elvish
  2. use re
  3. c = [&]
  4. for l [(all)] {
  5. if (re:match '^(\*\.?|URxvt\*)' $l) {
  6. echo $l | eawk [_ k v]{
  7. c[(re:replace '(^\*\.?|^URxvt\*|:$)' '' $k)] = $v
  8. }
  9. }
  10. }
  11. echo color
  12. echo ' bg: '$c[background]
  13. echo ' fg: '$c[foreground]
  14. if (has-key $c cursorColor) {
  15. echo ' cursor: '$c[cursorColor]
  16. }
  17. echo
  18. echo 'color0: '$c[color0]
  19. echo 'color8: '$c[color8]
  20. echo
  21. echo 'color1: '$c[color1]
  22. echo 'color9: '$c[color9]
  23. echo
  24. echo 'color2: '$c[color2]
  25. echo 'color10: '$c[color10]
  26. echo
  27. echo 'color3: '$c[color3]
  28. echo 'color11: '$c[color11]
  29. echo
  30. echo 'color4: '$c[color4]
  31. echo 'color12: '$c[color12]
  32. echo
  33. echo 'color5: '$c[color5]
  34. echo 'color13: '$c[color13]
  35. echo
  36. echo 'color6: '$c[color6]
  37. echo 'color14: '$c[color14]
  38. echo
  39. echo 'color7: '$c[color7]
  40. echo 'color15: '$c[color15]