config.lua 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  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. -- "Ctrl+R",
  36. -- "Refresh the screen.",
  37. -- function(core, event)
  38. -- core.Application:Sync()
  39. -- return nil
  40. -- end
  41. -- )
  42. -- },
  43. messagesPanel = {
  44. key(
  45. "Rune[a]",
  46. "Open the message actions list widget.",
  47. function(core, event)
  48. return openMessageActionsList()
  49. end
  50. ),
  51. key(
  52. "Up",
  53. "Select the previous message.",
  54. function(core, event)
  55. return selectPreviousMessage()
  56. end
  57. ),
  58. key(
  59. "Down",
  60. "Select the next message.",
  61. function(core, event)
  62. return selectNextMessage()
  63. end
  64. ),
  65. key(
  66. "Home",
  67. "Select the first message.",
  68. function(core, event)
  69. return selectFirstMessage()
  70. end
  71. ),
  72. key(
  73. "End",
  74. "Select the last message.",
  75. function(core, event)
  76. return selectLastMessage()
  77. end
  78. )
  79. },
  80. messageInput = {
  81. key(
  82. "Ctrl+E",
  83. "Open the external editor.",
  84. function()
  85. return openExternalEditor()
  86. end
  87. ),
  88. key(
  89. "Ctrl+V",
  90. "Paste the clipboard content.",
  91. function()
  92. return pasteClipboardContent()
  93. end
  94. )
  95. }
  96. }
  97. -- Theme
  98. theme = {background = "default", border = "white", title = "white"}