diff options
author | rxi <rxi@users.noreply.github.com> | 2020-05-01 18:56:53 +0100 |
---|---|---|
committer | rxi <rxi@users.noreply.github.com> | 2020-05-01 18:56:53 +0100 |
commit | 729168daf68170bb2216ec69008bcd66867c00da (patch) | |
tree | ed338cb10dba2e382b87b892272bb5f516fcb433 /plugins/hidestatus.lua | |
parent | 378844cfbb2b7a1489a3344e2d6a996aa2aa53aa (diff) | |
download | lite-xl-plugins-729168daf68170bb2216ec69008bcd66867c00da.tar.gz lite-xl-plugins-729168daf68170bb2216ec69008bcd66867c00da.zip |
Added `hidestatus` plugin
Diffstat (limited to 'plugins/hidestatus.lua')
-rw-r--r-- | plugins/hidestatus.lua | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/plugins/hidestatus.lua b/plugins/hidestatus.lua new file mode 100644 index 0000000..5c0bb15 --- /dev/null +++ b/plugins/hidestatus.lua @@ -0,0 +1,18 @@ +local command = require "core.command" +local StatusView = require "core.statusview" + +local visible = false +local funcs = { + [true] = StatusView.update, + [false] = function(self) self.size.y = 0 end, +} + +function StatusView:update(...) + funcs[visible](self, ...) +end + +command.add(nil, { + ["hide-status:toggle"] = function() visible = not visible end, + ["hide-status:hide"] = function() visible = false end, + ["hide-status:show"] = function() visible = true end, +}) |