-
Notifications
You must be signed in to change notification settings - Fork 1
/
banner.scm
38 lines (31 loc) · 917 Bytes
/
banner.scm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
; vim: set expandtab:
(declare (unit banner))
;; Print a colorful banner
(module banner
(banner)
(import
ansi-escape-sequences
(chicken time posix)
(chicken string)
scheme
srfi-13)
(define YYY (+ 1900 (vector-ref (seconds->local-time) 5)))
(define bannerText
(string-split
#<#BANNER
** @@@ ***** ******* *********** ************* *****************
** *** ***** ******* * IT'S PRIME TIME! **** *****************
** *** ***** ******* * By Erik Falor **** *****************
** *** ***** https://github.com/fadein/primetime **************
** *** ***** ******* * Copyright (c) #YYY **** *****************
@@ *** ***** ******* *********** ************* *****************
BANNER
"\n"
))
(define (banner attrb)
(string-join
(map (lambda (str attrb)
(set-text '(reverse-video)
(set-text256 attrb str #f))) bannerText attrb)
"\r\n"))
); module