Documentation
¶
Overview ¶
Package histview holds what the history window shows, apart from GTK: time labels, search, highlighting, and the i3blocks block's seen list.
Index ¶
- Constants
- func Body(e histfile.Entry) string
- func Channel(e histfile.Entry) string
- func Channels(entries []histfile.Entry) []string
- func Duration(d time.Duration) string
- func Escape(s string) string
- func Highlight(text, query string) string
- func Matches(e histfile.Entry, query, channel string) bool
- func Preview(e histfile.Entry, maxRunes int) string
- func ReadSeen(path string) (map[string]bool, error)
- func SeenPath() (string, error)
- func Timing(e histfile.Entry) string
- func Title(e histfile.Entry) string
- func When(t, now time.Time) string
- func WriteSeen(path string, seen map[string]bool, entries []histfile.Entry) error
Constants ¶
const Delayed = time.Minute
Delayed is how much later than sent a message must arrive before the window shows both times.
Variables ¶
This section is empty.
Functions ¶
func Highlight ¶
Highlight returns text as Pango markup with every match of query (ignoring case) emphasised. Everything else is escaped, so the result shows text literally.
func Matches ¶
Matches reports whether e is on channel ("" for any) and holds query (ignoring case) in its title, body or channel.
func SeenPath ¶
SeenPath is where the i3blocks block reads which messages the window has listed: $SEEN, or bar-seen in $XDG_STATE_HOME/notifier, as the block expects.
func Timing ¶
Timing describes when e was received, and when it was sent if it arrived noticeably later.
func Title ¶
Title and Body are e's text made safe to show: senders choose it, so control and format characters are replaced.
Types ¶
This section is empty.