Last active
March 11, 2020 23:14
-
-
Save doyousketch2/38a070653f358bbe238a3e853ba3ef48 to your computer and use it in GitHub Desktop.
KeepAlive for Terminal session
This file contains 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
#! /bin/bash | |
active=true | |
while $active | |
do | |
window_id=`xdotool search --title "Terminal"` | |
if [ $window_id ] ; then | |
xdotool windowactivate $window_id | |
xdotool type clear | |
xdotool key Enter | |
windowminimize | |
sleep 300 ## wait 5 mins | |
else | |
$active=false | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment