Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
36 lines (31 sloc) 1.09 KB
This file is a part of cari3s
(c) 2018 Shirakumo (
Author: Nicolas Hafner <>
(in-package #:org.shirakumo.cari3s)
(defun load-from-file (file)
(with-open-file (i file)
(let ((*package* #.*package*)
(initargs ())
(generators ()))
(loop with eof = (make-symbol "EOF")
for item = (read i NIL eof)
until (eql item eof)
do (etypecase item
(push (read i) initargs)
(push item initargs))
(push (apply #'make-instance item) generators))))
(apply #'make-instance 'status-bar :generators (nreverse generators) initargs))))
(defun run-bar-from-file (&optional (file #p"~/.config/i3/cari3s.conf"))
(run-bar (load-from-file file)))
(defun toplevel ()
(let ((args (uiop:command-line-arguments)))
(handler-case (apply #'run-bar-from-file args)
(sb-sys:interactive-interrupt (e)
(declare (ignore e)))
(error (e)
(declare (ignore e))))))