Skip to content

Commit

Permalink
switch kernel with os
Browse files Browse the repository at this point in the history
P.S. linux version temporarily will have Linux as OS
  • Loading branch information
goodmind committed Mar 12, 2017
1 parent 7d54f1f commit fac48ba
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
15 changes: 10 additions & 5 deletions infornography-macos.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -48,18 +48,23 @@
(number->string total) "M")
"")))

(define (os)
(define (kernel)
(string-trim (-> "uname -s")))

(define (os)
(let* ((os-name (-> "sw_vers -productName"))
(os-version (-> "sw_vers -productVersion")))
(string-join (map string-trim (list os-name os-version)))))

(define data (list "
.......
............... " ($ USER) "@" (hostname) "
.................... Shell: " ($ SHELL) "
......................... Memory: " (memory) "
........................... OS: " (os) "
............................. Terminal: " ($ TERM) "
............................... CPU: " (cpu) "
..............x................
........................... Kernel: " (kernel) "
............................. OS: " (os) "
............................... Terminal: " ($ TERM) "
..............x................ CPU: " (cpu) "
............xo@................
...........xoo@xxx.............
........o@oxxoo@@@@@@x..xx.....
Expand Down
10 changes: 5 additions & 5 deletions infornography.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,18 @@
(number->string total) "M")
"")))

(define (os)
(define (kernel)
(string-trim (-> "uname -s")))

(define data (list "
.......
............... " ($ USER) "@" (hostname) "
.................... Shell: " ($ SHELL) "
......................... Memory: " (memory) "
........................... OS: " (os) "
............................. Terminal: " ($ TERM) "
............................... CPU: " (cpu) "
..............x................
........................... Kernel: " (kernel) "
............................. OS: Linux
............................... Terminal: " ($ TERM) "
..............x................ CPU: " (cpu) "
............xo@................
...........xoo@xxx.............
........o@oxxoo@@@@@@x..xx.....
Expand Down

0 comments on commit fac48ba

Please sign in to comment.