Add aclicky-recordmouseposition and aclicky-doclicks
This commit is contained in:
parent
9311a44d70
commit
ddaefad011
13
aclicky-doclicks
Executable file
13
aclicky-doclicks
Executable file
@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env ruby
|
||||
|
||||
require "open3"
|
||||
|
||||
points = File.read("#{ENV["HOME"]}/aclicky-points")
|
||||
points.each_line do |line|
|
||||
if line =~ /^(\d+),(\d+)$/
|
||||
x, y = $1, $2
|
||||
Open3.capture3("xdotool mousemove #{x} #{y}")
|
||||
Open3.capture3("xdotool click 1")
|
||||
sleep(0.2)
|
||||
end
|
||||
end
|
9
aclicky-recordmouseposition
Executable file
9
aclicky-recordmouseposition
Executable file
@ -0,0 +1,9 @@
|
||||
#!/usr/bin/env ruby
|
||||
|
||||
o = `xdotool getmouselocation`
|
||||
if o =~ /x:(\d+) y:(\d+)/
|
||||
x, y = $1, $2
|
||||
File.open("#{ENV["HOME"]}/aclicky-points", "a") do |fh|
|
||||
fh.puts("#{x},#{y}")
|
||||
end
|
||||
end
|
Loading…
x
Reference in New Issue
Block a user