add lots of config

This commit is contained in:
Laurent Le Houerou 2024-05-22 14:03:03 +04:00
parent 0111b990d0
commit 85702a5a9c
29 changed files with 2946 additions and 0 deletions

View File

@ -0,0 +1,15 @@
[font.bold]
family = "FiraCode Nerd Font Mono"
style = "Bold"
[font.bold_italic]
family = "FiraCode Nerd Font Mono"
style = "Bold Italic"
[font.italic]
family = "FiraCode Nerd Font Mono"
style = "Italic"
[font.normal]
family = "FiraCode Nerd Font Mono"
style = "Regular"

201
i3/.config/i3/config Normal file
View File

@ -0,0 +1,201 @@
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see https://i3wm.org/docs/userguide.html for a complete reference!
set $mod Mod4
# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
#font pango:monospace 8
# This font is widely installed, provides lots of unicode glyphs, right-to-left
# text rendering and scalability on retina/hidpi displays (thanks to pango).
font pango:FiraCode Nerd Font Mono 10
exec --no-startup-id ~/.config/i3/setup_monitors.sh
exec_always --no-startup-id $HOME/.config/polybar/launch.sh
# Start XDG autostart .desktop files using dex. See also
# https://wiki.archlinux.org/index.php/XDG_Autostart
exec --no-startup-id dex --autostart --environment i3
# The combination of xss-lock, nm-applet and pactl is a popular choice, so
# they are included here as an example. Modify as you see fit.
# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the
# screen before suspend. Use loginctl lock-session to lock your screen.
exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork
# NetworkManager is the most popular way to manage wireless networks on Linux,
# and nm-applet is a desktop environment-independent system tray GUI for it.
exec --no-startup-id nm-applet
# Use pactl to adjust volume in PulseAudio.
set $refresh_i3status killall -SIGUSR1 i3status
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3status
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status
bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# move tiling windows via drag & drop by left-clicking into the title bar,
# or left-clicking anywhere into the window while holding the floating modifier.
tiling_drag modifier titlebar
# start a terminal
bindsym $mod+Return exec alacritty
# kill focused window
bindsym $mod+Shift+a kilnux ril
# start dmenu (a program launcher)
bindsym $mod+d exec --no-startup-id dmenu_run
# A more modern dmenu replacement is rofi:
# bindcode $mod+40 exec "rofi -modi drun,run -show drun"
# There also is i3-dmenu-desktop which only displays applications shipping a
# .desktop file. It is a wrapper around dmenu, so you need that installed.
# bindcode $mod+40 exec --no-startup-id i3-dmenu-desktop
# change focus
bindsym $mod+j focus left
bindsym $mod+k focus down
bindsym $mod+l focus up
bindsym $mod+m focus right
# alternatively, you can use the cursor keys:
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
# move focused window
bindsym $mod+Shift+j move left
bindsym $mod+Shift+k move down
bindsym $mod+Shift+l move up
bindsym $mod+Shift+m move right
# alternatively, you can use the cursor keys:
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
# split in horizontal orientation
bindsym $mod+h split h
# split in vertical orientation
bindsym $mod+v split v
# enter fullscreen mode for the focused container
bindsym $mod+f fullscreen toggle
# change container layout (stacked, tabbed, toggle split)
bindsym $mod+s layout stacking
bindsym $mod+z layout tabbed
bindsym $mod+e layout toggle split
# toggle tiling / floating
bindsym $mod+Shift+space floating toggle
# change focus between tiling / floating windows
bindsym $mod+space focus mode_toggle
# focus the parent container
bindsym $mod+q focus parent
# focus the child container
#bindsym $mod+d focus child
# Define names for default workspaces for which we configure key bindings later on.
# We use variables to avoid repeating the names in multiple places.
set $ws1 "1"
set $ws2 "2"
set $ws3 "3"
set $ws4 "4"
set $ws5 "5"
set $ws6 "6"
set $ws7 "7"
set $ws8 "8"
set $ws9 "9"
set $ws10 "10"
workspace 1 output DP-1
workspace 2 output DP-1-0
workspace 3 output DP-1-2
workspace 4 output DP-1
workspace 5 output DP-1-0
workspace 6 output DP-1-2
workspace 7 output DP-1
workspace 8 output DP-1-0
workspace 9 output DP-1-2
workspace 10 output DP-1
# switch to workspace
bindsym $mod+ampersand workspace number $ws1
bindsym $mod+eacute workspace number $ws2
bindsym $mod+quotedbl workspace number $ws3
bindsym $mod+apostrophe workspace number $ws4
bindsym $mod+parenleft workspace number $ws5
bindsym $mod+minus workspace number $ws6
bindsym $mod+egrave workspace number $ws7
bindsym $mod+underscore workspace number $ws8
bindsym $mod+ccedilla workspace number $ws9
bindsym $mod+agrave workspace number $ws10
# move focused container to workspace
bindsym $mod+Shift+ampersand move container to workspace number $ws1
bindsym $mod+Shift+eacute move container to workspace number $ws2
bindsym $mod+Shift+quotedbl move container to workspace number $ws3
bindsym $mod+Shift+apostrophe move container to workspace number $ws4
bindsym $mod+Shift+5 move container to workspace number $ws5
bindsym $mod+Shift+minus move container to workspace number $ws6
bindsym $mod+Shift+egrave move container to workspace number $ws7
bindsym $mod+Shift+underscore move container to workspace number $ws8
bindsym $mod+Shift+ccedilla move container to workspace number $ws9
bindsym $mod+Shift+agrave move container to workspace number $ws10
# reload the configuration file
bindsym $mod+Shift+c reload
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $mod+Shift+r restart
# exit i3 (logs you out of your X session)
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'"
# resize window (you can also use the mouse for that)
mode "resize" {
# These bindings trigger as soon as you enter the resize mode
# Pressing left will shrink the windows width.
# Pressing right will grow the windows width.
# Pressing up will shrink the windows height.
# Pressing down will grow the windows height.
bindsym j resize shrink width 10 px or 10 ppt
bindsym k resize grow height 10 px or 10 ppt
bindsym l resize shrink height 10 px or 10 ppt
bindsym m resize grow width 10 px or 10 ppt
# same bindings, but for the arrow keys
bindsym Left resize shrink width 10 px or 10 ppt
bindsym Down resize grow height 10 px or 10 ppt
bindsym Up resize shrink height 10 px or 10 ppt
bindsym Right resize grow width 10 px or 10 ppt
# back to normal: Enter or Escape or $mod+r
bindsym Return mode "default"
bindsym Escape mode "default"
bindsym $mod+r mode "default"
}
bindsym $mod+r mode "resize"
# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)

