mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Merge branch 'master' into gcal-hide-declined
This commit is contained in:
commit
0735b95c93
@ -247,6 +247,10 @@ Values: A positive integer, <code>0..n</code>.</p>
|
||||
Your <a href="https://developers.google.com/calendar/quickstart/go">Google client secret</a> JSON file. <br />
|
||||
Values: A string representing a file path to the JSON secret file.</p>
|
||||
|
||||
<p><code>showDeclined</code> <br />
|
||||
Whether or not to display events you’ve declined to attend. <br />
|
||||
Values: <code>true</code>, or <code>false</code></p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="footer">
|
||||
|
@ -87,7 +87,15 @@ func (widget *Widget) dayDivider(event, prevEvent *CalEvent) string {
|
||||
prevStartTime = prevEvent.Start()
|
||||
}
|
||||
|
||||
if event.Start().Day() != prevStartTime.Day() {
|
||||
// round times to midnight for comparison
|
||||
toMidnight := func(t time.Time) time.Time {
|
||||
t = t.Local()
|
||||
return time.Date(t.Year(), t.Month(), t.Day(), 0, 0, 0, 0, t.Location())
|
||||
}
|
||||
prevStartDay := toMidnight(prevStartTime)
|
||||
eventStartDay := toMidnight(event.Start())
|
||||
|
||||
if !eventStartDay.Equal(prevStartDay) {
|
||||
|
||||
return fmt.Sprintf("[%s::b]",
|
||||
wtf.Config.UString("wtf.mods.gcal.colors.day", "forestgreen")) +
|
||||
|
@ -128,9 +128,10 @@ func (tracker *FocusTracker) focus(idx int) {
|
||||
}
|
||||
|
||||
view := widget.TextView()
|
||||
view.SetBorderColor(colorFor(Config.UString("wtf.colors.border.focused", "gray")))
|
||||
|
||||
tracker.App.SetFocus(view)
|
||||
view.SetBorderColor(colorFor(Config.UString("wtf.colors.border.focused", "gray")))
|
||||
tracker.App.Draw()
|
||||
}
|
||||
|
||||
func (tracker *FocusTracker) focusables() []Wtfable {
|
||||
|
Loading…
x
Reference in New Issue
Block a user