-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexec_cmd.sh
More file actions
executable file
·41 lines (30 loc) · 1.03 KB
/
exec_cmd.sh
File metadata and controls
executable file
·41 lines (30 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/bash
# get the window_id for the current active window
win_id="$(xdotool getwindowfocus)"
# Get the x and y coords for the current window, top left-hand corner.
x=$(xwininfo -id $win_id | awk '/Abs.+X/ { sub(/^.+\s/,""); print }')
y=$(xwininfo -id $win_id | awk '/Abs.+Y/ { sub(/^.+\s/,""); print }')
# Shift the coords by 30 pixels, down and across.
(( x=6780 , y=2332 ))
# Move the current window to the new coords, $x $y.
xdotool getwindowfocus windowmove $x $y
xdotool windowsize $(xdotool getactivewindow) 2400 1331
source /home/danilo/.bashrc
printf 0x%x "$(xdotool getwindowfocus)" > "/home/danilo/scripts/win_$1"
cmd="$(/home/danilo/scripts/get_value_json.py /home/danilo/scripts/scmds.json $1 cmd)"
time="$(/home/danilo/scripts/get_value_json.py /home/danilo/scripts/scmds.json $1 time)"
echo "
#
# $cmd
#
"
gsettings set org.gtk.Settings.Debug enable-inspector-keybinding true
eval $cmd
gsettings set org.gtk.Settings.Debug enable-inspector-keybinding false
echo "
#
#
#
"
read "-t$time" -p "Press enter to continue"
exit