Skip to content

Instantly share code, notes, and snippets.

@doyousketch2
Last active March 11, 2020 23:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save doyousketch2/38a070653f358bbe238a3e853ba3ef48 to your computer and use it in GitHub Desktop.
Save doyousketch2/38a070653f358bbe238a3e853ba3ef48 to your computer and use it in GitHub Desktop.
KeepAlive for Terminal session
#! /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