From b90f81ee07ff17762ed74312901766efd37f4230 Mon Sep 17 00:00:00 2001 From: Asara Date: Sat, 30 Mar 2024 15:53:17 -0400 Subject: [PATCH] update dashboard, add unzip to bootstrap --- .config/nvim/lua/plugins/dash.lua | 63 +++++++++++++++++++++++++++++++ bootstrap.sh | 1 + 2 files changed, 64 insertions(+) create mode 100644 .config/nvim/lua/plugins/dash.lua diff --git a/.config/nvim/lua/plugins/dash.lua b/.config/nvim/lua/plugins/dash.lua new file mode 100644 index 0000000..2f655a3 --- /dev/null +++ b/.config/nvim/lua/plugins/dash.lua @@ -0,0 +1,63 @@ +return { + "nvimdev/dashboard-nvim", + event = "VimEnter", + opts = function() + local logo = [[ + __ _ __ _ + / / | | / / | | + / /__| | ___ __ __ / /__ __ _ _ | | + / // _` | / _ \\ \ / // / \ \ / /| | | || | + / /| (_| || __/ \ V // / \ V / | |_| || | +/_/ \__,_| \___| \_//_/ \_/ \__,_||_| + ]] + + logo = string.rep("\n", 8) .. logo .. "\n\n" + + local opts = { + theme = "doom", + hide = { + -- this is taken care of by lualine + -- enabling this messes up the actual laststatus setting after loading a file + statusline = false, + }, + config = { + header = vim.split(logo, "\n"), + -- stylua: ignore + center = { + { action = LazyVim.telescope("files"), desc = " Find File", icon = " ", key = "f" }, + { action = "ene | startinsert", desc = " New File", icon = " ", key = "n" }, + { action = "Telescope oldfiles", desc = " Recent Files", icon = " ", key = "r" }, + { action = "Telescope live_grep", desc = " Find Text", icon = " ", key = "g" }, + { action = [[lua LazyVim.telescope.config_files()()]], desc = " Config", icon = " ", key = "c" }, + { action = 'lua require("persistence").load()', desc = " Restore Session", icon = " ", key = "s" }, + { action = "LazyExtras", desc = " Lazy Extras", icon = " ", key = "x" }, + { action = "Lazy", desc = " Lazy", icon = "󰒲 ", key = "l" }, + { action = "qa", desc = " Quit", icon = " ", key = "q" }, + }, + footer = function() + local stats = require("lazy").stats() + local ms = (math.floor(stats.startuptime * 100 + 0.5) / 100) + return { "⚡ Neovim loaded " .. stats.loaded .. "/" .. stats.count .. " plugins in " .. ms .. "ms" } + end, + }, + } + + for _, button in ipairs(opts.config.center) do + button.desc = button.desc .. string.rep(" ", 43 - #button.desc) + button.key_format = " %s" + end + + -- close Lazy and re-open when the dashboard is ready + if vim.o.filetype == "lazy" then + vim.cmd.close() + vim.api.nvim_create_autocmd("User", { + pattern = "DashboardLoaded", + callback = function() + require("lazy").show() + end, + }) + end + + return opts + end, +} diff --git a/bootstrap.sh b/bootstrap.sh index ef1f11b..a08a5fc 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -23,6 +23,7 @@ sudo apt install \ sway \ swaylock \ tmux \ + unzip \ waybar \ wireplumber \ wl-clipboard \