parent
7a9bfce4ed
commit
1b64f6a966
@ -8,9 +8,12 @@ of the binaries for your system from the `bin` folder. Rename the file for
|
||||
convenience into `slack-term` and create a `slack-term.json` file with
|
||||
the following contents in your home folder.
|
||||
|
||||
```
|
||||
```javascript
|
||||
{
|
||||
"slack_token": "yourslacktokenhere"
|
||||
|
||||
// add the following to use light theme, default is dark
|
||||
"theme": "light"
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -50,7 +50,7 @@ func (c *Channels) Buffer() termui.Buffer {
|
||||
var cells []termui.Cell
|
||||
if y == c.CursorPosition {
|
||||
cells = termui.DefaultTxBuilder.Build(
|
||||
item, termui.ColorBlack, termui.ColorWhite)
|
||||
item, c.List.ItemBgColor, c.List.ItemFgColor)
|
||||
} else {
|
||||
cells = termui.DefaultTxBuilder.Build(
|
||||
item, c.List.ItemFgColor, c.List.ItemBgColor)
|
||||
@ -70,11 +70,20 @@ func (c *Channels) Buffer() termui.Buffer {
|
||||
if y == c.CursorPosition {
|
||||
buf.Set(x+1, y,
|
||||
termui.Cell{
|
||||
Ch: ' ', Fg: termui.ColorBlack, Bg: termui.ColorWhite,
|
||||
Ch: ' ',
|
||||
Fg: c.List.ItemBgColor,
|
||||
Bg: c.List.ItemFgColor,
|
||||
},
|
||||
)
|
||||
} else {
|
||||
buf.Set(x+1, y, termui.Cell{Ch: ' '})
|
||||
buf.Set(
|
||||
x+1, y,
|
||||
termui.Cell{
|
||||
Ch: ' ',
|
||||
Fg: c.List.ItemFgColor,
|
||||
Bg: c.List.ItemBgColor,
|
||||
},
|
||||
)
|
||||
}
|
||||
x++
|
||||
}
|
||||
|
@ -94,7 +94,14 @@ func (c *Chat) Buffer() termui.Buffer {
|
||||
// When we're not at the end of the pane, fill it up
|
||||
// with empty characters
|
||||
for x < c.List.InnerBounds().Max.X {
|
||||
buf.Set(x, currentY, termui.Cell{Ch: ' '})
|
||||
buf.Set(
|
||||
x, currentY,
|
||||
termui.Cell{
|
||||
Ch: ' ',
|
||||
Fg: c.List.ItemFgColor,
|
||||
Bg: c.List.ItemBgColor,
|
||||
},
|
||||
)
|
||||
x++
|
||||
}
|
||||
currentY--
|
||||
@ -106,7 +113,14 @@ func (c *Chat) Buffer() termui.Buffer {
|
||||
for currentY >= paneMinY {
|
||||
x := c.List.InnerBounds().Min.X
|
||||
for x < c.List.InnerBounds().Max.X {
|
||||
buf.Set(x, currentY, termui.Cell{Ch: ' '})
|
||||
buf.Set(
|
||||
x, currentY,
|
||||
termui.Cell{
|
||||
Ch: ' ',
|
||||
Fg: c.List.ItemFgColor,
|
||||
Bg: c.List.ItemBgColor,
|
||||
},
|
||||
)
|
||||
x++
|
||||
}
|
||||
currentY--
|
||||
|
@ -37,7 +37,11 @@ func (i *Input) Buffer() termui.Buffer {
|
||||
buf.Set(
|
||||
i.Par.InnerX()+i.CursorPosition,
|
||||
i.Par.Block.InnerY(),
|
||||
termui.Cell{Ch: char.Ch, Fg: termui.ColorBlack, Bg: termui.ColorWhite},
|
||||
termui.Cell{
|
||||
Ch: char.Ch,
|
||||
Fg: i.Par.TextBgColor,
|
||||
Bg: i.Par.TextFgColor,
|
||||
},
|
||||
)
|
||||
|
||||
return buf
|
||||
|
@ -38,7 +38,14 @@ func (m *Mode) Buffer() termui.Buffer {
|
||||
x := m.Par.InnerBounds().Min.X
|
||||
for x < m.Par.InnerBounds().Max.X {
|
||||
if i < start {
|
||||
buf.Set(x, m.Par.InnerY(), termui.Cell{Ch: ' '})
|
||||
buf.Set(
|
||||
x, m.Par.InnerY(),
|
||||
termui.Cell{
|
||||
Ch: ' ',
|
||||
Fg: m.Par.TextFgColor,
|
||||
Bg: m.Par.TextBgColor,
|
||||
},
|
||||
)
|
||||
x++
|
||||
i++
|
||||
} else {
|
||||
|
@ -33,7 +33,7 @@ func NewConfig(filepath string) (*Config, error) {
|
||||
"fg": termui.ColorBlack,
|
||||
"bg": termui.ColorDefault,
|
||||
"border.fg": termui.ColorBlack,
|
||||
"label.fg": termui.ColorGreen,
|
||||
"label.fg": termui.ColorBlue,
|
||||
"par.fg": termui.ColorYellow,
|
||||
"par.label.bg": termui.ColorWhite,
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user