shell dot on steroids https://pagure.io/shellfu

_pretty_notify.sh 616B

123456789101112131415161718192021222324252627282930
  1. #!/bin/bash
  2. _pretty__debug() {
  3. local decor="()"
  4. local caller_is_main=${caller_is_main:-false}
  5. local caller=${caller:-UNKNOWN}
  6. $caller_is_main && decor=
  7. notify-send -u low -a "${0##*/}" debug "debug:$caller$decor: $(cat)"
  8. }
  9. _pretty__die() {
  10. notify-send -u critical -a "${0##*/}" fatal "$(cat)"
  11. }
  12. _pretty__mkhelp() {
  13. notify-send -a "${0##*/}" help "$(cat)"
  14. }
  15. _pretty__mkusage() {
  16. notify-send -u critical -a "${0##*/}" usage "$(cat)"
  17. }
  18. _pretty__think() {
  19. notify-send -a "${0##*/}" info "$(cat)"
  20. }
  21. _pretty__warn() {
  22. notify-send -u critical -a "${0##*/}" warning "$(cat)"
  23. }