1
0
mirror of https://github.com/Rudi9719/kbtui.git synced 2026-03-22 21:27:24 +00:00
Files
kbtui/userConfigs.go
Casper Weiss Bang 439f09aa1c Mo' colors
Changes:
- Stream is colored now
- Stream is formatted
- Stream has it's own formatting option
- Colors are now a style, and is a struct
- Color struct has a pretty cool functional interface
- colored mentions and PMs
- Every message uses the same function (it's dry!!)
- Colorize errors!
- Create function for visualizing errors
- colorized some of the command output!
- Color is stored in a Style
- Create a Text struct that can use to stylize strings "easily"
- Text can be used to build strings
- color highlighting on code
- added tml config support
- added different color for mention url
- Added sprintf to use formatting with PrintFeed and PrintError

Known Bugs: (added as todos whereever)
- Cannot use multiple formatting at the same time (*bold _italic_*
doesn't work
- sprintf is pretty shit
- background doesn't cover as a `block` in codeblocks
- not possible to escape sprintf thing
2019-10-23 23:45:42 +02:00

41 lines
1.5 KiB
Go

package main
// Path where Downloaded files will default to
var downloadPath = "/tmp/"
var colorless bool = false
var channelsColor = basicStyle
var channelUnreadColor = channelsColor.withForeground(green).withItalic()
var channelsHeaderColor = channelsColor.withForeground(magenta).withBold()
var mentionColor = basicStyle.withForeground(green)
var messageHeaderColor = basicStyle.withForeground(grey)
var messageIDColor = basicStyle.withForeground(yellow)
var messageTimeColor = basicStyle.withForeground(magenta)
var messageSenderDefaultColor = basicStyle.withForeground(cyan)
var messageSenderDeviceColor = messageSenderDefaultColor
var messageBodyColor = basicStyle
var messageAttachmentColor = basicStyle.withForeground(red)
var messageLinkURLColor = basicStyle.withForeground(yellow)
var messageLinkKeybaseColor = basicStyle.withForeground(yellow)
var messageReactionColor = basicStyle.withForeground(magenta)
var messageCodeColor = basicStyle.withBackground(grey).withForeground(cyan)
var feedColor = basicStyle.withForeground(grey)
var errorColor = basicStyle.withForeground(red)
// BASH-like PS1 variable equivalent
var outputFormat = "┌──[$USER@$DEVICE] [$ID] [$DATE - $TIME]\n└╼ $MSG"
var outputStreamFormat = "┌──[$TEAM] [$USER@$DEVICE] [$ID] [$DATE - $TIME]\n└╼ $MSG"
var mentionFormat = outputStreamFormat
var pmFormat = "PM from $USER@$DEVICE: $MSG"
// 02 = Day, Jan = Month, 06 = Year
var dateFormat = "02Jan06"
// 15 = hours, 04 = minutes, 05 = seconds
var timeFormat = "15:04"
// The prefix before evaluating a command
var cmdPrefix = "/"