commit e9fb231

chld  ·  2026-09-27 17:19:15 +0000 UTC
parent df3b00b
update
2 files changed,  +36, -11
M emacs
+35, -10
 1@@ -2,15 +2,40 @@
 2 !#
 3 
 4 (use-modules
 5-(ice-9 rdelim)
 6-(srfi srfi-1))
 7+ (ice-9 popen)
 8+ (ice-9 rdelim)
 9+ (srfi srfi-1))
10+
11+(define (system-output . a)
12+  (let*  ((p (apply open-pipe* OPEN_READ a))
13+	  (s (read-string p)))
14+    (close-pipe p)s))
15+
16+(let* ( 
17+       (f (call-with-input-file "/etc/os-release" (lambda (s)
18+						    (string-split (read-string s) #\newline)
19+						    )))
20+       (os (string-trim (cadr (string-split (last
21+					     (string-split 
22+					      (list-ref f (list-index (lambda (s) (string-contains s "PRETTY_NAME")) f))
23+					      #\=)
24+					     ) #\"))
25+			))
26+       (pkg (- (length
27+		(string-split (system-output "apk" "list" "--installed") #\newline)) 1)
28+	    )
29+
30+       (fmem (call-with-input-file "/proc/meminfo" (lambda (s)
31+						     (string-split (read-string s) #\newline))))
32+       (ms (make-struct/no-tail (make-vtable "pwpw") 0 0))
33+       (mem
34+	0
35+	)
36+       )
37+
38+  (format #t "os: ~a~%" os)
39+  (format #t "pkg: ~a~%" pkg)
40+  (display ms)
41+
42 
43-(let main (
44-(f (call-with-input-file "/etc/os-release"
45-  (lambda (s)
46-    (read-string s)
47-      )
48-   ))
49-)
50-  (display f)
51   )
M emacs
+1, -1
1@@ -49,7 +49,7 @@
2 (add-to-list 'default-frame-alist '(internal-border-width . 30))
3 
4 (defface my-paren-face
5-  '((t (:foreground "#444444")))
6+  '((t (:foreground "#999534")))
7   "Face for parentheses.")
8 
9 (font-lock-add-keywords