View File

@ -0,0 +1,4 @@
#!/bin/sh
xrandr --output DP-1 --primary
xrandr --output DP-1-0 --left-of DP-1 --auto
xrandr --output DP-1-2 --right-of DP-1 --auto

View File

@ -0,0 +1,23 @@
# yaml-language-server: $schema=https://json.schemastore.org/lazygit.json
gui:
theme:
activeBorderColor:
- '#89b4fa'
- bold
inactiveBorderColor:
- '#a6adc8'
optionsTextColor:
- '#89b4fa'
selectedLineBgColor:
- '#313244'
cherryPickedCommitBgColor:
- '#45475a'
cherryPickedCommitFgColor:
- '#89b4fa'
unstagedChangesColor:
- '#f38ba8'
defaultFgColor:
- '#cdd6f4'
searchingActiveBorderColor:
- '#f9e2af'

1
nvim/.config/nvim/init.lua Executable file
View File

@ -0,0 +1 @@
require("user")

View File

@ -0,0 +1,30 @@
{
"Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" },
"LuaSnip": { "branch": "master", "commit": "de1a287c9cb525ae52bc846e8f6207e5ef1da5ac" },
"catppuccin": { "branch": "main", "commit": "d97387aea8264f484bb5d5e74f2182a06c83e0d8" },
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
"copilot.vim": { "branch": "release", "commit": "25feddf8e3aa79f0573c8f43ddb13c44c530cfa5" },
"fidget.nvim": { "branch": "main", "commit": "ef99df04a1c53a453602421bc0f756997edc8289" },
"lazy.nvim": { "branch": "main", "commit": "8f19915175395680808de529e4220da8dafc0759" },
"lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "a4caa0d083aab56f6cd5acf2d42331b74614a585" },
"mason-tool-installer.nvim": { "branch": "main", "commit": "c1fbdcb0d8d1295314f1612c4a247253e70299d9" },
"mason.nvim": { "branch": "main", "commit": "49ff59aded1047a773670651cfa40e76e63c6377" },
"neo-tree.nvim": { "branch": "v3.x", "commit": "7aad1bf3f6b849cbf108e02c55ad4d701cb4d33a" },
"new-file-template.nvim": { "branch": "master", "commit": "e4d0654225326816a80545c97f31f57407658e34" },
"none-ls.nvim": { "branch": "main", "commit": "37671797d6e5f9bd0ee3ab965ab2e6de251e1930" },
"nui.nvim": { "branch": "main", "commit": "b1b3dcd6ed8f355c78bad3d395ff645be5f8b6ae" },
"nvim-cmp": { "branch": "main", "commit": "5260e5e8ecadaf13e6b82cf867a909f54e15fd07" },
"nvim-lspconfig": { "branch": "master", "commit": "eadcee1573ca9d0e0cd36a49f620186a8dfdc607" },
"nvim-treesitter": { "branch": "master", "commit": "30de5e7e9486fb1b1b8c2a1e71052b13f94f1cb0" },
"nvim-web-devicons": { "branch": "master", "commit": "e37bb1feee9e7320c76050a55443fa843b4b6f83" },
"plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" },
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
"telescope.nvim": { "branch": "master", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" },
"trouble.nvim": { "branch": "main", "commit": "a8264a65a0b894832ea642844f5b7c30112c458f" },
"vim-dadbod": { "branch": "master", "commit": "fb30422b7bee7e2fa4205a4d226f01477f4fc593" },
"vim-dadbod-completion": { "branch": "master", "commit": "5d5ad196fcde223509d7dabbade0148f7884c5e3" },
"vim-dadbod-ui": { "branch": "master", "commit": "5aa854ee6017e9a3463d3dc8eee5aac93739f021" },
"which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" }
}

