Skip to content

Instantly share code, notes, and snippets.

@blackarcher21
blackarcher21 / scroll-to-scale-window.lua
Created January 28, 2020 21:33
mpv script - change window scale based on current scale, use ctrl+scroll to scale
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
@blackarcher21
blackarcher21 / remember-volume.lua
Last active April 12, 2024 15:30
mpv script - remember audio volume
local filepath = mp.command_native({"expand-path", "~~/volume"})
local loadfile = io.open(filepath, "r")
if loadfile then
set_volume = string.sub(loadfile:read(), 8)
loadfile:close()
mp.set_property_number("volume", set_volume)
end
@blackarcher21
blackarcher21 / toolbar.svg
Last active March 11, 2017 08:51
MaterialDesign toolbar for MPC-HC, icons from https://github.com/Templarian/MaterialDesign
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.