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 family: JetBrainsMono Nerd Font
style: Regular style: Regular
size: 10 size: 8
env: env:
TERM: xterm-256color TERM: xterm-256color

View file

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

View file

@ -1011,7 +1011,7 @@ influence of C1 on the result."
(when (display-graphic-p) (when (display-graphic-p)
(if (x-list-fonts "JetBrainsMono Nerd Font") (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!"))) (message "Install JetBrainsMono Nerd Font!")))
(use-package ligature (use-package ligature
@ -2616,7 +2616,7 @@ Returns (<buffer> . <workspace-index>) or nil."
(with-eval-after-load-norem 'org (with-eval-after-load-norem 'org
(require 'org-crypt) (require 'org-crypt)
(org-crypt-use-before-save-magic) (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")) (setq org-crypt-key "C1EC867E478472439CC82410DE004F32AFA00205"))
(defun my/epa--select-keys-around (fun prompt keys) (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 "u" #'emms-player-mpd-connect
"ww" #'emms-lyrics "ww" #'emms-lyrics
"wb" #'emms-lyrics-toggle-display-on-minibuffer "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 (my/persp-add-rule
emms-browser-mode 0 "EMMS" emms-browser-mode 0 "EMMS"
emms-playlist-mode 0 "EMMS") emms-playlist-mode 0 "EMMS")
@ -5303,6 +5305,15 @@ ENTRY is an instance of `elfeed-entry'."
:keymaps 'emms-playlist-mode-map :keymaps 'emms-playlist-mode-map
"q" 'quit-window)) "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 (use-package ytel
:straight t :straight t
:commands (ytel) :commands (ytel)

View file

@ -748,7 +748,7 @@ font:
family: JetBrainsMono Nerd Font family: JetBrainsMono Nerd Font
style: Regular style: Regular
size: 10 size: 8
env: env:
TERM: xterm-256color 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 #+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. 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. 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 #+NAME: get-dpi
@ -99,7 +100,7 @@ Also, Xresources are used to set =Xft= settings. Unfortunately, the DPI setting
#+end_src #+end_src
#+begin_src conf-xdefaults :noweb yes :tangle ~/.Xresources #+begin_src conf-xdefaults :noweb yes :tangle ~/.Xresources
Xft.dpi: <<get-dpi()>> ! Xft.dpi: <<get-dpi()>>
#+end_src #+end_src
** Themes ** Themes
A few programs I use to customize the apperance are listed below. 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/ThemeName "Matcha-dark-azul"
Net/IconThemeName "Papirus-Dark" Net/IconThemeName "Papirus-Dark"
Gtk/DecorationLayout "menu:minimize,maximize,close" Gtk/DecorationLayout "menu:minimize,maximize,close"
Gtk/FontName "Sans 10" Gtk/FontName "Sans 14"
Gtk/MonospaceFontName "JetBrainsMono Nerd Mono 12" Gtk/MonospaceFontName "JetBrainsMono Nerd Mono 12"
Gtk/CursorThemeName "Adwaita" Gtk/CursorThemeName "Adwaita"
Xft/Antialias 1 Xft/Antialias 1
Xft/Hinting 0 Xft/Hinting 0
Xft/HintStyle "hintnone" Xft/HintStyle "hintnone"
#+end_src #+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 ** MIME
Setting the default MIME types Setting the default MIME types
#+begin_src conf-unix :tangle ~/.config/mimeapps.list #+begin_src conf-unix :tangle ~/.config/mimeapps.list

View file

@ -1632,7 +1632,7 @@ References:
#+begin_src emacs-lisp #+begin_src emacs-lisp
(when (display-graphic-p) (when (display-graphic-p)
(if (x-list-fonts "JetBrainsMono Nerd Font") (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!"))) (message "Install JetBrainsMono Nerd Font!")))
#+end_src #+end_src
@ -7269,7 +7269,9 @@ References:
"u" #'emms-player-mpd-connect "u" #'emms-player-mpd-connect
"ww" #'emms-lyrics "ww" #'emms-lyrics
"wb" #'emms-lyrics-toggle-display-on-minibuffer "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 (my/persp-add-rule
emms-browser-mode 0 "EMMS" emms-browser-mode 0 "EMMS"
emms-playlist-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 :keymaps 'emms-playlist-mode-map
"q" 'quit-window)) "q" 'quit-window))
#+end_src #+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 **** 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. +Some fixes until I submit a patch.+ I've submitted a patch for with these fixes, so I'll remove this section eventually.