Created
January 28, 2020 21:33
-
-
Save blackarcher21/1a29d160d4836b7ba0dc273a0a5d4904 to your computer and use it in GitHub Desktop.
mpv script - change window scale based on current scale, use ctrl+scroll to scale
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local step = 0.050 | |
function f_scale(x,y) | |
local scale = mp.get_property("current-window-scale") | |
if not scale then | |
return | |
end | |
mp.set_property("window-scale", scale + (x*y)) | |
end | |
mp.add_key_binding("Ctrl+WHEEL_UP", "upscale", function() f_scale(step,1) end) | |
mp.add_key_binding("Ctrl+WHEEL_DOWN", "downscale", function() f_scale(step,-1) end) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment