Structure update
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
[env]
|
||||
TERM = "xterm-256color"
|
||||
|
||||
[scrolling]
|
||||
history = 100000
|
||||
multiplier = 3
|
||||
|
||||
[font]
|
||||
size = 10
|
||||
|
||||
[font.normal]
|
||||
family = "Hack Nerd Font"
|
||||
style = "Regular"
|
||||
|
||||
[font.bold]
|
||||
family = "Hack Nerd Font"
|
||||
style = "Bold"
|
||||
|
||||
[font.italic]
|
||||
family = "Hack Nerd Font"
|
||||
style = "Italic"
|
||||
|
||||
[font.bold_italic]
|
||||
family = "Hack Nerd Font"
|
||||
style = "Bold Italic"
|
||||
|
||||
[cursor]
|
||||
style = { shape = "Beam", blinking = "On" }
|
||||
blink_interval = 500
|
||||
unfocused_hollow = true
|
||||
|
||||
[selection]
|
||||
save_to_clipboard = true
|
||||
|
||||
[mouse]
|
||||
hide_when_typing = true
|
||||
|
||||
[keyboard]
|
||||
bindings = [
|
||||
{ key = "N", mods = "Control|Shift", action = "CreateNewWindow" },
|
||||
{ key = "V", mods = "Control|Shift", action = "Paste" },
|
||||
{ key = "C", mods = "Control|Shift", action = "Copy" }
|
||||
]
|
||||
@@ -0,0 +1,80 @@
|
||||
# Editor
|
||||
set -gx EDITOR nvim
|
||||
set -gx VISUAL nvim
|
||||
|
||||
set -gx PAGER less
|
||||
set -gx LESS "-R --use-color -Dd+r -Du+b"
|
||||
|
||||
set -gx XDG_CONFIG_HOME "$HOME/.config"
|
||||
set -gx XDG_DATA_HOME "$HOME/.local/share"
|
||||
set -gx XDG_CACHE_HOME "$HOME/.cache"
|
||||
|
||||
fish_add_path "$HOME/.local/bin"
|
||||
fish_add_path "$HOME/.cargo/bin"
|
||||
|
||||
set fish_greeting
|
||||
|
||||
if type -q eza
|
||||
alias ls="eza --icons"
|
||||
alias ll="eza -lah --icons --git"
|
||||
alias la="eza -A --icons"
|
||||
else
|
||||
alias ls="ls --color=auto"
|
||||
alias ll="ls -lah"
|
||||
alias la="ls -A"
|
||||
end
|
||||
|
||||
if type -q bat
|
||||
alias cat="bat"
|
||||
end
|
||||
|
||||
alias grep="grep --color=auto"
|
||||
|
||||
alias c="clear"
|
||||
alias v="nvim"
|
||||
alias svim="sudoedit"
|
||||
|
||||
alias gs="git status"
|
||||
alias ga="git add"
|
||||
alias gc="git commit"
|
||||
alias gp="git push"
|
||||
alias gl="git log --oneline --graph --decorate"
|
||||
|
||||
alias pacup="sudo pacman -Syu"
|
||||
alias pacin="sudo pacman -S"
|
||||
alias pacrm="sudo pacman -Rns"
|
||||
alias pacq="pacman -Qs"
|
||||
|
||||
# Safer defaults
|
||||
alias cp="cp -i"
|
||||
alias mv="mv -i"
|
||||
alias rm="rm -i"
|
||||
|
||||
# Optional tools
|
||||
if type -q thefuck
|
||||
thefuck --alias | source
|
||||
end
|
||||
|
||||
if type -q zoxide
|
||||
zoxide init fish | source
|
||||
end
|
||||
|
||||
if type -q fzf
|
||||
fzf --fish | source
|
||||
end
|
||||
|
||||
if type -q starship
|
||||
starship init fish | source
|
||||
end
|
||||
|
||||
# Start Sway on tty1 login
|
||||
#
|
||||
# These are real environment variables. They are inherited by Sway because
|
||||
# Fish execs Sway after exporting them.
|
||||
if status is-login
|
||||
if test -z "$TMUX"; and test -z "$DISPLAY"; and test -z "$WAYLAND_DISPLAY"
|
||||
if test (tty) = /dev/tty1
|
||||
exec sway
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,76 @@
|
||||
# This file contains fish universal variable definitions.
|
||||
# VERSION: 3.0
|
||||
SETUVAR __fish_initialized:4300
|
||||
SETUVAR pure_begin_prompt_with_current_directory:true
|
||||
SETUVAR pure_check_for_new_release:false
|
||||
SETUVAR pure_color_at_sign:pure_color_mute
|
||||
SETUVAR pure_color_aws_profile:pure_color_warning
|
||||
SETUVAR pure_color_command_duration:pure_color_warning
|
||||
SETUVAR pure_color_current_directory:pure_color_primary
|
||||
SETUVAR pure_color_danger:red
|
||||
SETUVAR pure_color_dark:black
|
||||
SETUVAR pure_color_exit_status:pure_color_danger
|
||||
SETUVAR pure_color_git_branch:pure_color_mute
|
||||
SETUVAR pure_color_git_dirty:pure_color_mute
|
||||
SETUVAR pure_color_git_stash:pure_color_info
|
||||
SETUVAR pure_color_git_unpulled_commits:pure_color_info
|
||||
SETUVAR pure_color_git_unpushed_commits:pure_color_info
|
||||
SETUVAR pure_color_hostname:pure_color_mute
|
||||
SETUVAR pure_color_info:cyan
|
||||
SETUVAR pure_color_jobs:pure_color_normal
|
||||
SETUVAR pure_color_k8s_context:pure_color_success
|
||||
SETUVAR pure_color_k8s_namespace:pure_color_primary
|
||||
SETUVAR pure_color_k8s_prefix:pure_color_info
|
||||
SETUVAR pure_color_light:white
|
||||
SETUVAR pure_color_mute:brblack
|
||||
SETUVAR pure_color_nixdevshell_prefix:pure_color_info
|
||||
SETUVAR pure_color_nixdevshell_symbol:pure_color_mute
|
||||
SETUVAR pure_color_normal:normal
|
||||
SETUVAR pure_color_prefix_root_prompt:pure_color_danger
|
||||
SETUVAR pure_color_primary:blue
|
||||
SETUVAR pure_color_prompt_on_error:pure_color_danger
|
||||
SETUVAR pure_color_prompt_on_success:pure_color_success
|
||||
SETUVAR pure_color_success:magenta
|
||||
SETUVAR pure_color_system_time:pure_color_mute
|
||||
SETUVAR pure_color_username_normal:pure_color_mute
|
||||
SETUVAR pure_color_username_root:pure_color_light
|
||||
SETUVAR pure_color_virtualenv:pure_color_mute
|
||||
SETUVAR pure_color_warning:yellow
|
||||
SETUVAR pure_convert_exit_status_to_signal:false
|
||||
SETUVAR pure_enable_aws_profile:true
|
||||
SETUVAR pure_enable_container_detection:true
|
||||
SETUVAR pure_enable_git:true
|
||||
SETUVAR pure_enable_k8s:false
|
||||
SETUVAR pure_enable_nixdevshell:false
|
||||
SETUVAR pure_enable_single_line_prompt:false
|
||||
SETUVAR pure_enable_virtualenv:true
|
||||
SETUVAR pure_reverse_prompt_symbol_in_vimode:true
|
||||
SETUVAR pure_separate_prompt_on_error:false
|
||||
SETUVAR pure_shorten_prompt_current_directory_length:0
|
||||
SETUVAR pure_shorten_window_title_current_directory_length:0
|
||||
SETUVAR pure_show_exit_status:false
|
||||
SETUVAR pure_show_jobs:false
|
||||
SETUVAR pure_show_numbered_git_indicator:false
|
||||
SETUVAR pure_show_prefix_root_prompt:false
|
||||
SETUVAR pure_show_subsecond_command_duration:false
|
||||
SETUVAR pure_show_system_time:false
|
||||
SETUVAR pure_symbol_aws_profile_prefix:
|
||||
SETUVAR pure_symbol_container_prefix:
|
||||
SETUVAR pure_symbol_exit_status_prefix:\x7c
|
||||
SETUVAR pure_symbol_exit_status_separator:\x7c
|
||||
SETUVAR pure_symbol_git_dirty:\x2a
|
||||
SETUVAR pure_symbol_git_stash:\u2261
|
||||
SETUVAR pure_symbol_git_unpulled_commits:\u21e3
|
||||
SETUVAR pure_symbol_git_unpushed_commits:\u21e1
|
||||
SETUVAR pure_symbol_k8s_prefix:\u2638
|
||||
SETUVAR pure_symbol_nixdevshell_prefix:\u2744\ufe0f
|
||||
SETUVAR pure_symbol_prefix_root_prompt:\x23
|
||||
SETUVAR pure_symbol_prompt:\u276f
|
||||
SETUVAR pure_symbol_reverse_prompt:\u276e
|
||||
SETUVAR pure_symbol_ssh_prefix:
|
||||
SETUVAR pure_symbol_title_bar_separator:\x2d
|
||||
SETUVAR pure_symbol_virtualenv_prefix:
|
||||
SETUVAR pure_system_time_format:\x2b\x25T
|
||||
SETUVAR pure_threshold_command_duration:5
|
||||
SETUVAR pure_truncate_prompt_current_directory_keeps:\x2d1
|
||||
SETUVAR pure_truncate_window_title_current_directory_keeps:\x2d1
|
||||
@@ -0,0 +1,26 @@
|
||||
font=Hack Nerd Font 10
|
||||
background-color=#1c1c24
|
||||
text-color=#cdcdcd
|
||||
border-color=#2f2f3d
|
||||
progress-color=#7e98e8
|
||||
|
||||
border-size=2
|
||||
border-radius=0
|
||||
padding=8
|
||||
margin=6
|
||||
|
||||
default-timeout=5000
|
||||
ignore-timeout=0
|
||||
|
||||
[urgency=low]
|
||||
background-color=#141415
|
||||
text-color=#c3c3d5
|
||||
|
||||
[urgency=normal]
|
||||
background-color=#1c1c24
|
||||
text-color=#cdcdcd
|
||||
|
||||
[urgency=high]
|
||||
background-color=#1c1c24
|
||||
text-color=#d8647e
|
||||
border-color=#d8647e
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
/home/phill/.dotfiles/phillpc/mako
|
||||
@@ -0,0 +1,408 @@
|
||||
-- ~/.config/nvim/init.lua
|
||||
|
||||
-- ============================================================================
|
||||
-- Leader
|
||||
-- ============================================================================
|
||||
|
||||
vim.g.mapleader = " "
|
||||
vim.g.maplocalleader = " "
|
||||
|
||||
-- ============================================================================
|
||||
-- Options
|
||||
-- ============================================================================
|
||||
|
||||
vim.o.number = true
|
||||
vim.o.relativenumber = true
|
||||
vim.o.mouse = "a"
|
||||
vim.opt.cursorline = true
|
||||
vim.o.clipboard = "unnamedplus"
|
||||
vim.o.swapfile = false
|
||||
vim.o.backup = false
|
||||
vim.o.writebackup = false
|
||||
vim.o.undofile = true
|
||||
|
||||
vim.o.ignorecase = true
|
||||
vim.o.smartcase = true
|
||||
|
||||
vim.o.signcolumn = "yes"
|
||||
vim.o.splitright = true
|
||||
vim.o.splitbelow = true
|
||||
|
||||
vim.o.termguicolors = true
|
||||
vim.o.winborder = "rounded"
|
||||
|
||||
vim.o.updatetime = 250
|
||||
vim.o.timeoutlen = 1000
|
||||
|
||||
vim.o.expandtab = true
|
||||
vim.o.shiftwidth = 2
|
||||
vim.o.tabstop = 2
|
||||
vim.o.softtabstop = 2
|
||||
|
||||
vim.o.showmode = false
|
||||
|
||||
vim.o.completeopt = "menu,menuone,noselect"
|
||||
|
||||
-- ============================================================================
|
||||
-- Plugins
|
||||
-- ============================================================================
|
||||
|
||||
vim.pack.add({
|
||||
{ src = "https://github.com/vague-theme/vague.nvim" },
|
||||
{ src = "https://github.com/neovim/nvim-lspconfig" },
|
||||
{ src = "https://github.com/saghen/blink.lib" },
|
||||
{ src = "https://github.com/saghen/blink.cmp" },
|
||||
{ src = "https://github.com/nvim-treesitter/nvim-treesitter", version = "main" },
|
||||
{ src = "https://github.com/echasnovski/mini.nvim" },
|
||||
{ src = "https://github.com/nvim-neo-tree/neo-tree.nvim", version = vim.version.range("3") },
|
||||
{ src = "https://github.com/nvim-lua/plenary.nvim" },
|
||||
{ src = "https://github.com/MunifTanjim/nui.nvim" },
|
||||
{ src = "https://github.com/ibhagwan/fzf-lua" },
|
||||
{ src = "https://github.com/lewis6991/gitsigns.nvim" },
|
||||
{ src = "https://github.com/folke/which-key.nvim" },
|
||||
{ src = "https://github.com/goolord/alpha-nvim" },
|
||||
{ src = "https://github.com/nvim-tree/nvim-web-devicons" },
|
||||
{ src = "https://github.com/christoomey/vim-tmux-navigator" },
|
||||
{ src = "https://github.com/folke/todo-comments.nvim" },
|
||||
})
|
||||
|
||||
-- ============================================================================
|
||||
-- Theme
|
||||
-- ============================================================================
|
||||
|
||||
vim.cmd.colorscheme("vague")
|
||||
|
||||
-- ============================================================================
|
||||
-- Diagnostics
|
||||
-- ============================================================================
|
||||
|
||||
vim.diagnostic.config({
|
||||
virtual_text = true,
|
||||
underline = true,
|
||||
severity_sort = true,
|
||||
signs = {
|
||||
text = {
|
||||
[vim.diagnostic.severity.ERROR] = "E",
|
||||
[vim.diagnostic.severity.WARN] = "W",
|
||||
[vim.diagnostic.severity.INFO] = "I",
|
||||
[vim.diagnostic.severity.HINT] = "H",
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
-- ============================================================================
|
||||
-- Completion
|
||||
-- ============================================================================
|
||||
|
||||
require("blink.cmp").build():pwait()
|
||||
|
||||
require("blink.cmp").setup({
|
||||
completion = {
|
||||
menu = { auto_show = true },
|
||||
trigger = { show_on_trigger_character = true },
|
||||
ghost_text = { enabled = false },
|
||||
documentation = {
|
||||
auto_show = true,
|
||||
auto_show_delay_ms = 200,
|
||||
},
|
||||
list = {
|
||||
selection = {
|
||||
preselect = false,
|
||||
auto_insert = false,
|
||||
},
|
||||
},
|
||||
},
|
||||
keymap = {
|
||||
preset = "none",
|
||||
["<C-space>"] = { "show", "show_documentation", "hide_documentation" },
|
||||
["<C-e>"] = { "hide" },
|
||||
|
||||
["<C-up>"] = { "scroll_documentation_up" },
|
||||
["<C-down>"] = { "scroll_documentation_down" },
|
||||
|
||||
["<CR>"] = { "accept", "fallback" },
|
||||
|
||||
["<Tab>"] = { "select_next", "fallback" },
|
||||
["<S-Tab>"] = { "select_prev", "fallback" },
|
||||
},
|
||||
sources = {
|
||||
default = { "lsp", "path", "snippets", "buffer" },
|
||||
},
|
||||
fuzzy = {
|
||||
implementation = "rust",
|
||||
},
|
||||
})
|
||||
|
||||
-- ============================================================================
|
||||
-- Treesitter
|
||||
-- ============================================================================
|
||||
|
||||
require("nvim-treesitter").setup({
|
||||
install_dir = vim.fn.stdpath("data") .. "/site",
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
group = vim.api.nvim_create_augroup("treesitter_start", { clear = true }),
|
||||
callback = function(args)
|
||||
pcall(vim.treesitter.start, args.buf)
|
||||
end,
|
||||
})
|
||||
|
||||
-- ============================================================================
|
||||
-- mini.nvim
|
||||
-- ============================================================================
|
||||
|
||||
require("mini.ai").setup()
|
||||
require("mini.surround").setup()
|
||||
require("mini.pairs").setup()
|
||||
require("mini.comment").setup()
|
||||
require("mini.statusline").setup()
|
||||
require("mini.tabline").setup()
|
||||
require("mini.bracketed").setup()
|
||||
require("mini.icons").setup()
|
||||
|
||||
vim.api.nvim_set_hl(0, "MiniTablineCurrent", { link = "Search" })
|
||||
vim.api.nvim_set_hl(0, "MiniTablineModifiedCurrent", { link = "Search" })
|
||||
|
||||
vim.api.nvim_set_hl(0, "MiniTablineModifiedVisible", { link = "DiagnosticWarn" })
|
||||
vim.api.nvim_set_hl(0, "MiniTablineModifiedHidden", { link = "DiagnosticWarn" })
|
||||
|
||||
|
||||
-- ============================================================================
|
||||
-- Icons
|
||||
-- ============================================================================
|
||||
|
||||
require("nvim-web-devicons").setup()
|
||||
|
||||
|
||||
-- ============================================================================
|
||||
-- Todo comments
|
||||
-- ============================================================================
|
||||
|
||||
require("todo-comments").setup()
|
||||
|
||||
|
||||
-- ============================================================================
|
||||
-- File explorer
|
||||
-- ============================================================================
|
||||
|
||||
require("neo-tree").setup({
|
||||
close_if_last_window = true,
|
||||
popup_border_style = "", -- use vim.o.winborder on modern Neovim
|
||||
enable_git_status = true,
|
||||
enable_diagnostics = true,
|
||||
filesystem = {
|
||||
follow_current_file = {
|
||||
enabled = true,
|
||||
},
|
||||
use_libuv_file_watcher = true,
|
||||
},
|
||||
window = {
|
||||
width = 63,
|
||||
},
|
||||
})
|
||||
|
||||
vim.keymap.set("n", "<leader>e", "<cmd>Neotree filesystem reveal right toggle<CR>", {
|
||||
desc = "File explorer",
|
||||
})
|
||||
|
||||
vim.keymap.set("n", "<leader>E", "<cmd>Neotree filesystem reveal current<CR>", {
|
||||
desc = "File explorer full screen",
|
||||
})
|
||||
|
||||
-- ============================================================================
|
||||
-- Picker
|
||||
-- ============================================================================
|
||||
|
||||
require("fzf-lua").setup({
|
||||
{ "fzf-native", "hide" },
|
||||
actions = {
|
||||
files = { ["enter"] = require("fzf-lua.actions").file_edit }
|
||||
},
|
||||
files = {
|
||||
formatter = "path.filename_first",
|
||||
},
|
||||
oldfiles = {
|
||||
formatter = "path.filename_first",
|
||||
},
|
||||
grep = {
|
||||
rg_opts = "--column --line-number --no-heading --color=always --smart-case --max-columns=4096",
|
||||
},
|
||||
winopts = {
|
||||
width = 0.56,
|
||||
height = 0.82,
|
||||
row = 0.50,
|
||||
col = 0.50,
|
||||
preview = {
|
||||
layout = "horizontal",
|
||||
horizontal = "right:45%",
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
vim.keymap.set("n", "<leader>ff", function()
|
||||
require("fzf-lua").files()
|
||||
end, { desc = "Find files" })
|
||||
|
||||
vim.keymap.set("n", "<leader>fg", function()
|
||||
require("fzf-lua").live_grep()
|
||||
end, { desc = "Live grep" })
|
||||
|
||||
vim.keymap.set("n", "<leader>fb", function()
|
||||
require("fzf-lua").buffers()
|
||||
end, { desc = "Buffers" })
|
||||
|
||||
vim.keymap.set("n", "<leader>fh", function()
|
||||
require("fzf-lua").helptags()
|
||||
end, { desc = "Help tags" })
|
||||
|
||||
vim.keymap.set("n", "<leader>fr", function()
|
||||
require("fzf-lua").resume()
|
||||
end, { desc = "Resume picker" })
|
||||
|
||||
vim.keymap.set("n", "<leader>fd", function()
|
||||
require("fzf-lua").diagnostics_document()
|
||||
end, { desc = "Buffer diagnostics" })
|
||||
|
||||
vim.keymap.set("n", "<leader>fD", function()
|
||||
require("fzf-lua").diagnostics_workspace()
|
||||
end, { desc = "Workspace diagnostics" })
|
||||
|
||||
vim.keymap.set("n", "<leader>fo", function()
|
||||
require("fzf-lua").oldfiles()
|
||||
end, { desc = "Recent files" })
|
||||
|
||||
vim.keymap.set("n", "<leader>fc", function()
|
||||
require("fzf-lua").git_status()
|
||||
end, { desc = "Git status" })
|
||||
|
||||
-- ============================================================================
|
||||
-- Dashboard
|
||||
-- ============================================================================
|
||||
|
||||
require("alpha").setup(require("alpha.themes.theta").config)
|
||||
|
||||
|
||||
-- ============================================================================
|
||||
-- Git
|
||||
-- ============================================================================
|
||||
|
||||
require("gitsigns").setup()
|
||||
|
||||
-- ============================================================================
|
||||
-- LSP
|
||||
-- ============================================================================
|
||||
|
||||
-- nvim-lspconfig supplies default configs for these.
|
||||
-- Install the actual language server binaries separately:
|
||||
-- lua-language-server
|
||||
-- pyright
|
||||
-- gopls
|
||||
|
||||
vim.lsp.config("lua_ls", {
|
||||
settings = {
|
||||
Lua = {
|
||||
runtime = {
|
||||
version = "LuaJIT",
|
||||
},
|
||||
diagnostics = {
|
||||
globals = { "vim" },
|
||||
},
|
||||
workspace = {
|
||||
library = vim.api.nvim_get_runtime_file("", true),
|
||||
},
|
||||
telemetry = {
|
||||
enable = false,
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
vim.lsp.enable({
|
||||
"lua_ls",
|
||||
"pyright",
|
||||
"gopls",
|
||||
"rust_analyzer",
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd("LspAttach", {
|
||||
group = vim.api.nvim_create_augroup("lsp_attach", { clear = true }),
|
||||
callback = function(event)
|
||||
local map = function(lhs, rhs, desc)
|
||||
vim.keymap.set("n", lhs, rhs, {
|
||||
buffer = event.buf,
|
||||
desc = desc,
|
||||
})
|
||||
end
|
||||
|
||||
-- Navigation
|
||||
map("gd", vim.lsp.buf.definition, "Go to definition")
|
||||
map("gD", vim.lsp.buf.declaration, "Go to declaration")
|
||||
map("gi", vim.lsp.buf.implementation, "Go to implementation")
|
||||
|
||||
-- Language / LSP actions
|
||||
map("<leader>lr", vim.lsp.buf.rename, "LSP rename")
|
||||
map("<leader>lf", function()
|
||||
vim.lsp.buf.format({ async = true })
|
||||
end, "LSP format")
|
||||
map("<leader>la", vim.lsp.buf.code_action, "LSP code action")
|
||||
map("<leader>lh", vim.lsp.buf.hover, "LSP hover")
|
||||
map("<leader>ls", vim.lsp.buf.signature_help, "LSP signature help")
|
||||
map("<leader>ld", vim.diagnostic.open_float, "Line diagnostics")
|
||||
map("<leader>lq", vim.diagnostic.setloclist, "Diagnostics to loclist")
|
||||
end,
|
||||
})
|
||||
|
||||
-- ============================================================================
|
||||
-- General keymaps
|
||||
-- ============================================================================
|
||||
|
||||
vim.keymap.set("n", "<C-h>", "<cmd>TmuxNavigateLeft<CR>", { silent = true })
|
||||
vim.keymap.set("n", "<C-j>", "<cmd>TmuxNavigateDown<CR>", { silent = true })
|
||||
vim.keymap.set("n", "<C-k>", "<cmd>TmuxNavigateUp<CR>", { silent = true })
|
||||
vim.keymap.set("n", "<C-l>", "<cmd>TmuxNavigateRight<CR>", { silent = true })
|
||||
|
||||
|
||||
vim.keymap.set("n", "<Esc>", "<cmd>nohlsearch<CR>", { desc = "Clear search highlight" })
|
||||
|
||||
vim.keymap.set("n", "<S-h>", "<cmd>bprevious<CR>", { desc = "Previous buffer" })
|
||||
vim.keymap.set("n", "<S-l>", "<cmd>bnext<CR>", { desc = "Next buffer" })
|
||||
|
||||
vim.keymap.set("n", "<leader>bd", "<cmd>bdelete<CR>", { desc = "Delete buffer" })
|
||||
vim.keymap.set("n", "<leader>bD", "<cmd>bdelete!<CR>", { desc = "Force delete buffer" })
|
||||
vim.keymap.set("n", "<leader>bw", "<cmd>bwipe<CR>", { desc = "Wipe buffers" })
|
||||
vim.keymap.set("n", "<leader>bW", "<cmd>bwipe!<CR>", { desc = "Force wipe buffers" })
|
||||
vim.keymap.set("n", "<leader>bl", "<cmd>ls<CR>", { desc = "List buffers" })
|
||||
vim.keymap.set("n", "<leader>bb", "<cmd>buffer #<CR>", { desc = "Switch to last buffer" })
|
||||
vim.keymap.set("n", "<leader>bf", "<cmd>bfirst<CR>", { desc = "First buffer" })
|
||||
vim.keymap.set("n", "<leader>bL", "<cmd>blast<CR>", { desc = "Last buffer" })
|
||||
|
||||
vim.keymap.set("n", "[d", function()
|
||||
vim.diagnostic.jump({ count = -1 })
|
||||
end, {
|
||||
desc = "Previous diagnostic",
|
||||
})
|
||||
|
||||
vim.keymap.set("n", "]d", function()
|
||||
vim.diagnostic.jump({ count = 1 })
|
||||
end, {
|
||||
desc = "Next diagnostic",
|
||||
})
|
||||
|
||||
|
||||
-- ============================================================================
|
||||
-- Keymap help
|
||||
-- ============================================================================
|
||||
|
||||
require("which-key").setup({
|
||||
preset = "helix",
|
||||
})
|
||||
|
||||
require("which-key").add({
|
||||
{ "<leader>e", desc = "File explorer" },
|
||||
{ "<leader>E", desc = "File explorer full screen" },
|
||||
{ "<leader>f", group = "find" },
|
||||
{ "<leader>l", group = "language/lsp" },
|
||||
{ "<leader>g", group = "git" },
|
||||
{ "<leader>b", group = "buffer" },
|
||||
})
|
||||
@@ -0,0 +1,70 @@
|
||||
{
|
||||
"plugins": {
|
||||
"alpha-nvim": {
|
||||
"rev": "6c6a89d5b068b5251c8bdf0dd57bb921bcfeeb09",
|
||||
"src": "https://github.com/goolord/alpha-nvim"
|
||||
},
|
||||
"blink.cmp": {
|
||||
"rev": "3db7326f54b73df4789e0fd6274bedda33975fea",
|
||||
"src": "https://github.com/saghen/blink.cmp"
|
||||
},
|
||||
"blink.lib": {
|
||||
"rev": "b127d48bf8e9ac9cf41f6e0fbead317503f76558",
|
||||
"src": "https://github.com/saghen/blink.lib"
|
||||
},
|
||||
"fzf-lua": {
|
||||
"rev": "988416cc782dfe28bff3f0da9b8c943b236cd86a",
|
||||
"src": "https://github.com/ibhagwan/fzf-lua"
|
||||
},
|
||||
"gitsigns.nvim": {
|
||||
"rev": "25050e4ed39e628282831d4cbecb1850454ce915",
|
||||
"src": "https://github.com/lewis6991/gitsigns.nvim"
|
||||
},
|
||||
"mini.nvim": {
|
||||
"rev": "d5e6f5b843f1d813d9c4bfb242b751dc5ab6f8ae",
|
||||
"src": "https://github.com/echasnovski/mini.nvim"
|
||||
},
|
||||
"neo-tree.nvim": {
|
||||
"rev": "83e7a2982fd12b9c3d35bc39dd5877cd91a02a61",
|
||||
"src": "https://github.com/nvim-neo-tree/neo-tree.nvim",
|
||||
"version": "3.0.0 - 4.0.0"
|
||||
},
|
||||
"nui.nvim": {
|
||||
"rev": "de740991c12411b663994b2860f1a4fd0937c130",
|
||||
"src": "https://github.com/MunifTanjim/nui.nvim"
|
||||
},
|
||||
"nvim-lspconfig": {
|
||||
"rev": "229b79051b380377664edc4cbd534930154921a1",
|
||||
"src": "https://github.com/neovim/nvim-lspconfig"
|
||||
},
|
||||
"nvim-treesitter": {
|
||||
"rev": "4916d6592ede8c07973490d9322f187e07dfefac",
|
||||
"src": "https://github.com/nvim-treesitter/nvim-treesitter",
|
||||
"version": "'main'"
|
||||
},
|
||||
"nvim-web-devicons": {
|
||||
"rev": "dfbfaa967a6f7ec50789bead7ef87e336c1fa63c",
|
||||
"src": "https://github.com/nvim-tree/nvim-web-devicons"
|
||||
},
|
||||
"plenary.nvim": {
|
||||
"rev": "74b06c6c75e4eeb3108ec01852001636d85a932b",
|
||||
"src": "https://github.com/nvim-lua/plenary.nvim"
|
||||
},
|
||||
"todo-comments.nvim": {
|
||||
"rev": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668",
|
||||
"src": "https://github.com/folke/todo-comments.nvim"
|
||||
},
|
||||
"vague.nvim": {
|
||||
"rev": "8ee15ea4505d64ede559ff1cb112582a6f2ea138",
|
||||
"src": "https://github.com/vague-theme/vague.nvim"
|
||||
},
|
||||
"vim-tmux-navigator": {
|
||||
"rev": "e41c431a0c7b7388ae7ba341f01a0d217eb3a432",
|
||||
"src": "https://github.com/christoomey/vim-tmux-navigator"
|
||||
},
|
||||
"which-key.nvim": {
|
||||
"rev": "3aab2147e74890957785941f0c1ad87d0a44c15a",
|
||||
"src": "https://github.com/folke/which-key.nvim"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
add_newline = true
|
||||
command_timeout = 1000
|
||||
|
||||
format = """
|
||||
$username\
|
||||
$hostname\
|
||||
$directory\
|
||||
$git_branch\
|
||||
$git_status\
|
||||
$python\
|
||||
$nodejs\
|
||||
$rust\
|
||||
$golang\
|
||||
$cmd_duration\
|
||||
$line_break\
|
||||
$character"""
|
||||
|
||||
[character]
|
||||
success_symbol = "[❯](bold green)"
|
||||
error_symbol = "[❯](bold red)"
|
||||
vimcmd_symbol = "[❮](bold blue)"
|
||||
|
||||
[directory]
|
||||
style = "bold blue"
|
||||
truncation_length = 3
|
||||
truncate_to_repo = true
|
||||
read_only = " "
|
||||
|
||||
[git_branch]
|
||||
symbol = " "
|
||||
style = "bold mauve"
|
||||
format = "[$symbol$branch]($style) "
|
||||
|
||||
[git_status]
|
||||
style = "bold yellow"
|
||||
format = "[$all_status$ahead_behind]($style) "
|
||||
conflicted = "=${count} "
|
||||
ahead = "⇡${count} "
|
||||
behind = "⇣${count} "
|
||||
diverged = "⇕⇡${ahead_count}⇣${behind_count} "
|
||||
untracked = "?${count} "
|
||||
stashed = "\\$${count} "
|
||||
modified = "!${count} "
|
||||
staged = "+${count} "
|
||||
renamed = "»${count} "
|
||||
deleted = "✘${count} "
|
||||
|
||||
[cmd_duration]
|
||||
min_time = 500
|
||||
format = "took [$duration](bold yellow) "
|
||||
|
||||
[python]
|
||||
symbol = " "
|
||||
format = "[$symbol$version]($style) "
|
||||
style = "bold green"
|
||||
|
||||
[nodejs]
|
||||
symbol = " "
|
||||
format = "[$symbol$version]($style) "
|
||||
style = "bold green"
|
||||
|
||||
[rust]
|
||||
symbol = " "
|
||||
format = "[$symbol$version]($style) "
|
||||
style = "bold red"
|
||||
|
||||
[golang]
|
||||
symbol = " "
|
||||
format = "[$symbol$version]($style) "
|
||||
style = "bold cyan"
|
||||
@@ -0,0 +1,130 @@
|
||||
include /etc/sway/config.d/*
|
||||
|
||||
### Variables
|
||||
set $mod Mod4
|
||||
set $left h
|
||||
set $down j
|
||||
set $up k
|
||||
set $right l
|
||||
|
||||
set $term alacritty
|
||||
set $ipc qs -c noctalia-shell ipc call
|
||||
|
||||
set $b00 #141415
|
||||
set $b01 #1c1c24
|
||||
set $b02 #2f2f3d
|
||||
set $b03 #333738
|
||||
set $b04 #c3c3d5
|
||||
set $b05 #cdcdcd
|
||||
|
||||
set $red #d8647e
|
||||
set $yellow #f3be7c
|
||||
set $hint #7e98e8
|
||||
set $float #878787
|
||||
|
||||
font Hack Nerd Font 10
|
||||
default_border pixel 3
|
||||
default_floating_border pixel 3
|
||||
smart_borders no_gaps
|
||||
gaps inner 0
|
||||
gaps outer 0
|
||||
|
||||
client.focused $hint $b02 $b05 $hint
|
||||
client.focused_inactive $b01 $b01 $b04 $b01
|
||||
client.unfocused $b01 $b01 $b03 $b01
|
||||
client.urgent $red $red $b05 $red
|
||||
client.placeholder $b01 $b01 $b04 $b01
|
||||
client.background $b00
|
||||
|
||||
for_window [floating] border pixel 2
|
||||
|
||||
output * bg #000000 solid_color
|
||||
|
||||
input type:keyboard {
|
||||
xkb_layout us
|
||||
}
|
||||
|
||||
output HDMI-A-1 resolution 2560x1440 pos 0 0
|
||||
output * adaptive_sync on
|
||||
|
||||
workspace 1 output HDMI-A-1
|
||||
|
||||
workspace_auto_back_and_forth yes
|
||||
|
||||
### Key bindings
|
||||
bindsym $mod+Return exec $term
|
||||
bindsym $mod+q kill
|
||||
bindsym $mod+Space exec $ipc launcher toggle
|
||||
bindsym $mod+c exec $ipc controlCenter toggle
|
||||
bindsym $mod+s exec $ipc settings toggle
|
||||
bindsym $mod+Shift+c reload
|
||||
bindsym $mod+Shift+e exec swaymsg exit
|
||||
|
||||
bindsym $mod+Tab workspace back_and_forth
|
||||
|
||||
bindsym $mod+$left focus left
|
||||
bindsym $mod+$down focus down
|
||||
bindsym $mod+$up focus up
|
||||
bindsym $mod+$right focus right
|
||||
|
||||
bindsym $mod+Shift+$left move left
|
||||
bindsym $mod+Shift+$down move down
|
||||
bindsym $mod+Shift+$up move up
|
||||
bindsym $mod+Shift+$right move right
|
||||
|
||||
set $ws1 "1:main"
|
||||
set $ws2 "2:aux"
|
||||
set $ws3 "3:media"
|
||||
|
||||
assign [class="^[Ss]team$"] workspace $ws2
|
||||
assign [instance="steam"] workspace $ws2
|
||||
assign [class="^steam_app_.*"] workspace $ws2
|
||||
|
||||
assign [app_id="discord"] workspace $ws3
|
||||
assign [class="discord"] workspace $ws3
|
||||
|
||||
assign [class="Spotify"] workspace $ws3
|
||||
assign [app_id="spotify"] workspace $ws3
|
||||
|
||||
bindsym $mod+1 workspace $ws1
|
||||
bindsym $mod+2 workspace $ws2
|
||||
bindsym $mod+3 workspace $ws3
|
||||
bindsym $mod+4 workspace number 4
|
||||
bindsym $mod+5 workspace number 5
|
||||
bindsym $mod+6 workspace number 6
|
||||
bindsym $mod+7 workspace number 7
|
||||
bindsym $mod+8 workspace number 8
|
||||
bindsym $mod+9 workspace number 9
|
||||
bindsym $mod+0 workspace number 10
|
||||
|
||||
bindsym $mod+Shift+1 move container to workspace $ws1
|
||||
bindsym $mod+Shift+2 move container to workspace $ws2
|
||||
bindsym $mod+Shift+3 move container to workspace $ws3
|
||||
bindsym $mod+Shift+4 move container to workspace number 4
|
||||
bindsym $mod+Shift+5 move container to workspace number 5
|
||||
bindsym $mod+Shift+6 move container to workspace number 6
|
||||
bindsym $mod+Shift+7 move container to workspace number 7
|
||||
bindsym $mod+Shift+8 move container to workspace number 8
|
||||
bindsym $mod+Shift+9 move container to workspace number 9
|
||||
bindsym $mod+Shift+0 move container to workspace number 10
|
||||
|
||||
bindsym $mod+b splith
|
||||
bindsym $mod+v splitv
|
||||
|
||||
bindsym $mod+equal fullscreen
|
||||
bindsym $mod+Shift+f floating toggle
|
||||
bindsym $mod+f focus mode_toggle
|
||||
|
||||
bindsym $mod+Shift+minus move scratchpad
|
||||
bindsym $mod+minus scratchpad show
|
||||
|
||||
bindsym --locked XF86AudioRaiseVolume exec $ipc volume increase
|
||||
bindsym --locked XF86AudioLowerVolume exec $ipc volume decrease
|
||||
bindsym --locked XF86AudioMute exec $ipc volume muteOutput
|
||||
bindsym --locked XF86MonBrightnessUp exec $ipc brightness increase
|
||||
bindsym --locked XF86MonBrightnessDown exec $ipc brightness decrease
|
||||
|
||||
bindsym $mod+Shift+p exec grim -g "$(slurp)" - | wl-copy
|
||||
bindsym $mod+p exec grim - | wl-copy
|
||||
|
||||
exec_always qs -c noctalia-shell
|
||||
@@ -0,0 +1,61 @@
|
||||
unbind C-b
|
||||
set -g prefix C-a
|
||||
bind C-a send-prefix
|
||||
|
||||
bind -n M-h previous-window
|
||||
bind -n M-l next-window
|
||||
|
||||
unbind x
|
||||
bind x kill-pane
|
||||
|
||||
unbind &
|
||||
bind & kill-window
|
||||
|
||||
set -g default-terminal "tmux-256color"
|
||||
set -as terminal-overrides ',*:Tc'
|
||||
|
||||
set -g detach-on-destroy off
|
||||
set -g renumber-windows on
|
||||
set -g base-index 1
|
||||
setw -g pane-base-index 1
|
||||
|
||||
set -g status-position top
|
||||
set -g status on
|
||||
|
||||
set -g status-style "bg=default,fg=white"
|
||||
set -g status-left ""
|
||||
set -g status-right ""
|
||||
set -g status-justify centre
|
||||
|
||||
set -g window-status-format "#I: #W"
|
||||
set -g window-status-current-format "#I: #W"
|
||||
|
||||
set -g window-status-separator " "
|
||||
set -g status-interval 5
|
||||
|
||||
set -g pane-border-style "fg=colour240"
|
||||
set -g pane-active-border-style "fg=white"
|
||||
|
||||
set -g mouse on
|
||||
set -g history-limit 10000
|
||||
setw -g automatic-rename on
|
||||
|
||||
# neovim tmux navigator
|
||||
vim_pattern='(\S+/)?g?\.?(view|l?n?vim?x?|fzf)(diff)?(-wrapped)?'
|
||||
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
|
||||
| grep -iqE '^[^TXZ ]+ +${vim_pattern}$'"
|
||||
bind-key -n 'C-h' if-shell "$is_vim" 'send-keys C-h' 'select-pane -L'
|
||||
bind-key -n 'C-j' if-shell "$is_vim" 'send-keys C-j' 'select-pane -D'
|
||||
bind-key -n 'C-k' if-shell "$is_vim" 'send-keys C-k' 'select-pane -U'
|
||||
bind-key -n 'C-l' if-shell "$is_vim" 'send-keys C-l' 'select-pane -R'
|
||||
tmux_version='$(tmux -V | sed -En "s/^tmux ([0-9]+(.[0-9]+)?).*/\1/p")'
|
||||
if-shell -b '[ "$(echo "$tmux_version < 3.0" | bc)" = 1 ]' \
|
||||
"bind-key -n 'C-\\' if-shell \"$is_vim\" 'send-keys C-\\' 'select-pane -l'"
|
||||
if-shell -b '[ "$(echo "$tmux_version >= 3.0" | bc)" = 1 ]' \
|
||||
"bind-key -n 'C-\\' if-shell \"$is_vim\" 'send-keys C-\\\\' 'select-pane -l'"
|
||||
|
||||
bind-key -T copy-mode-vi 'C-h' select-pane -L
|
||||
bind-key -T copy-mode-vi 'C-j' select-pane -D
|
||||
bind-key -T copy-mode-vi 'C-k' select-pane -U
|
||||
bind-key -T copy-mode-vi 'C-l' select-pane -R
|
||||
bind-key -T copy-mode-vi 'C-\' select-pane -l
|
||||
@@ -0,0 +1,39 @@
|
||||
{
|
||||
"layer": "bottom",
|
||||
"position": "bottom",
|
||||
"height": 20,
|
||||
|
||||
"modules-left": ["sway/workspaces"],
|
||||
"modules-right": ["mpris", "pulseaudio", "temperature", "memory", "cpu", "clock", "tray"],
|
||||
|
||||
"sway/workspaces": { "disable-scroll": true },
|
||||
|
||||
"clock": { "format": "{:%a %d %b %H:%M:%S}", "interval": 1, "tooltip": false },
|
||||
|
||||
"mpris": {
|
||||
"player": "spotify",
|
||||
"format": " {title} — {artist} | ",
|
||||
"title-len": 30,
|
||||
"artist-len": 20,
|
||||
"ellipsis": true,
|
||||
"interval": 2
|
||||
},
|
||||
|
||||
"temperature": {
|
||||
"format": " | {temperatureC}°C | ",
|
||||
"critical-threshold": 80,
|
||||
"interval": 5,
|
||||
"tooltip": false
|
||||
/* If it shows 0°C, set one of these explicitly:
|
||||
"thermal-zone": 0,
|
||||
or
|
||||
"hwmon-path": "/sys/class/hwmon/hwmon0/temp1_input"
|
||||
*/
|
||||
},
|
||||
|
||||
"memory": { "format": "{percentage}% | ", "interval": 5, "tooltip": false },
|
||||
|
||||
"cpu": { "format": "{usage}% | ", "interval": 2, "tooltip": false },
|
||||
|
||||
"tray": { "spacing": 7 }
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
* {
|
||||
font-family: "Hack Nerd Font";
|
||||
font-size: 11px;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background: #141415; /* $b00 */
|
||||
color: #cdcdcd; /* $b05-ish default text */
|
||||
}
|
||||
|
||||
/* Workspaces: try to mimic your focused_workspace colors */
|
||||
#workspaces button {
|
||||
padding: 0 8px;
|
||||
margin: 0;
|
||||
border-radius: 0;
|
||||
border: 0;
|
||||
background: transparent;
|
||||
color: #c3c3d5; /* $b04 */
|
||||
}
|
||||
|
||||
#workspaces button.focused {
|
||||
background: #1c1c24; /* $b01 */
|
||||
color: #cdcdcd; /* $b05 */
|
||||
}
|
||||
|
||||
#workspaces button.urgent {
|
||||
background: #d8647e; /* $red */
|
||||
color: #141415; /* $b00 */
|
||||
}
|
||||
|
||||
/* Right side modules */
|
||||
#tray {
|
||||
padding: 0 8px;
|
||||
}
|
||||
|
||||
#custom-ministatus {
|
||||
padding: 0 8px;
|
||||
color: #cdcdcd; /* $b05 */
|
||||
}
|
||||
Reference in New Issue
Block a user