Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #check if xdotool is installed
- if [ ! -n "$(dpkg -s xdotool 2>/dev/null | grep 'Status: install ok installed')" ]; then
- echo -e "The package 'xdotool' must to be installed before to run $(basename $0)\nUse 'sudo apt-get install xdotool' command in terminal to install it."
- exit
- fi
- delay=5 #change as you wish
- echo "Press Ctrl+C to finish"
- #start with workspace 0 (top left)
- xdotool key Ctrl+Alt+Left
- xdotool key Ctrl+Alt+Up
- #switch workspaces
- while : ; do
- workspace_nr=0
- until [ $workspace_nr = 4 ]; do
- sleep $delay
- case $workspace_nr in
- 0) xdotool key Ctrl+Alt+Right ;;
- 1) xdotool key Ctrl+Alt+Down ;;
- 2) xdotool key Ctrl+Alt+Left ;;
- 3) xdotool key Ctrl+Alt+Up ;;
- esac
- ((workspace_nr++))
- done
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement