dotfiles/.config/fish/conf.d/notification.fish
Sravan Balaji a61cb7c606 Fish Shell CMD Done Notification & Update Startup List
- Remove nyrna from startup list
- Add udiskie to startup list to automount external drives
- Add command finished notification to fish shell
2022-06-12 11:15:17 -04:00

19 lines
682 B
Fish

# This function allows you to switch to a different task
# when an interactive command takes too long
# by notifying you when it is finished.
#
# It is invoked by the fish shell automatically using its event system.
function __postexec_notify_on_long_running_commands --on-event fish_postexec
set --function interactive_commands 'vim' 'vlc' 'zathura' 'gitk' 'man' 'less'
set --function command (string split ' ' $argv[1])
if contains $command $interactive_commands
# We quit interactive commands manually,
# no need for a notification.
return
end
if test $CMD_DURATION -gt 5000
notify-send 'command finished' "$argv"
end
end