fix to aerc running with kitty instead of wezterm

This commit is contained in:
Noah Masur 2024-12-12 20:52:20 -05:00
parent b691895e05
commit 11625adbe8
No known key found for this signature in database
3 changed files with 23 additions and 19 deletions

View File

@ -30,6 +30,7 @@
};
terminal = "${pkgs.wezterm}/bin/wezterm";
terminalLaunchCommand = "${config.terminal} start --";
home-manager.users.${config.user} = {

View File

@ -169,7 +169,8 @@
filters = {
"text/plain" = "${pkgs.aerc}/libexec/aerc/filters/colorize";
"text/calendar" = "${pkgs.gawk}/bin/awk -f ${pkgs.aerc}/libexec/aerc/filters/calendar";
"text/html" = "${pkgs.aerc}/libexec/aerc/filters/html | ${pkgs.aerc}/libexec/aerc/filters/colorize"; # Requires w3m, dante
"text/html" =
"${pkgs.aerc}/libexec/aerc/filters/html | ${pkgs.aerc}/libexec/aerc/filters/colorize"; # Requires w3m, dante
# "text/*" =
# ''${pkgs.bat}/bin/bat -fP --file-name="$AERC_FILENAME "'';
"message/delivery-status" = "${pkgs.aerc}/libexec/aerc/filters/colorize";
@ -192,20 +193,17 @@
xdg.desktopEntries.aerc = lib.mkIf (pkgs.stdenv.isLinux && config.gui.enable) {
name = "aerc";
exec = "${config.terminal} aerc %u";
exec = "${config.terminalLaunchCommand} aerc %u";
};
xsession.windowManager.i3.config.keybindings = lib.mkIf pkgs.stdenv.isLinux {
"${
config.home-manager.users.${config.user}.xsession.windowManager.i3.config.modifier
}+Shift+e" = "exec ${
"${config.home-manager.users.${config.user}.xsession.windowManager.i3.config.modifier}+Shift+e" =
"exec ${
# Don't name the script `aerc` or it will affect grep
builtins.toString (
pkgs.writeShellScript "focus-mail.sh" ''
count=$(ps aux | grep -c aerc)
if [ "$count" -eq 1 ]; then
i3-msg "exec --no-startup-id ${
config.home-manager.users.${config.user}.programs.rofi.terminal
} --class aerc aerc"
i3-msg "exec --no-startup-id ${config.terminal} start --class aerc -- aerc"
sleep 0.25
fi
i3-msg "[class=aerc] focus"

View File

@ -51,6 +51,11 @@
description = "Path to executable for terminal emulator program.";
default = null;
};
terminalLaunchCommand = lib.mkOption {
type = lib.types.nullOr lib.types.str;
description = "Command for using the terminal to launch a new window with a program.";
default = null;
};
wallpaper = lib.mkOption {
type = lib.types.path;
description = "Wallpaper background image file";