
Use a bash script to automate mousepad by activating the window and typing text with xdotool. Handle spaces with quotes, add new lines, and manage the save prompt.
Master Linux desktop automation by inserting dates with a keyboard shortcut using date variables and formatting. Bind the script to a global shortcut that works in any program.
To record, you can use the 'rec' command defined below
alias rec='notify-send "Recording 1 minute"; cnee --record -o events.xnr --str 60 --keyboard --mouse; notify-send "Finished recording"'
To replay, use the 'replay' command below
alias replay='notify-send "Replay recording"; cnee --replay -f events.xnr; notify-send "Finished replay"'
Save the settings in .bashrc or .zshrc, because otherwise they would be gone the next time you start a terminal
Learn how to automate your Linux desktop with Bash scripting. This includes moving the mouse, windows, clicking around or even login to systems remotely (over ssh) and take over the desktop all from a bash script.
Do you want to move your bash scripting to the next level and automate the Linux desktop? enroll today!