View File

@ -0,0 +1,23 @@
return {
{
"catppuccin/nvim",
name = "catppuccin",
priority = 1000,
config = function()
require("catppuccin").setup({
flavour = "mocha",
integrations = {
cmp = true,
gitsigns = true,
nvimtree = true,
treesitter = true,
telescope = {
enabled = true,
},
mason = true,
},
})
vim.cmd.colorscheme("catppuccin")
end,
},
}

View File

@ -0,0 +1,53 @@
return {
{
"hrsh7th/nvim-cmp",
dependencies = {
"hrsh7th/cmp-nvim-lsp",
"L3MON4D3/LuaSnip",
"saadparwaiz1/cmp_luasnip",
},
config = function()
local cmp = require("cmp")
local luasnip = require("luasnip")
cmp.setup({
snippet = {
expand = function(args)
luasnip.lsp_expand(args.body)
end,
},
window = {
completion = cmp.config.window.bordered(),
documentation = cmp.config.window.bordered(),
},
sources = cmp.config.sources({
{ name = "nvim_lsp" },
{ name = "luasnip" },
}),
mapping = {
["<C-d>"] = cmp.mapping.scroll_docs(-4),
["<C-f>"] = cmp.mapping.scroll_docs(4),
["<C-Space>"] = cmp.mapping.complete(),
["<CR>"] = cmp.mapping.confirm({
behavior = cmp.ConfirmBehavior.Replace,
select = true,
}),
["<Up>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_prev_item()
else
fallback()
end
end, { "i", "s" }),
["<Down>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()
else
fallback()
end
end, { "i", "s" }),
},
})
end,
},
}

View File

@ -0,0 +1,5 @@
return {
{
"github/copilot.vim",
},
}

View File

