My dotfiles for my Linux rice managed with stow and make
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.

config.py 4.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. ## Autogenerated config.py
  2. ## Documentation:
  3. ## qute://help/configuring.html
  4. ## qute://help/settings.html
  5. import subprocess
  6. def read_xresources(prefix):
  7. props = {}
  8. x = subprocess.run(['xrdb', '-query'], stdout=subprocess.PIPE)
  9. lines = x.stdout.decode().split('\n')
  10. for line in filter(lambda l : l.startswith(prefix), lines):
  11. prop, _, value = line.partition(':\t')
  12. props[prop] = value
  13. return props
  14. xresources = read_xresources('*')
  15. config.load_autoconfig()
  16. c.colors.completion.category.bg = xresources['*color6']
  17. c.colors.completion.category.fg = xresources['*color0']
  18. c.colors.completion.category.border.bottom = xresources['*color0']
  19. c.colors.completion.category.border.top = xresources['*color6']
  20. c.colors.completion.even.bg = xresources['*color0']
  21. c.colors.completion.odd.bg = xresources['*color0']
  22. c.colors.completion.item.selected.bg = xresources['*color4']
  23. c.colors.completion.item.selected.fg = xresources['*color15']
  24. c.colors.completion.item.selected.border.bottom = xresources['*color4']
  25. c.colors.completion.match.fg = xresources['*color2']
  26. c.colors.completion.scrollbar.bg = xresources['*color15']
  27. c.colors.completion.scrollbar.fg = xresources['*color0']
  28. c.colors.downloads.bar.bg = xresources['*color0']
  29. c.colors.downloads.error.bg = xresources['*color1']
  30. c.colors.downloads.error.fg = xresources['*color15']
  31. c.colors.downloads.start.bg = xresources['*color5']
  32. c.colors.downloads.start.fg = xresources['*color15']
  33. c.colors.downloads.stop.bg = xresources['*color2']
  34. c.colors.downloads.stop.fg = xresources['*color15']
  35. c.colors.hints.bg = xresources['*color0']
  36. c.colors.hints.fg = xresources['*color15']
  37. c.colors.hints.match.fg = xresources['*color3']
  38. c.colors.keyhint.bg = xresources['*color0']
  39. c.colors.keyhint.fg = xresources['*color15']
  40. c.colors.keyhint.suffix.fg = xresources['*color3']
  41. c.colors.messages.error.bg = xresources['*color1']
  42. c.colors.messages.error.border = xresources['*color1']
  43. c.colors.messages.error.fg = xresources['*color15']
  44. c.colors.messages.info.bg = xresources['*color2']
  45. c.colors.messages.info.border = xresources['*color2']
  46. c.colors.messages.info.fg = xresources['*color15']
  47. c.colors.messages.warning.bg = xresources['*color3']
  48. c.colors.messages.warning.border = xresources['*color3']
  49. c.colors.messages.warning.fg = xresources['*color15']
  50. c.colors.prompts.bg = xresources['*color0']
  51. c.colors.prompts.border = xresources['*color0']
  52. c.colors.prompts.fg = xresources['*color15']
  53. c.colors.prompts.selected.bg = xresources['*color3']
  54. c.colors.statusbar.caret.bg = xresources['*color5']
  55. c.colors.statusbar.caret.fg = xresources['*color15']
  56. c.colors.statusbar.command.bg = xresources['*color6']
  57. c.colors.statusbar.command.fg = xresources['*color0']
  58. c.colors.statusbar.command.private.bg = 'black'
  59. c.colors.statusbar.insert.bg = xresources['*color2']
  60. c.colors.statusbar.insert.fg = xresources['*color15']
  61. c.colors.statusbar.normal.bg = xresources['*color0']
  62. c.colors.statusbar.normal.fg = xresources['*color15']
  63. c.colors.statusbar.private.bg = xresources['*color0']
  64. c.colors.statusbar.private.fg = xresources['*color15']
  65. c.colors.statusbar.progress.bg = xresources['*color15']
  66. c.colors.statusbar.url.error.fg = xresources['*color1']
  67. c.colors.statusbar.url.fg = xresources['*color15']
  68. c.colors.statusbar.url.hover.fg = xresources['*color4']
  69. c.colors.statusbar.url.success.http.fg = xresources['*color15']
  70. c.colors.statusbar.url.success.https.fg = xresources['*color2']
  71. c.colors.statusbar.url.warn.fg = xresources['*color3']
  72. c.colors.tabs.bar.bg = xresources['*color0']
  73. c.colors.tabs.even.bg = xresources['*color0']
  74. c.colors.tabs.even.fg = xresources['*color15']
  75. c.colors.tabs.odd.bg = xresources['*color0']
  76. c.colors.tabs.odd.fg = xresources['*color15']
  77. c.colors.tabs.selected.even.bg = xresources['*color1']
  78. c.colors.tabs.selected.even.fg = xresources['*color0']
  79. c.colors.tabs.selected.odd.bg = xresources['*color1']
  80. c.colors.tabs.selected.odd.fg = xresources['*color0']
  81. c.colors.webpage.bg = xresources['*color15']
  82. c.hints.border = '1px solid ' + xresources['*color15']