1 { config, lib, pkgs, ... }:
6 cfg = config.programs.bash.undistractMe;
10 programs.bash.undistractMe = {
11 enable = mkEnableOption (lib.mdDoc "notifications when long-running terminal commands complete");
13 playSound = mkEnableOption (lib.mdDoc "notification sounds when long-running terminal commands complete");
17 description = lib.mdDoc ''
18 Number of seconds it would take for a command to be considered long-running.
25 config = mkIf cfg.enable {
26 programs.bash.promptPluginInit = ''
27 export LONG_RUNNING_COMMAND_TIMEOUT=${toString cfg.timeout}
28 export UDM_PLAY_SOUND=${if cfg.playSound then "1" else "0"}
29 . "${pkgs.undistract-me}/etc/profile.d/undistract-me.sh"
34 maintainers = with maintainers; [ kira-bruneau ];