@ -0,0 +1,28 @@
return {
{
"tpope/vim-dadbod",
dependencies = {
"kristijanhusak/vim-dadbod-completion",
},
},
{
"kristijanhusak/vim-dadbod-ui",
config = function()
vim.g.db_ui_use_nerd_fonts = 1
vim.keymap.set("n", "<leader>db", function()
vim.cmd.DBUIToggle()
end)
vim.api.nvim_create_autocmd("FileType", {
pattern = {
"sql",
"mysql",
"plsql",
},
callback = function()
require("cmp").setup.buffer({ sources = { { name = "vim-dadbod-completion" } } })
end,
})
end,
},
}

View File

@ -0,0 +1,8 @@
return {
{
"j-hui/fidget.nvim",
config = function()
require("fidget").setup()
end,
},
}

View File

@ -0,0 +1,115 @@
return {
{
"williamboman/mason.nvim",
lazy = false,
config = function()
require("mason").setup()
end,
},
{
"williamboman/mason-lspconfig.nvim",
lazy = false,
config = function()
require("mason-lspconfig").setup({
ensure_installed = {
"lua_ls",
"gopls",
"tsserver",
},
})
end,
},
{
"WhoIsSethDaniel/mason-tool-installer.nvim",
lazy = false,
config = function()
require("mason-tool-installer").setup({
ensure_installed = {
"stylua",
"golines",
"goimports-reviser",
},
})
end,
},
{
"neovim/nvim-lspconfig",
lazy = false,
config = function()
local on_attach = function(_, bufnr)
local nmap = function(keys, func, desc)
if desc then
desc = "LSP: " .. desc
end
vim.keymap.set("n", keys, func, { buffer = bufnr, desc = desc })
end
nmap("<leader>rn", vim.lsp.buf.rename, "[R]e[n]ame")
nmap("<leader>ca", vim.lsp.buf.code_action, "[C]ode [A]ction")
nmap("gd", vim.lsp.buf.definition, "[G]oto [D]efinition")
nmap("gr", require("telescope.builtin").lsp_references, "[G]oto [R]eferences")
nmap("gI", vim.lsp.buf.implementation, "[G]oto [I]mplementation")
nmap("<leader>D", vim.lsp.buf.type_definition, "Type [D]efinition")
nmap("<leader>ds", require("telescope.builtin").lsp_document_symbols, "[D]ocument [S]ymbols")
nmap("<leader>ws", require("telescope.builtin").lsp_dynamic_workspace_symbols, "[W]orkspace [S]ymbols")
-- See `:help K` for why this keymap
nmap("K", vim.lsp.buf.hover, "Hover Documentation")
nmap("<C-k>", vim.lsp.buf.signature_help, "Signature Documentation")
-- Lesser used LSP functionality
nmap("gD", vim.lsp.buf.declaration, "[G]oto [D]eclaration")
nmap("<leader>wa", vim.lsp.buf.add_workspace_folder, "[W]orkspace [A]dd Folder")
nmap("<leader>wr", vim.lsp.buf.remove_workspace_folder, "[W]orkspace [R]emove Folder")
nmap("<leader>wl", function()
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
end, "[W]orkspace [L]ist Folders")
-- Create a command `:Format` local to the LSP buffer
vim.api.nvim_buf_create_user_command(bufnr, "Format", function(_)
if vim.lsp.buf.format then
vim.lsp.buf.format()
elseif vim.lsp.buf.formatting then
vim.lsp.buf.formatting()
end
end, { desc = "Format current buffer with LSP" })
end
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities = require("cmp_nvim_lsp").default_capabilities(capabilities)
local lspconfig = require("lspconfig")
lspconfig.lua_ls.setup({
on_attach = on_attach,
capabilities = capabilities,
})
lspconfig.gopls.setup({
on_attach = on_attach,
capabilities = capabilities,
})
lspconfig.tsserver.setup({
on_attach = on_attach,
capabilities = capabilities,
})
end,
},
{
"nvimtools/none-ls.nvim",
lazy = false,
config = function()
local null_ls = require("null-ls")
null_ls.setup({
sources = {
null_ls.builtins.formatting.stylua,
null_ls.builtins.formatting.golines.with({
extra_args = { "--base-formatter", "goimports-reviser", "-m", "120", "-t", "2" },
}),
},
})
vim.keymap.set("n", "<leader>gf", vim.lsp.buf.format, {})
vim.cmd([[autocmd BufWritePre * lua vim.lsp.buf.format()]])
end,
},
}

