Updated Rofi and Neovim config
This commit is contained in:
parent
0bbd37f3a4
commit
b49db78ed5
@ -8,10 +8,10 @@
|
|||||||
./fixes.nix
|
./fixes.nix
|
||||||
./hypridle.nix
|
./hypridle.nix
|
||||||
./dunst.nix
|
./dunst.nix
|
||||||
|
./rofi.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
rofi
|
|
||||||
kitty
|
kitty
|
||||||
wev
|
wev
|
||||||
brightnessctl
|
brightnessctl
|
||||||
|
116
modules/home/desktop/hyprland/rofi.nix
Normal file
116
modules/home/desktop/hyprland/rofi.nix
Normal file
@ -0,0 +1,116 @@
|
|||||||
|
{ config, ... }:
|
||||||
|
{
|
||||||
|
programs.rofi = {
|
||||||
|
enable = true;
|
||||||
|
theme = let
|
||||||
|
inherit (config.lib.formats.rasi) mkLiteral;
|
||||||
|
in {
|
||||||
|
"*" = {
|
||||||
|
background-color = mkLiteral "#${config.colorScheme.palette.base00}";
|
||||||
|
foreground-color = mkLiteral "#${config.colorScheme.palette.base05}";
|
||||||
|
text-color = mkLiteral "#${config.colorScheme.palette.base07}";
|
||||||
|
border-color = mkLiteral "#${config.colorScheme.palette.base04}";
|
||||||
|
};
|
||||||
|
# Holds the entire window
|
||||||
|
"#window" = {
|
||||||
|
transparency = "real";
|
||||||
|
background-color = mkLiteral "#${config.colorScheme.palette.base00}";
|
||||||
|
text-color = mkLiteral "#${config.colorScheme.palette.base07}";
|
||||||
|
border = mkLiteral "0px";
|
||||||
|
border-color = mkLiteral "#${config.colorScheme.palette.base04}";
|
||||||
|
border-radius = mkLiteral "4px";
|
||||||
|
width = mkLiteral "850px";
|
||||||
|
padding = mkLiteral "8px";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Wrapper around bar and results
|
||||||
|
"#mainbox" = {
|
||||||
|
background-color = mkLiteral "#${config.colorScheme.palette.base00}";
|
||||||
|
border = mkLiteral "0px";
|
||||||
|
border-radius = mkLiteral "0px";
|
||||||
|
border-color = mkLiteral "#${config.colorScheme.palette.base04}";
|
||||||
|
children = map mkLiteral [ "inputbar" "message" "listview" ];
|
||||||
|
spacing = mkLiteral "10px";
|
||||||
|
padding = mkLiteral "10px";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Unknown
|
||||||
|
"#textbox-prompt-colon" = {
|
||||||
|
expand = false;
|
||||||
|
str = ":";
|
||||||
|
margin = mkLiteral "0px 0.3em 0em 0em";
|
||||||
|
text-color = mkLiteral "#${config.colorScheme.palette.base07}";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Command prompt left of the input
|
||||||
|
"#prompt" = { enabled = false; };
|
||||||
|
|
||||||
|
# Actual text box
|
||||||
|
"#entry" = {
|
||||||
|
placeholder-color = mkLiteral "#${config.colorScheme.palette.base03}";
|
||||||
|
expand = true;
|
||||||
|
horizontal-align = "0";
|
||||||
|
placeholder = "";
|
||||||
|
padding = mkLiteral "0px 0px 0px 5px";
|
||||||
|
blink = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Top bar
|
||||||
|
"#inputbar" = {
|
||||||
|
children = map mkLiteral [ "prompt" "entry" ];
|
||||||
|
border = mkLiteral "1px";
|
||||||
|
border-radius = mkLiteral "4px";
|
||||||
|
padding = mkLiteral "6px";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Results
|
||||||
|
"#listview" = {
|
||||||
|
background-color = mkLiteral "#${config.colorScheme.palette.base00}";
|
||||||
|
padding = mkLiteral "0px";
|
||||||
|
columns = 1;
|
||||||
|
lines = 12;
|
||||||
|
spacing = "5px";
|
||||||
|
cycle = true;
|
||||||
|
dynamic = true;
|
||||||
|
layout = "vertical";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Each result
|
||||||
|
"#element" = {
|
||||||
|
orientation = "vertical";
|
||||||
|
border-radius = mkLiteral "0px";
|
||||||
|
padding = mkLiteral "5px 0px 5px 5px";
|
||||||
|
};
|
||||||
|
"#element.selected" = {
|
||||||
|
border = mkLiteral "1px";
|
||||||
|
border-radius = mkLiteral "4px";
|
||||||
|
border-color = mkLiteral "#${config.colorScheme.palette.base07}";
|
||||||
|
background-color = mkLiteral "#${config.colorScheme.palette.base04}";
|
||||||
|
text-color = mkLiteral "#${config.colorScheme.palette.base00}";
|
||||||
|
};
|
||||||
|
|
||||||
|
"#element-text" = {
|
||||||
|
expand = true;
|
||||||
|
# horizontal-align = mkLiteral "0.5";
|
||||||
|
vertical-align = mkLiteral "0.5";
|
||||||
|
margin = mkLiteral "0px 2.5px 0px 2.5px";
|
||||||
|
};
|
||||||
|
"#element-text.selected" = {
|
||||||
|
background-color = mkLiteral "#${config.colorScheme.palette.base04}";
|
||||||
|
text-color = mkLiteral "#${config.colorScheme.palette.base00}";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Not sure how to get icons
|
||||||
|
"#element-icon" = {
|
||||||
|
size = mkLiteral "18px";
|
||||||
|
border = mkLiteral "0px";
|
||||||
|
padding = mkLiteral "2px 5px 2px 2px";
|
||||||
|
background-color = mkLiteral "#${config.colorScheme.palette.base00}";
|
||||||
|
};
|
||||||
|
"#element-icon.selected" = {
|
||||||
|
background-color = mkLiteral "#${config.colorScheme.palette.base04}";
|
||||||
|
text-color = mkLiteral "#${config.colorScheme.palette.base00}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
@ -15,3 +15,10 @@ api.nvim_create_autocmd({
|
|||||||
},
|
},
|
||||||
{ pattern = "*.mcfunction", command = "set filetype=mcfunction" }
|
{ pattern = "*.mcfunction", command = "set filetype=mcfunction" }
|
||||||
)
|
)
|
||||||
|
|
||||||
|
api.nvim_create_autocmd({
|
||||||
|
|
||||||
|
"VimEnter"
|
||||||
|
},
|
||||||
|
{ callback = require('lualine').setup }
|
||||||
|
)
|
||||||
|
@ -119,8 +119,13 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
plugin = bufferline-nvim;
|
plugin = lualine-nvim;
|
||||||
config = toLuaFile ./plugins/bufferline.lua;
|
config = toLuaFile ./plugins/lualine.lua;
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
plugin =harpoon;
|
||||||
|
config = toLuaFile ./plugins/harpoon.lua;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
@ -27,7 +27,7 @@ opt.sessionoptions = { "buffers", "curdir", "tabpages", "winsize" }
|
|||||||
opt.shiftround = true -- Round indent
|
opt.shiftround = true -- Round indent
|
||||||
opt.shiftwidth = 2 -- Size of an indent
|
opt.shiftwidth = 2 -- Size of an indent
|
||||||
opt.shortmess:append({ W = true, I = true, c = true })
|
opt.shortmess:append({ W = true, I = true, c = true })
|
||||||
opt.showmode = false -- Dont show mode since we have a statusline
|
opt.showmode = true -- Dont show mode since we have a statusline
|
||||||
opt.sidescrolloff = 8 -- Columns of context
|
opt.sidescrolloff = 8 -- Columns of context
|
||||||
opt.signcolumn = "yes" -- Always show the signcolumn, otherwise it would shift the text each time
|
opt.signcolumn = "yes" -- Always show the signcolumn, otherwise it would shift the text each time
|
||||||
opt.smartcase = true -- Don't ignore case with capitals
|
opt.smartcase = true -- Don't ignore case with capitals
|
||||||
|
10
modules/home/programs/neovim/plugins/harpoon.lua
Normal file
10
modules/home/programs/neovim/plugins/harpoon.lua
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
local mark = require('harpoon.mark')
|
||||||
|
local ui = require('harpoon.ui')
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<leader>q", mark.add_file)
|
||||||
|
vim.keymap.set("n", "<C-e>", ui.toggle_quick_menu)
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<C-h>", function() ui.nav_file(1) end)
|
||||||
|
vim.keymap.set("n", "<C-t>", function() ui.nav_file(2) end)
|
||||||
|
vim.keymap.set("n", "<C-n>", function() ui.nav_file(3) end)
|
||||||
|
vim.keymap.set("n", "<C-s>", function() ui.nav_file(4) end)
|
@ -3,13 +3,11 @@ require("mason").setup{
|
|||||||
}
|
}
|
||||||
require("mason-lspconfig").setup()
|
require("mason-lspconfig").setup()
|
||||||
require('neodev').setup()
|
require('neodev').setup()
|
||||||
|
require('lsp-inlayhints').setup()
|
||||||
|
|
||||||
local lspconfig = require('lspconfig')
|
local lspconfig = require('lspconfig')
|
||||||
|
|
||||||
vim.g.rustaceanvim = {
|
vim.g.rustaceanvim = {
|
||||||
inlay_hints = {
|
|
||||||
highlight = "NonText",
|
|
||||||
},
|
|
||||||
tools = {
|
tools = {
|
||||||
hover_actions = {
|
hover_actions = {
|
||||||
auto_focus = true,
|
auto_focus = true,
|
||||||
@ -18,6 +16,7 @@ vim.g.rustaceanvim = {
|
|||||||
server = {
|
server = {
|
||||||
on_attach = function(client, bufnr)
|
on_attach = function(client, bufnr)
|
||||||
require("lsp-inlayhints").on_attach(client, bufnr)
|
require("lsp-inlayhints").on_attach(client, bufnr)
|
||||||
|
require("lsp-inlayhints").show()
|
||||||
end,
|
end,
|
||||||
default_settings = {
|
default_settings = {
|
||||||
['rust-analyzer'] = {
|
['rust-analyzer'] = {
|
||||||
|
40
modules/home/programs/neovim/plugins/lualine.lua
Normal file
40
modules/home/programs/neovim/plugins/lualine.lua
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
require('lualine').setup {
|
||||||
|
options = {
|
||||||
|
icons_enabled = true,
|
||||||
|
theme = 'auto',
|
||||||
|
component_separators = { left = '', right = ''},
|
||||||
|
section_separators = { left = '', right = ''},
|
||||||
|
disabled_filetypes = {
|
||||||
|
statusline = {},
|
||||||
|
winbar = {},
|
||||||
|
},
|
||||||
|
ignore_focus = {},
|
||||||
|
always_divide_middle = true,
|
||||||
|
globalstatus = true,
|
||||||
|
refresh = {
|
||||||
|
statusline = 1000,
|
||||||
|
tabline = 1000,
|
||||||
|
winbar = 1000,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
sections = {
|
||||||
|
lualine_a = {'mode'},
|
||||||
|
lualine_b = {'branch', 'diff', 'diagnostics'},
|
||||||
|
lualine_c = {'filename'},
|
||||||
|
lualine_x = {'encoding', 'fileformat', 'filetype'},
|
||||||
|
lualine_y = {'progress'},
|
||||||
|
lualine_z = {'location'}
|
||||||
|
},
|
||||||
|
inactive_sections = {
|
||||||
|
lualine_a = {},
|
||||||
|
lualine_b = {},
|
||||||
|
lualine_c = {'filename'},
|
||||||
|
lualine_x = {'location'},
|
||||||
|
lualine_y = {},
|
||||||
|
lualine_z = {}
|
||||||
|
},
|
||||||
|
tabline = {},
|
||||||
|
winbar = {},
|
||||||
|
inactive_winbar = {},
|
||||||
|
extensions = {}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user