feat(desktop): try to fix font sizes

This commit is contained in:
Pavel Korytov 2023-02-17 20:45:32 +03:00
parent 5056dceda8
commit 739d92c5ed
6 changed files with 92 additions and 38 deletions

View file

@ -6,7 +6,7 @@ font:
family: JetBrainsMono Nerd Font
style: Regular
size: 10
size: 8
env:
TERM: xterm-256color

View file

@ -1,32 +1,35 @@
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match target="pattern">
<test qual="any" name="family">
<string>monospace</string>
</test>
<edit binding="strong" name="family" mode="assign">
<string>DejaVu Sans Mono</string>
</edit>
</match>
<match target="pattern">
<test qual="any" name="family">
<string>sans-serif</string>
</test>
<edit binding="strong" name="family" mode="assign">
<string>DejaVu Sans</string>
</edit>
</match>
<!--alias>
<family>monospace</family>
<prefer>
<family>DejaVu Sans Mono Book</family>
</prefer>
</alias>
<alias>
<family>sans-serif</family>
<prefer>
<family>Ubuntu Regular</family>
</prefer>
</alias-->
<match>
<edit name="pixelsize"><double>16</double></edit>
</match>
<match target="pattern">
<test qual="any" name="family">
<string>monospace</string>
</test>
<edit binding="strong" name="family" mode="assign">
<string>DejaVu Sans Mono</string>
</edit>
</match>
<match target="pattern">
<test qual="any" name="family">
<string>sans-serif</string>
</test>
<edit binding="strong" name="family" mode="assign">
<string>DejaVu Sans</string>
</edit>
</match>
<!--alias>
<family>monospace</family>
<prefer>
<family>DejaVu Sans Mono Book</family>
</prefer>
</alias>
<alias>
<family>sans-serif</family>
<prefer>
<family>Ubuntu Regular</family>
</prefer>
</alias-->
</fontconfig>

View file

