diff options
Diffstat (limited to 'nofetch.scm')
-rwxr-xr-x | nofetch.scm | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/nofetch.scm b/nofetch.scm index 01c26c3..88bb3e9 100755 --- a/nofetch.scm +++ b/nofetch.scm | |||
@@ -7,17 +7,18 @@ Licensed under the Fair license. See COPYING for details. | |||
7 | |# | 7 | |# |
8 | 8 | ||
9 | (import (chicken format) | 9 | (import (chicken format) |
10 | (chicken port) | ||
10 | (chicken random) | 11 | (chicken random) |
11 | (chicken string) | 12 | (chicken string)) |
12 | posix-utils) | ||
13 | 13 | ||
14 | (define (clear) | 14 | (define (clear) |
15 | (display #\escape) | 15 | (display #\escape) |
16 | (display "[2J")) | 16 | (display "[2J")) |
17 | 17 | ||
18 | (define terminal-size (get-terminal-size)) | 18 | (define-values (terminal-height terminal-width) |
19 | (define terminal-width (cadr terminal-size)) | 19 | (if (terminal-port? (current-output-port)) |
20 | (define terminal-height (car terminal-size)) | 20 | (terminal-size (current-output-port)) |
21 | (values 24 80))) | ||
21 | 22 | ||
22 | (define (get thing) | 23 | (define (get thing) |
23 | (if (< terminal-width 48) | 24 | (if (< terminal-width 48) |