Skip to content
This repository was archived by the owner on Jun 21, 2024. It is now read-only.

Commit c647b3d

Browse files
committed
Use icons from forked repo's releases for WSL notifications
1 parent 8c916dc commit c647b3d

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

.bash_aliases

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,21 @@ after_command ()
109109
if [[ -n $running_on_WSL ]]
110110
then
111111

112-
# https://github.com/go-toast/toast
113-
/mnt/c/Users/vpaij/Downloads/toast64.exe --app-id "Windows Terminal" -t "CLI Ready" -m "$command ($delay_notif)"
112+
# https://github.com/tfpf/toast
113+
if [[ $exit_status -eq 0 ]]
114+
then
115+
local icon='C:\Users\vpaij\Downloads\toast\icon-tick-transparent.png'
116+
else
117+
local icon='C:\Users\vpaij\Downloads\toast\icon-cross-transparent.png'
118+
fi
119+
/mnt/c/Users/vpaij/Downloads/toast/toast64.exe --app-id "Windows Terminal" -t "CLI Ready" -m "$command ($delay_notif)" -i $icon
114120
else
115-
[[ $exit_status -eq 0 ]] && local icon=dialog-information || local icon=dialog-error
121+
if [[ $exit_status -eq 0 ]]
122+
then
123+
local icon=dialog-information
124+
else
125+
local icon=dialog-error
126+
fi
116127
notify-send -i $icon -t 8000 "CLI Ready" "$command\n$delay_notif"
117128
fi
118129
printf "%*s\n" $COLUMNS "$command ($delay_notif)"

0 commit comments

Comments
 (0)