-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.lisp
40 lines (30 loc) · 964 Bytes
/
setup.lisp
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
39
(in-package :stumpwm)
(defparameter *here*
(cl-ppcre:regex-replace
"/[^/]*$" (namestring (truename
(or
*compile-file-truename*
*load-truename*)))
""))
(defun load-rcpart (name)
(load (concatenate 'string *here* "/" name ".lisp")))
(defun getenv (var-name)
(#+clisp ext:getenv
#+sbcl sb-posix:getenv
#+ccl ccl:getenv
#+ecl ext:getenv
var-name
))
(defun setenv (var value)
#+sbcl (sb-posix:setenv var value 1)
)
(defparameter *HOME* (getenv "HOME"))
(defvar *langos* "")
(let ((langos (concatenate 'string *HOME* "/src/nix/lang-os/stumpwm")))
(when (probe-file langos)
(setf *langos* langos)))
; https://github.com/7c6f434c/lang-os
(defun load-rcpart-langos (name)
(load (concatenate 'string *langos* "/" name ".lisp")))
(defun stumpwm::string-to-utf8 (string)
(sb-ext:string-to-octets string :external-format :utf-8))