Skip to content

Commit

Permalink
Merge pull request #1203 from garlic0x1/arch-sdl2
Browse files Browse the repository at this point in the history
sdl2 icons workaround
  • Loading branch information
cxxxr authored Dec 29, 2023
2 parents 579f94d + 4919b56 commit aba7dcb
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
3 changes: 3 additions & 0 deletions src/base/icon.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,6 @@
(getf (icon-plist icon) key))))

(register-icon "folder" #x1f4c1)
(register-icon "right-pointing-triangle" #x25B8)
(register-icon "down-pointing-triangle" #x25BE)
(register-icon "lock" #xD83D)
11 changes: 5 additions & 6 deletions src/ext/filer.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
(:use :cl :lem))
(in-package :lem/filer)

(defparameter *right-pointing-triangle* (uiop:strcat (string (code-char #x25B8)) " "))
(defparameter *down-pointing-triangle* (uiop:strcat (string (code-char #x25BE)) " "))

(define-attribute triangle-attribute
(t :bold t :foreground :base0D))

Expand Down Expand Up @@ -112,9 +109,11 @@

(defmethod render-item (point (item directory-item) depth)
(insert-string point
(if (directory-item-open-p item)
*down-pointing-triangle*
*right-pointing-triangle*)
(uiop:strcat
(if (directory-item-open-p item)
(icon-string "down-pointing-triangle")
(icon-string "right-pointing-triangle"))
" ")
:attribute 'triangle-attribute)
(insert-item point item)
(dolist (item (directory-item-children item))
Expand Down
2 changes: 1 addition & 1 deletion src/modeline.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
(defun modeline-write-info (window)
(let ((buffer (window-buffer window)))
(cond ((buffer-read-only-p buffer)
" 🔒 ")
(format nil " ~a " (icon-string "lock")))
((buffer-modified-p buffer)
" * ")
(t
Expand Down

0 comments on commit aba7dcb

Please sign in to comment.