Add dev-mode option
- Clean up multi-platform support - Add dev-mode option to load local plugins automatically
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
-- ╭─────────────────────────────────────────────────────────╮
|
||||
-- │ Battery │
|
||||
-- ╰─────────────────────────────────────────────────────────╯
|
||||
|
||||
local M = {}
|
||||
|
||||
local wezterm = WEZTERM
|
||||
|
||||
if DEVMODE then
|
||||
-- Use the local dev plugin
|
||||
BATTERIES = wezterm.plugin.require("file://" .. wezterm.home_dir .. "/projects/battery.wez")
|
||||
else
|
||||
-- Use the remote plugin
|
||||
BATTERIES = wezterm.plugin.require("https://github.com/rootiest/battery.wez")
|
||||
end
|
||||
|
||||
-- Invert the icon color brightness
|
||||
BATTERIES.invert = true
|
||||
|
||||
return M
|
||||
+1
-3
@@ -2,9 +2,7 @@ local wezterm = WEZTERM
|
||||
local config = CONFIG
|
||||
local types = require("types")
|
||||
local funcs = require("funcs")
|
||||
local batteries = wezterm.plugin.require("https://github.com/rootiest/battery.wez")
|
||||
--local batteries = wezterm.plugin.require("file:///home/rootiest/projects/battery.wez")
|
||||
batteries.invert = true
|
||||
local batteries = BATTERIES
|
||||
|
||||
local tabline = wezterm.plugin.require("https://github.com/michaelbrusegard/tabline.wez")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user