View File

@ -0,0 +1,13 @@
return {
"nvim-lualine/lualine.nvim",
config = function()
require("lualine").setup({
options = {
globalstatus = true,
icons_enabled = true,
component_separators = "|",
section_separators = "",
},
})
end,
}

View File

@ -0,0 +1,9 @@
return {
{
"numToStr/Comment.nvim",
lazy = false,
config = function()
require("Comment").setup()
end,
},
}

View File

@ -0,0 +1,37 @@
return {
{
"nvim-neo-tree/neo-tree.nvim",
branch = "v3.x",
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-tree/nvim-web-devicons",
"MunifTanjim/nui.nvim",
},
config = function()
require("neo-tree").setup({
filesystem = {
filtered_items = {
visible = true,
hide_dotfiles = false,
hide_gitignored = true,
hide_by_name = {
".git",
"node_modules",
},
},
},
})
vim.cmd([[autocmd VimEnter * lua vim.cmd.Neotree("toggle")]])
vim.keymap.set("n", "<leader>e", function()
vim.cmd.Neotree("toggle")
end)
vim.keymap.set("n", "<leader>o", function()
if vim.bo.filetype == "neo-tree" then
vim.cmd.wincmd("p")
else
vim.cmd.Neotree("focus")
end
end)
end,
},
}

View File

@ -0,0 +1,8 @@
return {
{
"otavioschwanck/new-file-template.nvim",
config = function()
require("new-file-template").setup()
end,
},
}

View File

@ -0,0 +1,25 @@
return {
{
"nvim-telescope/telescope-ui-select.nvim",
},
{
"nvim-telescope/telescope.nvim",
tag = "0.1.5",
dependencies = { "nvim-lua/plenary.nvim" },
config = function()
require("telescope").setup({
extensions = {
["ui-select"] = {
require("telescope.themes").get_dropdown({}),
},
},
})
local builtin = require("telescope.builtin")
vim.keymap.set("n", "<leader>ff", builtin.find_files, {})
vim.keymap.set("n", "<leader>fg", builtin.live_grep, {})
vim.keymap.set("n", "<leader>fb", builtin.buffers, {})
vim.keymap.set("n", "<leader>fh", builtin.help_tags, {})
require("telescope").load_extension("ui-select")
end,
},
}

View File

@ -0,0 +1,35 @@
return {
{
"nvim-treesitter/nvim-treesitter",
build = ":TSUpdate",
config = function()
local config = require("nvim-treesitter.configs")
config.setup({
ensure_installed = {
"lua",
"go",
"bash",
"comment",
"css",
"dockerfile",
"gitignore",
"gomod",
"gosum",
"gowork",
"gotmpl",
"graphql",
"html",
"javascript",
"json",
"sql",
"tsx",
"typescript",
"yaml",
},
auto_install = true,
highlight = { enable = true },
indent = { enable = true },
})
end,
},
}

View File

@ -0,0 +1,39 @@
return {
{
"folke/trouble.nvim",
cmd = "Trouble",
config = function()
require("trouble").setup({
auto_open = true,
auto_close = false,
auto_preview = true,
auto_fold = false,
use_diagnostic_signs = true,
})
vim.keymap.set("n", "<leader>xx", function()
require("trouble").toggle()
end)
vim.keymap.set("n", "<leader>xw", function()
require("trouble").toggle("workspace_diagnostics")
end)
vim.keymap.set("n", "<leader>xd", function()
require("trouble").toggle("document_diagnostics")
end)
vim.keymap.set("n", "<leader>xq", function()
require("trouble").toggle("quickfix")
end)
vim.keymap.set("n", "<leader>xl", function()
require("trouble").toggle("loclist")
end)
vim.keymap.set("n", "gR", function()
require("trouble").toggle("lsp_references")
end)
vim.keymap.set("n", "<leader>x<Right>", function()
require("trouble").next({ skip_groups = true, jump = true })
end)
vim.keymap.set("n", "<leader>x<Left>", function()
require("trouble").previous({ skip_groups = true, jump = true })
end)
end,
},
}

