Created
July 19, 2022 23:09
-
-
Save ivanrad/6b152f874c192d33fdf5f4d865ada04e to your computer and use it in GitHub Desktop.
growl style notifications using OSC 9
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 characters
#!/usr/bin/env bash | |
if [ $# == 0 ]; then | |
msg=$(cat -) | |
else | |
msg="$@" | |
fi | |
if [ -n "$TMUX" ]; then | |
client_tty=$(tmux display-message -p '#{client_tty}') | |
printf $'\e]9;%s\a' "${msg}" > $client_tty | |
else | |
printf $'\e]9;%s\a' "${msg}" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment