Working on xorg.

This commit is contained in:
Lord_Devi 2024-07-20 04:36:06 -04:00
parent b118c502b7
commit a54a18710f
3 changed files with 21 additions and 11 deletions

View file

@ -1 +1 @@
font_size 10
font_size 14

View file

@ -1,6 +1,9 @@
;; vim: set ft=lisp :
;; -*-lisp-*-
(ql:quickload :clx-truetype)
(load-module "ttf-fonts")
(defvar *font-size* 16 "Default font size")
(defun get-hostname ()
@ -15,17 +18,25 @@
(cond
((string-equal hostname "orthanc") 16)
((string-equal hostname "angband") 16)
((string-equal hostname "mairon") 34) ;; 20,34
((string-equal hostname "mairon") 24)
((string-equal hostname "barad-dur") 16)
(t 16)))))
(defun set-font-on-startup ()
(set-font-based-on-hostname)
(let ((font-string (format nil "-Adobe-Courier-Bold-r-Normal-*-~D-*-100-100-*-*-*-*" *font-size*)))
(set-font font-string)))
(set-font-based-on-hostname)
;; Add the function to the start hook
(add-hook *start-hook* #'set-font-on-startup)
(setq clx-truetype::*font-dirs*
(append (list (namestring (merge-pathnames ".local/share/fonts" (user-homedir-pathname))))
clx-truetype::*font-dirs*))
(xft:cache-fonts)
(set-font (make-instance 'xft:font
:family "JetBrainsMono NF"
:subfamily "Regular"
:size *font-size*
:antialias t))
(message "Font set.")
(message "Sieg Heil."))
;; Message window font
;;(set-font "-xos4-terminus-medium-r-normal--14-140-72-72-c-80-iso8859-15")
@ -39,3 +50,5 @@
;; :size *font-size*
;; :antialias t)))
;; Add the function to the start hook
(add-hook *start-hook* #'set-font-on-startup)

View file

@ -1,11 +1,8 @@
! ~/.config/xorg/Xresources.mairon
! Author: Lord_Devi
! Description: This is an Xresources file for Mairon.
Xcursor.size: 64
Xcursor.size: 128
Xft.dpi: 192
!Xft.dpi: 96
!Emacs.font: JetBrainsMono Nerd Font-12
! Include common settings
#include "$HOME/.config/xorg/Xresources.common"