Skip to content

Commit

Permalink
Fix problem with terminal-notifier
Browse files Browse the repository at this point in the history
  • Loading branch information
franciscolourenco committed Oct 7, 2019
1 parent 05d69d5 commit ac8f966
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions conf.d/done.fish
Original file line number Diff line number Diff line change
Expand Up @@ -84,20 +84,14 @@ and count (__done_get_focused_window_id) > /dev/null # is able to get window id
set -l message "$wd/ $history[1]"
set -l sender $__done_initial_window_id

# workarout terminal notifier bug when sending notifications from inside tmux
# https://github.com/julienXX/terminal-notifier/issues/216
if test $TMUX
set sender "tmux"
end

if test $exit_status -ne 0
set title "Failed ($exit_status) after $humanized_duration"
end

if set -q __done_notification_command
eval $__done_notification_command
else if type -q terminal-notifier # https://github.com/julienXX/terminal-notifier
terminal-notifier -message "$message" -title "$title" -sender "$sender" -activate "$__done_initial_window_id"
terminal-notifier -message "$message" -title "$title" -sender "$__done_initial_window_id"

else if type -q osascript # AppleScript
osascript -e "display notification \"$message\" with title \"$title\""
Expand Down

0 comments on commit ac8f966

Please sign in to comment.