ftp -o - https://jcs.org/move_in | sh -

irc: warn me if quartz python module is not installed

+13 -2
+13 -2
bin/irc
··· 1 1 #!/bin/sh 2 2 3 + # doas pip3 install pyobjc-framework-Quartz 4 + if [ X`uname -s` = X"Darwin" ]; then 5 + python3 -c 'import sys, Quartz, time' 6 + if [ $? -ne 0 ]; then 7 + echo "" 8 + echo "Quartz python module not installed" 9 + echo "pip3 install pyobjc-framework-Quartz" 10 + echo "" 11 + exit 1 12 + fi 13 + fi 14 + 3 15 while :; do 4 16 host jcs.org > /dev/null 2>&1 5 17 if [ $? -eq 0 ]; then 6 - 7 18 env SSH_AUTH_SOCK= ssh -t \ 8 19 -o ServerAliveInterval=5 \ 9 20 -o ServerAliveCountMax=3 \ ··· 19 30 # wait until screen is not locked 20 31 sleep 1 21 32 if [ X`uname -s` = X"Darwin" ]; then 22 - python -c 'import sys, Quartz, time 33 + python3 -c 'import sys, Quartz, time 23 34 while True: 24 35 d = Quartz.CGSessionCopyCurrentDictionary() 25 36 if d.get("CGSSessionScreenIsLocked", 0) == 0: