config.lua 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. local string = require "string"
  2. -- Whether the mouse is usable or not.
  3. mouse = true
  4. -- The maximum number of messages to fetch and display on the messages panel.
  5. -- Its value must not be lesser than 1 and greater than 100.
  6. messagesLimit = 50
  7. -- Whether to display the timestamp of the message beside the displayed message or not.
  8. timestamps = false
  9. -- The timezone of the timestamps.
  10. -- Learn more: https://pkg.go.dev/time#LoadLocation
  11. timezone = "Local"
  12. -- A textual representation of the time value formatted according to the layout defined by its value.
  13. -- Learn more: https://pkg.go.dev/time#Layout
  14. timeFormat = "3:04PM"
  15. browser = "Chrome"
  16. browserVersion = "104.0.5112.102"
  17. oss = "Linux"
  18. -- Identify properties are connection properties that are dispatched in the IDENTIFY gateway event to trigger the initial handshake with the gateway.
  19. -- Learn more: https://discord.com/developers/docs/topics/gateway#identify
  20. identifyProperties = {
  21. userAgent = string.format(
  22. "Mozilla/5.0 (X11; %s x86_64) AppleWebKit/537.36 (KHTML, like Gecko) %s/%s Safari/537.36",
  23. oss,
  24. browser,
  25. browserVersion
  26. ),
  27. browser = browser,
  28. browserVersion = browserVersion,
  29. os = oss
  30. }
  31. -- Keybindings
  32. keys = {
  33. application = {
  34. key(
  35. "Rune[g]",
  36. "Focus the guilds tree widget.",
  37. function(core, event)
  38. core.Application:SetFocus(core.GuildsTree)
  39. end
  40. ),
  41. key(
  42. "Rune[c]",
  43. "Focus the channels tree widget.",
  44. function(core, event)
  45. core.Application:SetFocus(core.ChannelsTree)
  46. end
  47. ),
  48. key(
  49. "Rune[m]",
  50. "Focus the messages panel widget.",
  51. function(core, event)
  52. core.Application:SetFocus(core.MessagesPanel)
  53. end
  54. ),
  55. key(
  56. "Rune[i]",
  57. "Focus the message input widget.",
  58. function(core, event)
  59. core.Application:SetFocus(core.MessageInput)
  60. end
  61. )
  62. },
  63. messagesPanel = {
  64. key(
  65. "Rune[a]",
  66. "Open the message actions list widget.",
  67. function(core, event)
  68. return openMessageActionsList()
  69. end
  70. ),
  71. key(
  72. "Up",
  73. "Select the previous message.",
  74. function(core, event)
  75. return selectPreviousMessage()
  76. end
  77. ),
  78. key(
  79. "Down",
  80. "Select the next message.",
  81. function(core, event)
  82. return selectNextMessage()
  83. end
  84. ),
  85. key(
  86. "Home",
  87. "Select the first message.",
  88. function(core, event)
  89. return selectFirstMessage()
  90. end
  91. ),
  92. key(
  93. "End",
  94. "Select the last message.",
  95. function(core, event)
  96. return selectLastMessage()
  97. end
  98. )
  99. },
  100. messageInput = {
  101. key(
  102. "Ctrl+E",
  103. "Open the external editor.",
  104. function()
  105. return openExternalEditor()
  106. end
  107. ),
  108. key(
  109. "Ctrl+V",
  110. "Paste the clipboard content.",
  111. function()
  112. return pasteClipboardContent()
  113. end
  114. )
  115. }
  116. }
  117. -- Theme
  118. theme = {background = "#1F2430", border = "white", title = "white"}