diff options
author | Hugo Hörnquist <hugo@hornquist.se> | 2019-06-01 21:56:52 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@hornquist.se> | 2019-06-01 21:56:58 +0200 |
commit | b0d552ffe3e336606de907897181a0f0718b3149 (patch) | |
tree | f08d02b8bdead2106f1ca2377cd422f3694e3aa2 /module/vulgar/info.scm | |
parent | Rename {terminal => vulgar}. (diff) | |
download | calp-b0d552ffe3e336606de907897181a0f0718b3149.tar.gz calp-b0d552ffe3e336606de907897181a0f0718b3149.tar.xz |
Reword terminal output to better modularization.
Diffstat (limited to 'module/vulgar/info.scm')
-rw-r--r-- | module/vulgar/info.scm | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/module/vulgar/info.scm b/module/vulgar/info.scm new file mode 100644 index 00000000..86abf0a0 --- /dev/null +++ b/module/vulgar/info.scm @@ -0,0 +1,9 @@ +(define-module (vulgar info) + :use-module (util)) + +(define-public (get-terminal-size) + (let* (((rpipe . wpipe) (pipe))) + (system (format #f "stty size > /proc/~s/fd/~s" + (getpid) (port->fdes wpipe))) + (values (read rpipe) + (read rpipe)))) |