alacritty: make configs work under plasma

This commit is contained in:
Sean Buckley 2021-11-02 17:33:58 -04:00
parent ad31a423c2
commit 253dc6d4cf

View file

@ -7,16 +7,12 @@ in
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
environment.systemPackages = [ pkgs.alacritty ]; environment.systemPackages = [
pkgs.alacritty
programs.bash.interactiveShellInit = '' (pkgs.writeTextFile {
function _set_title() { name = "alacritty.yml";
printf "\033]0;%s@%s:%s\007" "''${USER}" "''${HOSTNAME%%.*}" "''${PWD/#$HOME/\~}" destination = "/etc/xdg/alacritty.yml";
} text = ''
[ -z "$VTE_VERSION" ] && PROMPT_COMMAND="_set_title; $PROMPT_COMMAND"
'';
environment.etc."xdg/alacritty.yml".text = ''
env: env:
TERM: xterm-256color TERM: xterm-256color
key_bindings: key_bindings:
@ -25,6 +21,18 @@ in
- { key: PageUp, mods: Shift, action: ScrollHalfPageUp } - { key: PageUp, mods: Shift, action: ScrollHalfPageUp }
- { key: PageDown, mods: Shift, action: ScrollHalfPageDown } - { key: PageDown, mods: Shift, action: ScrollHalfPageDown }
''; '';
})
];
programs.bash.interactiveShellInit = ''
function _set_title() {
printf "\033]0;%s@%s:%s\007" "''${USER}" "''${HOSTNAME%%.*}" "''${PWD/#$HOME/\~}"
}
[ -z "$VTE_VERSION" ] && PROMPT_COMMAND="_set_title; $PROMPT_COMMAND"
'';
environment.etc."xdg/alacritty.yml".source =
"/run/current-system/sw/etc/xdg/alacritty.yml";
}; };
} }