From 56bbc4a2910a1f9802f77a0f9248218af3d01eae Mon Sep 17 00:00:00 2001 From: SwissalpS Date: Sun, 28 Jun 2020 16:33:35 +0200 Subject: provide getter method for current scale --- plugins/scale.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/scale.lua b/plugins/scale.lua index 95c4009..e0b5aa0 100644 --- a/plugins/scale.lua +++ b/plugins/scale.lua @@ -35,6 +35,10 @@ end local current_scale = SCALE local default = current_scale + +local function get_scale() return current_scale end + + local function set_scale(scale) scale = common.clamp(scale, 0.2, 6) @@ -86,4 +90,5 @@ keymap.add { ["ctrl+="] = "scale:increase", } -return { set_scale = set_scale } +return { get_scale = get_scale, set_scale = set_scale } + -- cgit v1.2.3