Skip to content

Commit

Permalink
Merge pull request #278 from kachick/alacritty-each-os
Browse files Browse the repository at this point in the history
Split alacritty config for non preinstalled PowerShell 7 in Windows
  • Loading branch information
kachick committed Aug 21, 2023
2 parents f56a3bf + e921a66 commit 3c2e590
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci-home.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ jobs:
zsh -c 'which dprint'
zsh -c 'ruby --version'
zsh -c 'irb --version'
zsh -c 'alacritty --version'
zsh -c 'ssh -V'
- name: Run homemade commands
run: zsh -c 'la'
3 changes: 2 additions & 1 deletion home-manager/home.nix
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@

# Do not alias home.nix into `xdg.configFile`, it actually cannot be used because of using many relative dirs
# So you should call `home-manager switch` with `-f ~/repos/dotfiles/home.nix`
xdg.configFile."alacritty/alacritty.yml".source = ../home/.config/alacritty/alacritty.yml;
xdg.configFile."alacritty/alacritty-common.yml".source = ../home/.config/alacritty/alacritty-common.yml;
xdg.configFile."alacritty/alacritty.yml".source = ../home/.config/alacritty/alacritty-unix.yml;

# Not under "starship/starship.toml"
xdg.configFile."starship.toml".source = ../home/.config/starship.toml;
Expand Down
1 change: 1 addition & 0 deletions home-manager/packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
bottom
tig
zellij
alacritty
typos
hyperfine
difftastic
Expand Down
File renamed without changes.
12 changes: 12 additions & 0 deletions home/.config/alacritty/alacritty-unix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Configuration for Alacritty, the GPU enhanced terminal emulator.

# Import additional configuration files
#
# Imports are loaded in order, skipping all missing files, with the importing
# file being loaded last. If a field is already present in a previous import, it
# will be replaced.
#
# All imports must either be absolute paths starting with `/`, or paths relative
# to the user's home directory starting with `~/`.
import:
- ~/.config/alacritty/alacritty-common.yml
27 changes: 27 additions & 0 deletions home/.config/alacritty/alacritty-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Configuration for Alacritty, the GPU enhanced terminal emulator.

# Import additional configuration files
#
# Imports are loaded in order, skipping all missing files, with the importing
# file being loaded last. If a field is already present in a previous import, it
# will be replaced.
#
# All imports must either be absolute paths starting with `/`, or paths relative
# to the user's home directory starting with `~/`.
import:
- ~/.config/alacritty/alacritty-common.yml

# Shell
#
# You can set `shell.program` to the path of your favorite shell, e.g.
# `/bin/fish`. Entries in `shell.args` are passed unmodified as arguments to the
# shell.
#
# Default:
# - (Linux/BSD/macOS) `$SHELL` or the user's login shell, if `$SHELL` is unset
# - (Windows) powershell
shell:
program: pwsh
args:
- -WorkingDirectory
- '~/'
4 changes: 3 additions & 1 deletion windows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@
1. On powershell
```powershell
mkdir -p ~/.config
mkdir -p ~/.config/alacritty
mkdir -p "$($env:APPDATA)/alacritty"
Copy-Item "\\wsl.localhost\Ubuntu\home\kachick\repos\dotfiles\home\.config/starship.toml" -Destination ~/.config
Copy-Item "\\wsl.localhost\Ubuntu\home\kachick\repos\dotfiles\home\.config/alacritty/alacritty.yml" -Destination "$($env:APPDATA)/alacritty/alacritty.yml"
Copy-Item "\\wsl.localhost\Ubuntu\home\kachick\repos\dotfiles\home\.config/alacritty/alacritty-common.yml" -Destination ~/.config/alacritty
Copy-Item "\\wsl.localhost\Ubuntu\home\kachick\repos\dotfiles\home\.config/alacritty/alacritty-windows.yml" -Destination "$($env:APPDATA)/alacritty/alacritty.yml"
Copy-Item "\\wsl.localhost\Ubuntu\home\kachick\repos\dotfiles\windows\Microsoft.PowerShell_profile.ps1" -Destination "$PROFILE"
```
1. Enable Bitlocker and backup the restore key
Expand Down

0 comments on commit 3c2e590

Please sign in to comment.