Skip to content

Commit

Permalink
Refine alacritty config with Nix installed fonts
Browse files Browse the repository at this point in the history
  • Loading branch information
kachick committed Mar 11, 2024
1 parent 7a66966 commit 395e603
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 3 deletions.
5 changes: 3 additions & 2 deletions config/alacritty/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@ There are 2 points

[Add shift for basic keybinds, not just the ctrl+c, ctrl+v](https://github.com/alacritty/alacritty/issues/2383)

## How to test opacity?
## How to test look and feel?

If you feel the config is not applied or you want to try another value.\
Specify the arguments in CLI.

```bash
alacritty -o window.opacity=0.4
alacritty -o window.opacity=0.85 -o font.size=12 font.normal.family='"IosevkaTerm NFM"'
alacritty -o window.opacity=0.85 -o font.size=12 font.normal.family='"SauceCodePro NFM"' window.dimensions.columns=180 window.dimensions.lines=50 window.position.x=10 window.position.y=10
```
12 changes: 11 additions & 1 deletion config/alacritty/common.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
# You can find major themes in https://github.com/alacritty/alacritty-theme
import = ["~/.config/alacritty/themes/iceberg-dark.toml"]

[selection]
save_to_clipboard = true

[font.normal]
family = "PlemolJP Console NF"
family = "SauceCodePro NFM"
size = 12

[window]
opacity = 0.85

dimensions.columns = 180
dimensions.lines = 50

position.x = 10
position.y = 10
3 changes: 3 additions & 0 deletions home-manager/common.nix
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@
];
};

# https://github.com/nix-community/home-manager/issues/605
fonts.fontconfig.enable = true;

# This also changes xdg? Official manual sed this config is better for non NixOS Linux
# https://github.com/nix-community/home-manager/blob/559856748982588a9eda6bfb668450ebcf006ccd/modules/targets/generic-linux.nix#L16
targets.genericLinux.enable = pkgs.stdenv.isLinux;
Expand Down
12 changes: 12 additions & 0 deletions home-manager/packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,18 @@
gitleaks
ruby_3_3

# How to get the installed font names
# linux: fc-list
# darwin: system_profiler SPFontsDataType
# filter to find by eyes: system_profiler SPFontsDataType | grep -v 'Propo' | sort | rg --pcre2 '(?<=Full Name: ).+(?=Nerd Font)'
(pkgs.nerdfonts.override {
# https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/data/fonts/nerdfonts/shas.nix
fonts = [
"SourceCodePro"
"Inconsolata"
];
})

# Includes follows in each repository if needed, not in global
# gcc
# rustup
Expand Down

0 comments on commit 395e603

Please sign in to comment.