1
1
# Alacritty Colorscheme
2
2
3
- Change colorscheme of alacritty with ease.
4
-
5
- ![ Usage] ( https://user-images.githubusercontent.com/4928045/38159826-c451861a-34d0-11e8-979b-34b67027fb87.gif )
6
-
7
- ## Usage
8
-
9
- ```
10
- usage: alacritty-colorscheme [-h] (-s | -l | -a colorscheme | -t colorschemes [colorschemes ...] | -T) [-r] [-c configuration file] [-C colorscheme directory] [-V]
3
+ ![ PyPI] ( https://img.shields.io/pypi/v/alacritty-colorscheme ) ![ PyPI - Downloads] ( https://img.shields.io/pypi/dm/alacritty-colorscheme )
11
4
12
5
Change colorscheme of alacritty with ease.
13
6
14
- optional arguments:
15
- -h, --help show this help message and exit
16
- -s, --show-applied Show applied colorscheme
17
- -l, --list-available List available colorschemes
18
- -a colorscheme, --apply colorscheme
19
- Apply colorscheme
20
- -t colorschemes [colorschemes ...], --toggle colorschemes [colorschemes ...]
21
- Toggle colorschemes
22
- -T, --toggle-available
23
- Toggle all available colorschemes
24
- -r, --reverse-toggle Toggle through colorschemes in reverse order
25
- -c configuration file, --config-file configuration file
26
- Path to configuration file
27
- -C colorscheme directory, --colorscheme-directory colorscheme directory
28
- Path to colorscheme directory
29
- -V, --base16-vim Support base16-vim
30
- ```
7
+ ![ Usage] ( https://user-images.githubusercontent.com/4928045/106160031-8267a880-61ad-11eb-9acf-b9d5cd5de3e4.gif )
31
8
32
9
## Installation
33
10
34
- You can install it from pip:
11
+ You can install alacritty-colorscheme using pip:
35
12
36
13
``` bash
37
14
pip install --user alacritty-colorscheme
38
15
```
39
16
40
- ## Running locally
41
-
42
- ``` bash
43
- # Install poetry
44
- pip install --user poetry
45
-
46
- # Get program
47
- git clone https://github.com/toggle-corp/alacritty-colorscheme.git
17
+ ## Usage
48
18
49
- # Run program
50
- cd alacritty-colorscheme
51
- poetry install
52
- poetry run python alacritty_colorscheme/cli.py
19
+ ```
20
+ usage: alacritty-colorscheme [-c configuration file] [-C colorscheme directory] [-V] [-h]
21
+ {list,status,toggle,apply} ...
53
22
```
54
23
55
- ## Getting themes
24
+ ## Getting colorschemes
56
25
57
- You can get themes from [ aaron-williamson/base16-alacritty] ( https://github.com/aaron-williamson/base16-alacritty )
26
+ - You can get colorschemes from [ aaron-williamson/base16-alacritty] ( https://github.com/aaron-williamson/base16-alacritty )
58
27
59
- ``` bash
60
- DEST=" $HOME /.aaron-williamson-alacritty-theme"
28
+ ``` bash
29
+ REPO=" https://github.com/aaron-williamson/base16-alacritty.git"
30
+ DEST=" $HOME /.aarors-williamson-colorschemes"
61
31
62
- # Get themes
63
- git clone https://github.com/aaron-williamson/base16-alacritty.git $DEST
64
- ```
32
+ # Get colorschemes
33
+ git clone $REPO $DEST
34
+ # Create symlink at default colors location (optional)
35
+ ln -s " $DEST /colors" " $HOME /.config/alacritty/color"
36
+ ```
65
37
66
- You can alternatively get themes from from [ eendroroy/alacritty-theme] ( https://github.com/eendroroy/alacritty-theme )
38
+ - You can also get colorschemes from from [eendroroy/alacritty-theme](https://github.com/eendroroy/alacritty-theme)
67
39
68
- ``` bash
69
- DEST=" $HOME /.eendroroy-alacritty-theme"
40
+ ` ` ` bash
41
+ REPO=https://github.com/eendroroy/alacritty-theme.git
42
+ DEST=" $HOME /.eendroroy-colorschemes"
43
+ # Get colorschemes
44
+ git clone $REPO $DEST
45
+ # Create symlink at default colors location (optional)
46
+ ln -s " $DEST /themes" " $HOME /.config/alacritty/color"
47
+ ` ` `
70
48
71
- # Get themes
72
- git clone https://github.com/eendroroy/alacritty-theme.git $DEST
73
- ```
74
-
75
- ## Synchronizing with vim/neovim
49
+ # # Sync with vim/neo-vim
76
50
77
51
If you are using base16 colorschemes from
78
- [ base16-vim] ( https://github.com/chriskempson/base16-vim ) , you can use the ` -V `
79
- argument to generate ` ~/.vimrc_background ` file when you change alacritty
80
- colorscheme.
52
+ [base16-vim](https://github.com/chriskempson/base16-vim) plugin, you can use
53
+ the ` -V` argument to automatically generate ` ~/.vimrc_background` file when you
54
+ change alacritty colorscheme. You will need to source this file in your vimrc
55
+ to load the same colorscheme in vim.
81
56
82
- You will need to source the file in your vimrc to load the appropriate
83
- colorscheme in vim. Add the following in your vimrc file:
57
+ Add this in your ` .vimrc` file:
84
58
85
59
` ` ` vim
86
60
if filereadable(expand(" ~/.vimrc_background" ))
@@ -89,63 +63,61 @@ if filereadable(expand("~/.vimrc_background"))
89
63
endif
90
64
` ` `
91
65
92
- After changing alacritty colorscheme, you need to simply reload your vimrc
93
- configuration.
66
+ When you change your alacritty colorscheme, you simply need to source
67
+ ` ~/.vimrc_background` or your ` vimrc` .
68
+ If you are a neo-vim user, ` ~/.vimrc_background` will be automatically sourced.
94
69
95
- ### Reloading neovim
70
+ # # Examples
96
71
97
- If you are using neovim, you can use
98
- [ neovim-remote] ( https://github.com/mhinz/neovim-remote ) to reload the nvim
99
- sessions externally.
72
+ # ## bash/zsh aliases
100
73
101
- Install neovim-remote :
74
+ Add this in your ` .zshrc ` or ` .bashrc ` file :
102
75
103
76
` ` ` bash
104
- pip install --user neovim-remote
105
- ```
106
-
107
- Reload a neovim session using:
77
+ LIGHT_COLOR='base16-gruvbox-light-soft.yml'
78
+ DARK_COLOR='base16-gruvbox-dark-soft.yml'
108
79
109
- ``` bash
110
- nvr -cc " source ~/.config/nvim/init.vim"
80
+ alias day=" alacritty-colorscheme -V apply $LIGHT_COLOR && reload_nvim"
81
+ alias night=" alacritty-colorscheme -V apply $DARK_COLOR && reload_nvim"
82
+ alias toggle=" alacritty-colorscheme -V toggle $LIGHT_COLOR $DARK_COLOR && reload_nvim"
111
83
` ` `
112
84
113
- ## Example bash/zsh configuration (base16-vim + neovim + neovim-remote)
85
+ # ## i3wm/sway bindings
114
86
115
- You can add this example configuration in your .zshrc or .bashrc to switch
116
- between dark and light theme.
117
- This snippet creates two aliases namely: ` day ` , ` night `
87
+ Add this in your i3 ` config` file:
118
88
119
89
` ` ` bash
120
- function reload_nvim {
121
- for SERVER in $( nvr --serverlist) ; do
122
- nvr -cc " source ~/.config/nvim/init.vim" --servername $SERVER &
123
- done
124
- }
90
+ set $light_color base16-gruvbox-light-soft.yml
91
+ set $dark_color base16-gruvbox-dark-soft.yml
125
92
126
- COLOR_DIR=" $HOME /.aaron-williamson-alacritty-theme/colors"
127
- LIGHT_COLOR=' base16-gruvbox-light-soft.yml'
128
- DARK_COLOR=' base16-gruvbox-dark-soft.yml'
93
+ # Toggle between light and dark colorschemes
94
+ bindsym $mod +Shift+n exec alacritty-colorscheme -V toggle $light_color $dark_color
95
+
96
+ # Toggle between all available colorschemes
97
+ bindsym $mod +Shift+m exec alacritty-colorscheme -V toggle
129
98
130
- alias day= " alacritty-colorscheme -C $COLOR_DIR -a $LIGHT_COLOR -V && reload_nvim "
131
- alias night= " alacritty-colorscheme -C $COLOR_DIR -a $DARK_COLOR -V && reload_nvim "
99
+ # Get notification with current colorscheme
100
+ bindsym $mod +Shift+b exec notify-send " Alacritty Colorscheme " ` alacritty-colorscheme status `
132
101
` ` `
133
102
134
- ## Example i3wm/sway configuration
103
+ # # Development
104
+
105
+ # ## Running locally
135
106
136
107
` ` ` bash
137
- set $color_dir $HOME /.aaron-williamson-alacritty-theme/colors
138
- set $light_color base16-gruvbox-light-soft.yml
139
- set $dark_color base16-gruvbox-dark-soft.yml
108
+ pip install --user poetry
109
+
110
+ git clone https://github.com/toggle-corp/alacritty-colorscheme.git
111
+ cd alacritty-colorscheme
140
112
141
- # Toggle between light and dark colorscheme
142
- bindsym $mod +Shift+n exec alacritty-colorscheme -C $color_dir -t $light_color $dark_color
113
+ poetry install
114
+ poetry run python -m alacritty_colorscheme.cli
115
+ ` ` `
143
116
144
- # Toggle between all available colorscheme
145
- bindsym $mod +Shift+m exec alacritty-colorscheme -C $color_dir -T
117
+ # ## Installing locally
146
118
147
- # Get notification with current colorscheme
148
- bindsym $mod +Shift+b exec notify-send " Alacritty Colorscheme " ` alacritty-colorscheme -C $color_dir -s `
119
+ ` ` ` bash
120
+ pip install --user .
149
121
` ` `
150
122
151
123
# # License
0 commit comments