diff --git a/config/default.nix b/config/default.nix index 3732380..5d1e265 100644 --- a/config/default.nix +++ b/config/default.nix @@ -45,6 +45,7 @@ ./telescope/telescope.nix + ./ui/alpha.nix ./ui/nvim-notify.nix ]; } diff --git a/config/ui/alpha.nix b/config/ui/alpha.nix new file mode 100644 index 0000000..9419986 --- /dev/null +++ b/config/ui/alpha.nix @@ -0,0 +1,199 @@ +{ + plugins.alpha = { + enable = true; + theme = null; + iconsEnabled = true; + layout = let + padding = val: { + type = "padding"; + inherit val; + }; + in [ + (padding 4) + { + opts = { + hl = "AlphaHeader"; + position = "center"; + }; + type = "text"; + val = [ + "nnnn nnnnnnnn vvvvvvv vvvvvvv" + "n:::nn::::::::nnv:::::v v:::::v " + "n::::::::::::::nnv:::::v v:::::v " + "nn:::::::::::::::nv:::::v v:::::v " + " n:::::nnnn:::::n v:::::v v:::::v " + " n::::n n::::n v:::::v v:::::v " + " n::::n n::::n v:::::v:::::v " + " n::::n n::::n v:::::::::v " + " n::::n n::::n v:::::::v " + " n::::n n::::n v:::::v " + " n::::n n::::n v:::v " + " nnnnnn nnnnnn vvv " + " " + " " + " " + " " + " " + " " + " " + ]; + } + (padding 2) + { + type = "button"; + val = " Find File"; + on_press.raw = "require('telescope.builtin').find_files"; + opts = { + # hl = "comment"; + keymap = [ + "n" + "f" + ":Telescope find_files " + { + noremap = true; + silent = true; + nowait = true; + } + ]; + shortcut = "f"; + + position = "center"; + cursor = 3; + width = 38; + align_shortcut = "right"; + hl_shortcut = "Keyword"; + }; + } + (padding 1) + { + type = "button"; + val = " New File"; + on_press.__raw = "function() vim.cmd[[ene]] end"; + opts = { + # hl = "comment"; + keymap = [ + "n" + "n" + ":ene startinsert " + { + noremap = true; + silent = true; + nowait = true; + } + ]; + shortcut = "n"; + + position = "center"; + cursor = 3; + width = 38; + align_shortcut = "right"; + hl_shortcut = "Keyword"; + }; + } + (padding 1) + { + type = "button"; + val = "󰈚 Recent Files"; + on_press.raw = "require('telescope.builtin').oldfiles"; + opts = { + # hl = "comment"; + keymap = [ + "n" + "r" + ":Telescope oldfiles " + { + noremap = true; + silent = true; + nowait = true; + } + ]; + shortcut = "r"; + + position = "center"; + cursor = 3; + width = 38; + align_shortcut = "right"; + hl_shortcut = "Keyword"; + }; + } + (padding 1) + { + type = "button"; + val = "󰈭 Find Word"; + on_press.raw = "require('telescope.builtin').live_grep"; + opts = { + # hl = "comment"; + keymap = [ + "n" + "g" + ":Telescope live_grep " + { + noremap = true; + silent = true; + nowait = true; + } + ]; + shortcut = "g"; + + position = "center"; + cursor = 3; + width = 38; + align_shortcut = "right"; + hl_shortcut = "Keyword"; + }; + } + (padding 1) + { + type = "button"; + val = " Restore Session"; + on_press.raw = "require('persistence').load()"; + opts = { + # hl = "comment"; + keymap = [ + "n" + "s" + ":lua require('persistence').load()" + { + noremap = true; + silent = true; + nowait = true; + } + ]; + shortcut = "s"; + + position = "center"; + cursor = 3; + width = 38; + align_shortcut = "right"; + hl_shortcut = "Keyword"; + }; + } + (padding 1) + { + type = "button"; + val = " Quit Neovim"; + on_press.__raw = "function() vim.cmd[[qa]] end"; + opts = { + # hl = "comment"; + keymap = [ + "n" + "q" + ":qa" + { + noremap = true; + silent = true; + nowait = true; + } + ]; + shortcut = "q"; + + position = "center"; + cursor = 3; + width = 38; + align_shortcut = "right"; + hl_shortcut = "Keyword"; + }; + } + ]; + }; +}