![]() ![]() There are also escape codes for manipulating windows (move, set size, zoom, minimize, etc.). Sit in a loop, flashing the screen: while true do printf '\e[?5h' sleep 1 printf '\e[?5l' sleep 1 done Paint the display red: tput setab 1 tput clear ![]() In addition, you could display something in the terminal to catch your attention (which would be visible even in minimized windows). This is especially useful when Dock magnification is turned on or you have room for a large Dock. This can be used to see whether there's activity, or even to determine what the terminal is doing, if the output you're looking for is identifiable (e.g., a "top" display is fairly easy to recognize even at small sizes). Minimized terminal windows show live content in their Dock icons. Unread: unread text is indicated with an ellipsis. If Terminal itself is in the background, it also bounces its Dock icon when a bell is played.Īctivity: activity is indicated by displaying the name of the foreground process. In addition, Terminal displays a red badge on the application icon, indicating the number of "unread" alerts/bells in all terminals. When you select the tab, the indicator is cleared.Īlert: a "bell" is displayed to indicate when a BEL has been written to background tabs or background windows. Unread: an ellipsis "…" is displayed to indicate new, unread text in background tabs. (Or, of course, you can use it to tell when it has begun producing output after silently performing work for a while.) This enables you to see whether it is currently busy or has completed a long process. If you go to System Preferences > Notifications > terminal-notifier and change the alert style to "Alerts", the notification will persist until you dismiss it.Īs of Mac OS X Lion 10.7, Terminal has some new status indicators to help with issues like this:Īctivity: an activity indicator (spinning progress indicator) is displayed when there's been recent output to the terminal. When you click the notification, it will activate Terminal. Once the long-running task finishes you'll get a nice modal popup: Or, incorporating Austin Lucas' answer, you can add a sound and icon badge with tput bel: alias notifyDone='tput bel terminal-notifier -title "Terminal" -message "Done with task! Exit status: $?"' -activate bash_profile: alias notifyDone='terminal-notifier -title "Terminal" -message "Done with task! Exit status: $?"' -activate To simplify the common use-case of just caring about the fact of something in the terminal being done, add an alias to your. There's a tool called terminal-notifier that you can download or install using Homebrew or Rubygems, e.g.: brew install terminal-notifier In Mac OS 10.8 and above you can send yourself Notification Center messages. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |