diff --git a/config/nvim/lua/keymaps.lua b/config/nvim/lua/keymaps.lua index e99b1443..41e1aa05 100644 --- a/config/nvim/lua/keymaps.lua +++ b/config/nvim/lua/keymaps.lua @@ -19,6 +19,8 @@ vim.keymap.set("n", "fz", "Telescope current_buffer_fuzzy_find" -- Neotree vim.keymap.set("n", "n", "Neotree toggle") +vim.keymap.set("n", "g", "Neotree git_status") +vim.keymap.set("n", "b", "Neotree buffers") vim.keymap.set("n", "\\", "Neotree reveal") -- Trouble diff --git a/config/wezterm/status.lua b/config/wezterm/status.lua index da1c4205..b77989a1 100644 --- a/config/wezterm/status.lua +++ b/config/wezterm/status.lua @@ -3,11 +3,11 @@ local wezterm = require("wezterm") -- Equivalent to POSIX basename(3) -- Given "/foo/bar" returns "bar" -- Given "c:\\foo\\bar" returns "bar" -function basename(s) - return string.gsub(s, "(.*[/\\])(.*)", "%2") -end +-- function basename(s) +-- return string.gsub(s, "(.*[/\\])(.*)", "%2") +-- end -wezterm.on("update-right-status", function(window, pane) +wezterm.on("update-right-status", function(window, _) local scheme = wezterm.color.get_builtin_schemes()["Catppuccin Macchiato"] -- Each element holds the text for a cell in a "powerline" style << fade local cells = {} @@ -34,10 +34,8 @@ wezterm.on("update-right-status", function(window, pane) table.insert(cells, string.format("%.0f%%", b.state_of_charge * 100)) end - -- The powerline ( symbol - local LEFT_SEP = utf8.char(0xe0b7) - -- The filled in variant of the ( symbol - local SOLID_LEFT_SEP = utf8.char(0xe0b6) + -- The filled in variant of the powerline ( symbol + local SOLID_LEFT_SEP = require("utf8").char(0xe0b6) -- Foreground color for the text across the fade local text_fg = scheme.foreground @@ -61,7 +59,7 @@ wezterm.on("update-right-status", function(window, pane) local cell_no = num_cells + 1 table.insert(elements, { Foreground = { Color = text_fg } }) table.insert(elements, { Background = { Color = colours[cell_no] } }) - table.insert(elements, { Text = " " .. text .. " " }) + table.insert(elements, { Text = text .. " " }) if not is_last then table.insert(elements, { Foreground = { Color = colours[cell_no + 1] } }) table.insert(elements, { Text = SOLID_LEFT_SEP })