Initial commit with translated description

This commit is contained in:
2026-03-29 09:39:00 +08:00
commit 952514b082
4 changed files with 138 additions and 0 deletions

37
scripts/gui_action.sh Normal file
View File

@@ -0,0 +1,37 @@
#!/bin/bash
# A simple wrapper for xdotool and wmctrl actions.
# Usage: ./gui_action.sh <action> <args...>
ACTION=$1
shift
case $ACTION in
click)
# click x y
xdotool mousemove --sync "$1" "$2" click 1
;;
type)
# type "text"
xdotool type "$1"
;;
key)
# key "Return"
xdotool key "$1"
;;
activate)
# activate "Window Name"
wmctrl -a "$1"
;;
list-windows)
wmctrl -l
;;
screenshot)
# screenshot filename
scrot -z "$1"
;;
*)
echo "Unknown action: $ACTION"
exit 1
;;
esac