summary refs log tree commit diff
path: root/.config/mpv/scripts/mouse_coords.lua
diff options
context:
space:
mode:
authorRobert Günzler <r@gnzler.io>2026-02-10 12:32:48 +0100
committerRobert Günzler <r@gnzler.io>2026-02-10 12:41:25 +0100
commit63feeb9f369fc6176e85c1c2d8fcc863caad1946 (patch)
tree41cd5d2d1ec36e74e464caab722cc9b460153f04 /.config/mpv/scripts/mouse_coords.lua
parent5bd0a4aca65ecb9818ef1285982d160b6b6ff665 (diff)
start new
Signed-off-by: Robert Günzler <r@gnzler.io>
Diffstat (limited to '.config/mpv/scripts/mouse_coords.lua')
-rw-r--r--.config/mpv/scripts/mouse_coords.lua41
1 files changed, 0 insertions, 41 deletions
diff --git a/.config/mpv/scripts/mouse_coords.lua b/.config/mpv/scripts/mouse_coords.lua
deleted file mode 100644
index b2a2a65..0000000
--- a/.config/mpv/scripts/mouse_coords.lua
+++ /dev/null
@@ -1,41 +0,0 @@
-local msg = require("mp.msg")
-
--- local x, y = 0, 0
-
--- function set_marker()
---     x, y = mp.get_mouse_pos()
--- end
-
--- function measure()
---     x2, y2 = mp.get_mouse_pos()
---     w = x2-x
---     h = y2-y
-
---     pos = "x: " .. x .. ", y:" .. y
---     dimensions = "w: " .. h .. ", h:" .. h
---     output = pos .. " | " .. dimensions
-
---     mp.msg.warn(output)
---     mp.osd_message(output)
--- end
-
-function print_pos()
-	dw = mp.get_property_number("dwidth")
-	dh = mp.get_property_number("dheight")
-	ow, oh = mp.get_osd_size()
-
-	wr = math.floor(ow / dw)
-	hr = math.floor(oh / dh)
-
-	mx, my = mp.get_mouse_pos()
-	x = math.floor(mx / wr)
-	y = math.floor(my / hr)
-
-	pos = dw .. "x" .. dh .. " " .. x .. "," .. y
-	mp.msg.warn(pos)
-	mp.osd_message(pos)
-end
-
-mp.add_key_binding("0", mp.get_script_name(), print_pos)
--- mp.add_key_binding("8", mp.get_script_name().."/set", set_marker)
--- mp.add_key_binding("9", mp.get_script_name().."/measure", measure)