stumpwm/terminal-fonts.lisp @ 4f28fbfd7d63 default tip

More
author Steve Losh <steve@stevelosh.com>
date Tue, 09 Apr 2024 09:20:04 -0400
parents 2c74f844352e
children (none)
(in-package :stumpwm-user)

(defun read-terminal-font-size-from-config ()
  (if (probe-file "/home/sjl/.terminal-font")
    (with-open-file (f "/home/sjl/.terminal-font")
      (read f))
    11))

(defvar *terminal-font-size* (read-terminal-font-size-from-config))

(defcommand reload-terminal-font-size () ()
  (setf *terminal-font-size* (read-terminal-font-size-from-config)))

(defcommand terminal-font-size-show () ()
  (message "~D" *terminal-font-size*))

(defcommand terminal-font-size-up () ()
  (message "~D" (incf *terminal-font-size*)))

(defcommand terminal-font-size-down () ()
  (message "~D" (setf *terminal-font-size* (max 6 (1- *terminal-font-size*)))))

(defcommand st-font-up () ()
  (loop :repeat 7 :do (meta (kbd "C-S-SunPageUp"))))

(defcommand st-font-down () ()
  (loop :repeat 7 :do (meta (kbd "C-S-SunPageDown"))))

(defcommand st-font-reset () ()
  (meta (kbd "C-S-Home")))

(defcommand tfont (size)
    ((:integer "Size: "))
  (setf *terminal-font-size* size))