alacritty/alacritty: A cross-platform, GPU-accelerated terminal emulator を使う。
昔も使ったことはあるんだけど、なぜか前は <C-u> が使用できなくてその時は iTerm2 に戻ってた。
でもやっぱり Rust 製だし使いたいってことで使ってみた。
インストールは homebrew でかんたん。
bash
1
brew cask install alacritty設定はすべて yaml でするみたい。
必要なとこだけ抜粋するとこんな感じ。
- ~/.config/alacritty/alacritty.yml
yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
window:
padding:
x: 5
y: 5
decorations: buttonless
startup_mode: Maximized
title: Alacritty
scrolling:
history: 10000
multiplier: 3
font:
normal:
family: cica
style: Regular
size: 18.0
# [toggle-corp/alacritty-colorscheme: Change colorscheme of alacritty with ease.](https://github.com/toggle-corp/alacritty-colorscheme)
# color_start
# color_end
background_opacity: 0.8
cursor:
style: Block
live_config_reload: true
shell:
program: /usr/local/bin/fishtheme は、上のコメントにあるように、
alacritty-colorscheme を使用する。
alacritty.yml 内に
yaml
1
2
# color_start
# color_endとコメントを書いておくと、その中を置き換えてくれる。
インタラクティブに変更できるように、 fish 関数を書いておいた。
- ~/.config/fish/functions/__filter_command.fish
bash
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
function __filter_command
if type -q sk
sk
else if type -q gof
gof
else if type -q peco
peco
else if type -q fzf-tmux
fzf-tmux
else if type -q fzf
fzf
else if type -q fzy
fzy -l 200
else
echo "Filter command not found ! Please install sk/fzf/fzy/peco."
return 1
end
end- ~/.config/fish/functions/__echo.fish
bash
1
2
3
4
5
6
7
8
9
function __echo
if test (count $argv) -gt 1
echo "
------
$argv[1]: $argv[2]
------
"
end
end- ~/.config/fish/functions/alacritty-toggle-alacritty-theme.fish
bash
1
2
3
4
5
6
7
8
9
10
11
function alacritty-toggle-alacritty-theme
if not test -d ~/.eendroroy-alacritty-theme
git clone https://github.com/eendroroy/alacritty-theme.git ~/.eendroroy-alacritty-theme
end
if not type -q alacritty-colorscheme
pip install git+https://github.com/toggle-corp/alacritty-colorscheme.git
end
alacritty-colorscheme -C ~/.eendroroy-alacritty-theme/themes -l | __filter_command | read -l line
and __echo "Change colorscheme" $line
and alacritty-colorscheme -C ~/.eendroroy-alacritty-theme/themes -a $line
end- ~/.config/fish/functions/alacritty-toggle-base16-alacritty.fish
bash
1
2
3
4
5
6
7
8
9
10
11
function alacritty-toggle-base16-alacritty
if not test -d ~/.aaron-williamson-alacritty-theme
git clone https://github.com/aaron-williamson/base16-alacritty.git ~/.aaron-williamson-alacritty-theme
end
if not type -q alacritty-colorscheme
pip install git+https://github.com/toggle-corp/alacritty-colorscheme.git
end
alacritty-colorscheme -C ~/.aaron-williamson-alacritty-theme/colors -l | __filter_command | read -l line
and __echo "Change colorscheme" $line
and alacritty-colorscheme -C ~/.aaron-williamson-alacritty-theme/colors -a $line
endこれで、かんたんに theme 変更ができる。

Terminalizer で録ったやつやから変わってないように見えるけど、実際は変わってるの・・・