View File

@ -0,0 +1,21 @@
return {
"folke/which-key.nvim",
opts = {
plugins = {
marks = true, -- shows a list of your marks on ' and `
registers = false, -- shows your registers on " in NORMAL or <C-r> in INSERT mode
spelling = {
enabled = false, -- enabling this will show WhichKey when pressing z= to select spelling suggestions
},
presets = {
operators = false, -- adds help for operators like d, y, ...
motions = false, -- adds help for motions
text_objects = false, -- help for text objects triggered after entering an operator
windows = true, -- default bindings on <c-w>
nav = false, -- misc bindings to work with windows
z = true, -- bindings for folds, spelling and others prefixed with z
g = true, -- bindings for prefixed with g
},
},
},
}

View File

@ -0,0 +1,14 @@
local utils = require("new-file-template.utils")
return function(opts)
local function base_template(path)
local foldername = path:match("([^/]+)[/]?$")
return [[package ]] .. foldername .. [[\n\n|cursor|]]
end
local template = {
{ pattern = ".*", content = base_template },
}
return utils.find_entry(template, opts)
end

View File

@ -0,0 +1,3 @@
require("user.options")
require("user.lazy")
require("user.keymaps")

View File

@ -0,0 +1,6 @@
vim.keymap.set("n", "<leader><Left>", function()
vim.cmd.bprev()
end)
vim.keymap.set("n", "<leader><Right>", function()
vim.cmd.bnext()
end)

View File

@ -0,0 +1,22 @@
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
require("lazy").setup({
{ import = "plugins" },
}, {
change_detection = {
enabled = true,
notify = false,
},
})

View File

