home: firefox: tridactyl: fix 'editorcmd'
All checks were successful
continuous-integration/drone/push Build is passing

Turns out `alacritty` is smarter than `termit` with its handling of
command execution (i.e: actually expects multiple arguments to exec(2)).

So account for the difference in the module.
This commit is contained in:
Bruno BELANYI 2023-02-19 13:58:36 +00:00
parent e667c042cb
commit 5d42f55fc6

View file

@ -1,6 +1,14 @@
{ config, lib, pkgs, ... }:
let
cfg = config.my.home.firefox.tridactyl;
term = config.my.home.terminal.program;
vimCommandLine = {
alacritty = ''-e "vim" "%f" "+normal!%lGzv%c|"'';
# Termite wants the whole command in a single argument...
termite = ''-e "vim %f '+normal!%lGzv%c|'"'';
};
in
{
config = lib.mkIf cfg.enable {
@ -9,11 +17,11 @@ in
editorcmd = lib.concatStringsSep " " [
# Use my configured terminal
config.my.home.terminal.program
term
# Make it easy to pick out with a window class name
"--class tridactyl_editor"
# Open vim with the cursor in the correct position
''-e "vim %f '+normal!%lGzv%c|'"''
vimCommandLine.${term}
];
};
};