@ -1011,7 +1011,7 @@ influence of C1 on the result."
(when (display-graphic-p)
(if (x-list-fonts "JetBrainsMono Nerd Font")
(set-frame-font "JetBrainsMono Nerd Font 10" nil t)
(set-frame-font "JetBrainsMono Nerd Font 13" nil t)
(message "Install JetBrainsMono Nerd Font!")))
(use-package ligature
@ -2616,7 +2616,7 @@ Returns (<buffer> . <workspace-index>) or nil."
(with-eval-after-load-norem 'org
(require 'org-crypt)
(org-crypt-use-before-save-magic)
(setq org-tags-exclude-from-inheritance (quote ("crypt")))
(setq org-tags-exclude-from-inheritance '("crypt"))
(setq org-crypt-key "C1EC867E478472439CC82410DE004F32AFA00205"))
(defun my/epa--select-keys-around (fun prompt keys)
@ -5140,7 +5140,9 @@ ENTRY is an instance of `elfeed-entry'."
"u" #'emms-player-mpd-connect
"ww" #'emms-lyrics
"wb" #'emms-lyrics-toggle-display-on-minibuffer
"wm" #'emms-lyrics-toggle-display-on-modeline)
"wm" #'emms-lyrics-toggle-display-on-modeline
"k" #'emms-volume-raise
"l" #'emms-volume-lower)
(my/persp-add-rule
emms-browser-mode 0 "EMMS"
emms-playlist-mode 0 "EMMS")
@ -5303,6 +5305,15 @@ ENTRY is an instance of `elfeed-entry'."
:keymaps 'emms-playlist-mode-map
"q" 'quit-window))
(defun my/set-volume (value)
(start-process "ponymix" nil "ponymix"
(if (< 0 value) "increase" "decrease")
(number-to-string (abs value))
"--max-volume" "150"))
(setq emms-volume-change-function #'my/set-volume)
(setq emms-volume-change-amount 5)
(use-package ytel
:straight t
:commands (ytel)

View file

@ -748,7 +748,7 @@ font:
family: JetBrainsMono Nerd Font
style: Regular
size: 10
size: 8
env:
TERM: xterm-256color

View file

@ -86,7 +86,8 @@ However, I'd rather use the =Xresources= file wherever possible. Here is the cod
#+end_src
So, whenever a program is capable of reading =.Xresources=, it will get colors from there, otherwise, it will get colors from noweb expressions in the literate config. Thus, in both cases, the color is set in a single Org Mode table.
*** Fonts
*** OFF Fonts
CLOSED: [2023-02-17 Fri 20:36]
Also, Xresources are used to set =Xft= settings. Unfortunately, the DPI setting has to be unique for each machine, which means I cannot commit =Xresources= to the repo.
#+NAME: get-dpi
@ -99,7 +100,7 @@ Also, Xresources are used to set =Xft= settings. Unfortunately, the DPI setting
#+end_src
#+begin_src conf-xdefaults :noweb yes :tangle ~/.Xresources
Xft.dpi: <<get-dpi()>>
! Xft.dpi: <<get-dpi()>>
#+end_src
** Themes
A few programs I use to customize the apperance are listed below.
@ -118,13 +119,39 @@ A few programs I use to customize the apperance are listed below.
Net/ThemeName "Matcha-dark-azul"
Net/IconThemeName "Papirus-Dark"
Gtk/DecorationLayout "menu:minimize,maximize,close"
Gtk/FontName "Sans 10"
Gtk/FontName "Sans 14"
Gtk/MonospaceFontName "JetBrainsMono Nerd Mono 12"
Gtk/CursorThemeName "Adwaita"
Xft/Antialias 1
Xft/Hinting 0
Xft/HintStyle "hintnone"
#+end_src
** Fontconfig
#+begin_src xml ~/.config/fontconfig/fonts.conf
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match>
<edit name="pixelsize"><double>16</double></edit>
</match>
<match target="pattern">
<test qual="any" name="family">
<string>monospace</string>
</test>
<edit binding="strong" name="family" mode="assign">
<string>DejaVu Sans Mono</string>
</edit>
</match>
<match target="pattern">
<test qual="any" name="family">
<string>sans-serif</string>
</test>
<edit binding="strong" name="family" mode="assign">
<string>DejaVu Sans</string>
</edit>
</match>
</fontconfig>
#+end_src
** MIME
Setting the default MIME types
#+begin_src conf-unix :tangle ~/.config/mimeapps.list

View file

@ -1632,7 +1632,7 @@ References:
#+begin_src emacs-lisp
(when (display-graphic-p)
(if (x-list-fonts "JetBrainsMono Nerd Font")
(set-frame-font "JetBrainsMono Nerd Font 10" nil t)
(set-frame-font "JetBrainsMono Nerd Font 13" nil t)
(message "Install JetBrainsMono Nerd Font!")))
#+end_src
@ -7269,7 +7269,9 @@ References:
"u" #'emms-player-mpd-connect
"ww" #'emms-lyrics
"wb" #'emms-lyrics-toggle-display-on-minibuffer
"wm" #'emms-lyrics-toggle-display-on-modeline)
"wm" #'emms-lyrics-toggle-display-on-modeline
"k" #'emms-volume-raise
"l" #'emms-volume-lower)
(my/persp-add-rule
emms-browser-mode 0 "EMMS"
emms-playlist-mode 0 "EMMS")
@ -7461,6 +7463,17 @@ Also advice to change the location of the lyrics in the mode line.
:keymaps 'emms-playlist-mode-map
"q" 'quit-window))
#+end_src
**** Setting volume
#+begin_src emacs-lisp
(defun my/set-volume (value)
(start-process "ponymix" nil "ponymix"
(if (< 0 value) "increase" "decrease")
(number-to-string (abs value))
"--max-volume" "150"))
(setq emms-volume-change-function #'my/set-volume)
(setq emms-volume-change-amount 5)
#+end_src
**** EMMS & mpd Fixes
+Some fixes until I submit a patch.+ I've submitted a patch for with these fixes, so I'll remove this section eventually.