1 { config, lib, pkgs, ... }:
4 cfg = config.programs.bash.undistractMe;
8 programs.bash.undistractMe = {
9 enable = lib.mkEnableOption "notifications when long-running terminal commands complete";
11 playSound = lib.mkEnableOption "notification sounds when long-running terminal commands complete";
13 timeout = lib.mkOption {
16 Number of seconds it would take for a command to be considered long-running.
23 config = lib.mkIf cfg.enable {
24 programs.bash.promptPluginInit = ''
25 export LONG_RUNNING_COMMAND_TIMEOUT=${builtins.toString cfg.timeout}
26 export UDM_PLAY_SOUND=${if cfg.playSound then "1" else "0"}
27 . "${pkgs.undistract-me}/etc/profile.d/undistract-me.sh"
32 maintainers = with lib.maintainers; [ kira-bruneau ];