@ -0,0 +1,83 @@
-- Enable relative line numbers
vim.opt.nu = true
vim.opt.rnu = true
-- Set tabs to 2 spaces
vim.opt.tabstop = 2
vim.opt.softtabstop = 2
vim.opt.expandtab = true
-- Enable auto indenting and set it to spaces
vim.opt.smartindent = true
vim.opt.shiftwidth = 2
-- Enable smart indenting (see https://stackoverflow.com/questions/1204149/smart-wrap-in-vim)
vim.opt.breakindent = true
-- Enable incremental searching
vim.opt.incsearch = true
vim.opt.hlsearch = true
-- Disable text wrap
vim.opt.wrap = false
-- Set leader key to space
vim.g.mapleader = " "
vim.g.maplocalleader = " "
-- Better splitting
vim.opt.splitbelow = true
vim.opt.splitright = true
-- Enable mouse mode
vim.opt.mouse = "a"
-- Enable ignorecase + smartcase for better searching
vim.opt.ignorecase = true
vim.opt.smartcase = true
-- Decrease updatetime to 200ms
vim.opt.updatetime = 50
-- Set completeopt to have a better completion experience
vim.opt.completeopt = { "menuone", "noselect" }
-- Enable persistent undo history
vim.opt.undofile = true
-- Enable 24-bit color
vim.opt.termguicolors = true
-- Enable the sign column to prevent the screen from jumping
vim.opt.signcolumn = "yes"
-- Enable access to System Clipboard
vim.opt.clipboard = "unnamed,unnamedplus"
-- Enable cursor line highlight
vim.opt.cursorline = true
-- Set fold settings
-- These options were reccommended by nvim-ufo
-- See: https://github.com/kevinhwang91/nvim-ufo#minimal-configuration
vim.opt.foldcolumn = "0"
vim.opt.foldlevel = 99
vim.opt.foldlevelstart = 99
vim.opt.foldenable = true
-- Always keep 8 lines above/below cursor unless at start/end of file
vim.opt.scrolloff = 8
-- Place a column line
vim.opt.colorcolumn = "120"
vim.opt.guicursor = {
"n-v-c:block", -- Normal, visual, command-line: block cursor
"i-ci-ve:ver25", -- Insert, command-line insert, visual-exclude: vertical bar cursor with 25% width
"r-cr:hor20", -- Replace, command-line replace: horizontal bar cursor with 20% height
"o:hor50", -- Operator-pending: horizontal bar cursor with 50% height
"a:blinkwait700-blinkoff400-blinkon250", -- All modes: blinking settings
"sm:block-blinkwait175-blinkoff150-blinkon175", -- Showmatch: block cursor with specific blinking settings
}
vim.g.db = "postgres://sorare:sorare@192.168.1.250:5436/sorare?sslmode=disable"

View File

@ -0,0 +1,203 @@
;==========================================================
;
;
; ██████╗ ██████╗ ██╗ ██╗ ██╗██████╗ █████╗ ██████╗
; ██╔══██╗██╔═══██╗██║ ╚██╗ ██╔╝██╔══██╗██╔══██╗██╔══██╗
; ██████╔╝██║ ██║██║ ╚████╔╝ ██████╔╝███████║██████╔╝
; ██╔═══╝ ██║ ██║██║ ╚██╔╝ ██╔══██╗██╔══██║██╔══██╗
; ██║ ╚██████╔╝███████╗██║ ██████╔╝██║ ██║██║ ██║
; ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝
;
;
; To learn more about how to configure Polybar
; go to https://github.com/polybar/polybar
;
; The README contains a lot of information
;
;==========================================================
[colors]
background = #282A2E
background-alt = #373B41
foreground = #C5C8C6
primary = #F0C674
secondary = #8ABEB7
alert = #A54242
disabled = #707880
rosewater = #f5e0dc
flamingo = #f2cdcd
pink = #f5c2e7
mauve = #cba6f7
red = #f38ba8
maroon = #eba0ac
peach = #fab387
yellow = #f9e2af
green = #a6e3a1
teal = #94e2d5
sky = #89dceb
sapphire = #74c7ec
blue = #89b4fa
lavender = #b4befe
text = #cdd6f4
subtext1 = #bac2de
subtext0 = #a6adc8
overlay2 = #9399b2
overlay1 = #7f849c
overlay0 = #6c7086
surface2 = #585b70
surface1 = #45475a
surface0 = #313244
base = #1e1e2e
mantle = #181825
crust = #11111b
transparent = #FF00000
[bar/top]
width = 100%
height = 24pt
radius = 6
; dpi = 96
background = ${colors.base}
foreground = ${colors.text}
line-size = 3pt
border-size = 4pt
border-color = ${colors.crust}
padding-left = 0
padding-right = 1
module-margin = 1
separator = |
separator-foreground = ${colors.disabled}
font-0 = FiraCode Nerd Font Mono;2
modules-left = xworkspaces xwindow
modules-right = filesystem pulseaudio xkeyboard memory cpu wlan eth date
cursor-click = pointer
cursor-scroll = ns-resize
enable-ipc = true
; wm-restack = generic
; wm-restack = bspwm
; wm-restack = i3
; override-redirect = true
[module/systray]
type = internal/tray
format-margin = 8pt
tray-spacing = 16pt
[module/xworkspaces]
type = internal/xworkspaces
label-active = %name%
label-active-background = ${colors.background-alt}
label-active-underline= ${colors.primary}
label-active-padding = 1
label-occupied = %name%
label-occupied-padding = 1
label-urgent = %name%
label-urgent-background = ${colors.alert}
label-urgent-padding = 1
label-empty = %name%
label-empty-foreground = ${colors.disabled}
label-empty-padding = 1
[module/xwindow]
type = internal/xwindow
label = %title:0:60:...%
[module/filesystem]
type = internal/fs
interval = 25
mount-0 = /
label-mounted = %{F#F0C674}%mountpoint%%{F-} %percentage_used%%
label-unmounted = %mountpoint% not mounted
label-unmounted-foreground = ${colors.disabled}
[module/pulseaudio]
type = internal/pulseaudio
format-volume-prefix = "VOL "
format-volume-prefix-foreground = ${colors.primary}
format-volume = <label-volume>
label-volume = %percentage%%
label-muted = muted
label-muted-foreground = ${colors.disabled}
[module/xkeyboard]
type = internal/xkeyboard
blacklist-0 = num lock
label-layout = %layout%
label-layout-foreground = ${colors.primary}
label-indicator-padding = 2
label-indicator-margin = 1
label-indicator-foreground = ${colors.background}
label-indicator-background = ${colors.secondary}
[module/memory]
type = internal/memory
interval = 2
format-prefix = "RAM "
format-prefix-foreground = ${colors.primary}
label = %percentage_used:2%%
[module/cpu]
type = internal/cpu
interval = 2
format-prefix = "CPU "
format-prefix-foreground = ${colors.primary}
label = %percentage:2%%
[network-base]
type = internal/network
interval = 5
format-connected = <label-connected>
format-disconnected = <label-disconnected>
label-disconnected = %{F#F0C674}%ifname%%{F#707880} disconnected
[module/wlan]
inherit = network-base
interface-type = wireless
label-connected = %{F#F0C674}%ifname%%{F-} %essid% %local_ip%
[module/eth]
inherit = network-base
interface-type = wired
label-connected = %{F#F0C674}%ifname%%{F-} %local_ip%
[module/date]
type = internal/date
interval = 1
date = %H:%M
date-alt = %Y-%m-%d %H:%M:%S
label = %date%
label-foreground = ${colors.primary}
[settings]
screenchange-reload = true
pseudo-transparency = true
; vim:ft=dosini

View File

@ -0,0 +1,14 @@
#!/bin/sh
# Terminate already running bar instances
killall -q polybar
# Wait until the processes have been shut down
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
# Launch bar1 and bar2
MONITORS=$(xrandr --query | grep " connected" | cut -d" " -f1)
MONITORS=$MONITORS polybar top;
echo "Bars launched..."

1842
zsh/.p10k.zsh Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +1,10 @@
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
ZINIT_HOME="${XDG_DATA_HOME:-${HOME}/.local/share}/zinit/zinit.git"
if [ ! -d "$ZINIT_HOME" ]; then
@ -6,3 +13,62 @@ if [ ! -d "$ZINIT_HOME" ]; then
fi
source "${ZINIT_HOME}/zinit.zsh"
zinit ice depth=1; zinit light romkatv/powerlevel10k
zinit light zsh-users/zsh-syntax-highlighting
zinit light zsh-users/zsh-completions
zinit light zsh-users/zsh-autosuggestions
zinit light Aloxaf/fzf-tab
zinit snippet OMZP::git
zinit snippet OMZP::sudo
zinit snippet OMZP::archlinux
autoload -Uz compinit && compinit
zinit cdreplay -q
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
# Keybindings
bindkey -e
bindkey '^p' history-search-backward
bindkey '^n' history-search-forward
bindkey '^[w' kill-region
# History
HISTSIZE=5000
HISTFILE=~/.zsh_history
SAVEHIST=$HISTSIZE
HISTDUP=erase
setopt appendhistory
setopt sharehistory
setopt hist_ignore_space
setopt hist_ignore_all_dups
setopt hist_save_no_dups
setopt hist_ignore_dups
setopt hist_find_no_dups
# Completion styling
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}'
zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}"
zstyle ':completion:*' menu no
zstyle ':fzf-tab:complete:cd:*' fzf-preview 'ls --color $realpath'
zstyle ':fzf-tab:complete:__zoxide_z:*' fzf-preview 'ls --color $realpath'
# Aliases
alias ls="eza"
alias ll="eza -alh"
alias tree="eza --tree"
alias zz="cd -"
alias dcupd="docker compose up -d --remove-orphans"
alias dcdown="docker compose down"
alias dclogs="docker logs -f --tail 100"
alias vi="nvim"
alias vim="nvim"
# Shell integrations
eval "$(fzf --zsh)"
eval "$(zoxide init --cmd cd zsh)"