theme.go 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. package config
  2. type (
  3. GuildsTreeTheme struct {
  4. // Graphics indicates whether to draw the line graphics to illustrate the hierarchy or not.
  5. Graphics bool `yaml:"graphics"`
  6. }
  7. MessagesTextTheme struct {
  8. AuthorColor string `yaml:"author_color"`
  9. ReplyIndicator string `yaml:"reply_indicator"`
  10. }
  11. MessageInputTheme struct{}
  12. )
  13. type Theme struct {
  14. Border bool `yaml:"border"`
  15. BorderColor string `yaml:"border_color"`
  16. BorderPadding [4]int `yaml:"border_padding,flow"`
  17. TitleColor string `yaml:"title_color"`
  18. BackgroundColor string `yaml:"background_color"`
  19. GuildsTree GuildsTreeTheme `yaml:"guilds_tree"`
  20. MessagesText MessagesTextTheme `yaml:"messages_text"`
  21. MessageInput MessageInputTheme `yaml:"message_input"`
  22. }
  23. func defTheme() Theme {
  24. return Theme{
  25. Border: true,
  26. BorderColor: "default",
  27. BorderPadding: [...]int{0, 0, 1, 1},
  28. TitleColor: "default",
  29. BackgroundColor: "default",
  30. GuildsTree: GuildsTreeTheme{
  31. Graphics: true,
  32. },
  33. MessagesText: MessagesTextTheme{
  34. AuthorColor: "aqua",
  35. ReplyIndicator: "╭",
  36. },
  37. MessageInput: MessageInputTheme{},
  38. }
  39. }