Last active
February 3, 2021 10:47
-
-
Save WengerK/ad0c1330966522c05f504d71d29f675b to your computer and use it in GitHub Desktop.
Revisions
-
WengerK revised this gist
Aug 16, 2016 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,5 @@ # Article Ressources - MacOS - Trigger Notification Center when long running commands finishes This is the Gist repository for my article **MacOS - Trigger Notification Center when long running commands finishes**. Be aware that this article has been wrote for the Blog of [Antistatique](https://antistatique.net) — Web Agency in Lausanne, Switzerland. A place where I work as Full Stack Web Developer. -
WengerK revised this gist
Aug 6, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,4 +2,4 @@ This is the Gist repository for my article **MacOS - Trigger Notification Center Be aware that this article has been wrote for the Blog of [Antistatique](https://antistatique.net) — Web Agency in Lausanne, Switzerland. A place where I work as Full Stack Web Developer. Feel free to read it the full article on [Medium](https://medium.com/@WengerK/cli-trigger-notif-c98ca4d0ab30#.9e8pjo8vk) or check it out on [Antistatique](https://antistatique.net/fr/node/343). -
WengerK revised this gist
Aug 3, 2016 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,4 +3,5 @@ function f_notifyme { CMD=$(fc -ln -1) # No point in waiting for the command to complete notify "$CMD" "$LAST_EXIT_CODE" & } export PS1='$(f_notifyme)'$PS1 -
WengerK revised this gist
Jul 29, 2016 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,5 @@ #!/usr/bin/env osascript on run argv tell application "System Events" set frontApp to name of first application process whose frontmost is true -
WengerK revised this gist
Jul 27, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ This is the Gist repository for my article **MacOS - Trigger Notification Center when long running commands finishes**. Be aware that this article has been wrote for the Blog of [Antistatique](https://antistatique.net) — Web Agency in Lausanne, Switzerland. A place where I work as Full Stack Web Developer. -
WengerK renamed this gist
Jul 27, 2016 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
WengerK created this gist
Jul 27, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,5 @@ This is the Gist repository for my article **Drupal 8 — Differences between Configuration API & State API**. Be aware that this article has been wrote for the Blog of [Antistatique](https://antistatique.net) — Web Agency in Lausanne, Switzerland. A place where I work as Full Stack Web Developer. Feel free to read it the full article on [Medium](https://medium.com/@WengerK/macos-trigger-notification-center-when-long-running-commands-finishes) or check it out on [Antistatique](http://antistatique.dev/en/we/blog/2016/07/08/macos-trigger-notification-center-when-long-running-commands-finishes). This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,6 @@ function f_notifyme { LAST_EXIT_CODE=$? CMD=$(fc -ln -1) # No point in waiting for the command to complete notify "$CMD" "$LAST_EXIT_CODE" & } This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ on run argv tell application "System Events" set frontApp to name of first application process whose frontmost is true if frontApp is not "iTerm2" then set notifTitle to item 1 of argv set notifBody to "succeded" set errorCode to item 2 of argv if errorCode is not "0" set notifBody to "failed with error code " & errorCode end if display notification notifBody with title notifTitle end if end tell end run