From 2615997342833d7dfd1716f5621b4514a233b2b6 Mon Sep 17 00:00:00 2001 From: Jeremy Kaplan Date: Fri, 16 Apr 2021 13:23:51 -0700 Subject: [PATCH] alacritty: Split OS-dependent font config --- alacritty/.gitignore | 3 +++ alacritty/base.yml | 44 -------------------------------------------- alacritty/darwin.yml | 43 +++++++++++++++++++++++++++++++++++++++++++ alacritty/install | 1 + alacritty/linux.yml | 38 ++++++++++++++++++++++++++++++++++++++ darwin.conf.yaml | 1 + linux.conf.yaml | 1 + 7 files changed, 87 insertions(+), 44 deletions(-) create mode 100644 alacritty/darwin.yml create mode 100644 alacritty/linux.yml diff --git a/alacritty/.gitignore b/alacritty/.gitignore index b669464..7c8f5f1 100644 --- a/alacritty/.gitignore +++ b/alacritty/.gitignore @@ -3,3 +3,6 @@ # Symlink created by `../bin/set-colors` /colors.yml + +# Symlink created by `../install` +/os.yml diff --git a/alacritty/base.yml b/alacritty/base.yml index ee4a291..1289110 100644 --- a/alacritty/base.yml +++ b/alacritty/base.yml @@ -39,50 +39,6 @@ tabspaces: 8 # When true, bold text is drawn using the bright variant of colors. draw_bold_text_with_bright_colors: true -# Font configuration (changes require restart) -# -# Important font attributes like antialiasing, subpixel aa, and hinting can be -# controlled through fontconfig. Specifically, the following attributes should -# have an effect: -# -# * hintstyle -# * antialias -# * lcdfilter -# * rgba -# -# For instance, if you wish to disable subpixel antialiasing, you might set the -# rgba property to "none". If you wish to completely disable antialiasing, you -# can set antialias to false. -# -# Please see these resources for more information on how to use fontconfig -# -# * https://wiki.archlinux.org/index.php/font_configuration#Fontconfig_configuration -# * file:///usr/share/doc/fontconfig/fontconfig-user.html -font: - normal: - family: Input Mono Narrow Light - - # Point size of the font - size: 10 - - # Offset is the extra space around each character. offset.y can be thought of - # as modifying the linespacing, and offset.x as modifying the letter spacing. - offset: - x: 0 - y: 0 - - # Glyph offset determines the locations of the glyphs within their cells with - # the default being at the bottom. Increase the x offset to move the glyph to - # the right, increase the y offset to move the glyph upward. - glyph_offset: - x: 0 - y: 0 - - # OS X only: use thin stroke font rendering. Thin strokes are suitable - # for retina displays, but for non-retina you probably want this set to - # false. - use_thin_strokes: true - # Should display the render timer render_timer: false diff --git a/alacritty/darwin.yml b/alacritty/darwin.yml new file mode 100644 index 0000000..dd0aa5e --- /dev/null +++ b/alacritty/darwin.yml @@ -0,0 +1,43 @@ +# Font configuration (changes require restart) +# +# Important font attributes like antialiasing, subpixel aa, and hinting can be +# controlled through fontconfig. Specifically, the following attributes should +# have an effect: +# +# * hintstyle +# * antialias +# * lcdfilter +# * rgba +# +# For instance, if you wish to disable subpixel antialiasing, you might set the +# rgba property to "none". If you wish to completely disable antialiasing, you +# can set antialias to false. +# +# Please see these resources for more information on how to use fontconfig +# +# * https://wiki.archlinux.org/index.php/font_configuration#Fontconfig_configuration +# * file:///usr/share/doc/fontconfig/fontconfig-user.html +font: + normal: + family: Iosevka + + # Point size of the font + size: 12 + + # Offset is the extra space around each character. offset.y can be thought of + # as modifying the linespacing, and offset.x as modifying the letter spacing. + offset: + x: 0 + y: 0 + + # Glyph offset determines the locations of the glyphs within their cells with + # the default being at the bottom. Increase the x offset to move the glyph to + # the right, increase the y offset to move the glyph upward. + glyph_offset: + x: 0 + y: 0 + + # OS X only: use thin stroke font rendering. Thin strokes are suitable + # for retina displays, but for non-retina you probably want this set to + # false. + use_thin_strokes: false diff --git a/alacritty/install b/alacritty/install index b99af79..fc9d1c6 100755 --- a/alacritty/install +++ b/alacritty/install @@ -5,6 +5,7 @@ set -euo pipefail CURDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" inputs=( "${CURDIR}/base.yml" + "${CURDIR}/os.yml" "${CURDIR}/colors.yml" ) output="${CURDIR}/alacritty.yml" diff --git a/alacritty/linux.yml b/alacritty/linux.yml new file mode 100644 index 0000000..a930f6a --- /dev/null +++ b/alacritty/linux.yml @@ -0,0 +1,38 @@ +# Font configuration (changes require restart) +# +# Important font attributes like antialiasing, subpixel aa, and hinting can be +# controlled through fontconfig. Specifically, the following attributes should +# have an effect: +# +# * hintstyle +# * antialias +# * lcdfilter +# * rgba +# +# For instance, if you wish to disable subpixel antialiasing, you might set the +# rgba property to "none". If you wish to completely disable antialiasing, you +# can set antialias to false. +# +# Please see these resources for more information on how to use fontconfig +# +# * https://wiki.archlinux.org/index.php/font_configuration#Fontconfig_configuration +# * file:///usr/share/doc/fontconfig/fontconfig-user.html +font: + normal: + family: Input Mono Narrow Light + + # Point size of the font + size: 10 + + # Offset is the extra space around each character. offset.y can be thought of + # as modifying the linespacing, and offset.x as modifying the letter spacing. + offset: + x: 0 + y: 0 + + # Glyph offset determines the locations of the glyphs within their cells with + # the default being at the bottom. Increase the x offset to move the glyph to + # the right, increase the y offset to move the glyph upward. + glyph_offset: + x: 0 + y: 0 diff --git a/darwin.conf.yaml b/darwin.conf.yaml index d7d1bbf..992451b 100644 --- a/darwin.conf.yaml +++ b/darwin.conf.yaml @@ -6,6 +6,7 @@ quiet: false - link: + ~/.config/alacritty/os.yml: alacritty/darwin.yml ~/.config/git/config-os: git/config-darwin ~/.config/karabiner: karabiner/ ~/.config/nvim/os-plugins.vim: neovim/darwin-plugins.vim diff --git a/linux.conf.yaml b/linux.conf.yaml index fb8fe2c..c41b394 100644 --- a/linux.conf.yaml +++ b/linux.conf.yaml @@ -1,3 +1,4 @@ - link: ~/.config/zsh/os.zshrc: zsh/linux.zshrc ~/.config/nvim/os-plugins.vim: neovim/linux-plugins.vim + ~/.config/alacritty/os.yml: alacritty/linux.yml