Checks that notify-send is available before running it

master
Jonathan Hodgson 5 years ago
parent 52795ad633
commit 908909c704
  1. 2
      examples/stty-resize-copy

@ -5,5 +5,5 @@
columns=$(stty -a < /dev/stdin | grep -oE 'columns [0-9]+' | cut -d' ' -f2)
rows=$(stty -a < /dev/stdin | grep -oE 'rows [0-9]+' | cut -d' ' -f2)
notify-send "Terminal dimensions" "Rows: $rows\nColumns: $columns\nstty command on clipboard"
type notify-send > /dev/null 2>&1 && notify-send "Terminal dimensions" "Rows: $rows\nColumns: $columns\nstty command on clipboard"
echo "stty rows $rows cols $columns" | xclip -i -selection clipboard

Loading…
Cancel
Save