diff --git a/assets/default/fish/custom/_omf-plugins.load b/assets/default/fish/custom/_omf-plugins.load index 9d3101f..dae7e23 100644 --- a/assets/default/fish/custom/_omf-plugins.load +++ b/assets/default/fish/custom/_omf-plugins.load @@ -10,3 +10,4 @@ Plugin "osx" Plugin "pbcopy" Plugin "port" Plugin "force" +Plugin "notify-funcs" diff --git a/assets/default/fish/custom/plugins/notify-funcs/notify-failure.fish b/assets/default/fish/custom/plugins/notify-funcs/notify-failure.fish new file mode 100644 index 0000000..99614e8 --- /dev/null +++ b/assets/default/fish/custom/plugins/notify-funcs/notify-failure.fish @@ -0,0 +1,3 @@ +function notify-fail --description "Notify a failure message" + terminal-notifier -message "Failure" +end diff --git a/assets/default/fish/custom/plugins/notify-funcs/notify-result.fish b/assets/default/fish/custom/plugins/notify-funcs/notify-result.fish new file mode 100644 index 0000000..7d44833 --- /dev/null +++ b/assets/default/fish/custom/plugins/notify-funcs/notify-result.fish @@ -0,0 +1,7 @@ +function notify-result --description "Notify success or failure depending on the result of the previous command" + if [ $status -eq 0 ] + notify-success + else + notify-fail + end +end diff --git a/assets/default/fish/custom/plugins/notify-funcs/notify-success.fish b/assets/default/fish/custom/plugins/notify-funcs/notify-success.fish new file mode 100644 index 0000000..984404d --- /dev/null +++ b/assets/default/fish/custom/plugins/notify-funcs/notify-success.fish @@ -0,0 +1,3 @@ +function notify-success --description "Notify a success message" + terminal-notifier -message "Success" +end