Updated config
This commit is contained in:
parent
90e01eaea4
commit
666fc20045
21 changed files with 155 additions and 199 deletions
|
@ -2,7 +2,7 @@ color_theme = "Default"
|
||||||
theme_background = False
|
theme_background = False
|
||||||
truecolor = True
|
truecolor = True
|
||||||
force_tty = False
|
force_tty = False
|
||||||
presets = "cpu:1:default,proc:0:default cpu:0:default,mem:0:default,net:0:default cpu:0:block,net:0:tty"
|
presets = "proc:0:default,cpu:1:default mem:0:default net:0:tty"
|
||||||
vim_keys = False
|
vim_keys = False
|
||||||
rounded_corners = True
|
rounded_corners = True
|
||||||
graph_symbol = "braille"
|
graph_symbol = "braille"
|
||||||
|
@ -48,7 +48,7 @@ mem_below_net = False
|
||||||
zfs_arc_cached = True
|
zfs_arc_cached = True
|
||||||
show_swap = True
|
show_swap = True
|
||||||
swap_disk = True
|
swap_disk = True
|
||||||
show_disks = True
|
show_disks = False
|
||||||
only_physical = True
|
only_physical = True
|
||||||
use_fstab = True
|
use_fstab = True
|
||||||
zfs_hide_datasets = False
|
zfs_hide_datasets = False
|
||||||
|
|
|
@ -3,6 +3,7 @@ if command -q git
|
||||||
alias g "git"
|
alias g "git"
|
||||||
alias gc "git clone"
|
alias gc "git clone"
|
||||||
alias gd "git diff --ignore-space-at-eol"
|
alias gd "git diff --ignore-space-at-eol"
|
||||||
|
alias gds "git diff --ignore-space-at-eol --compact-summary"
|
||||||
alias gl "git log --oneline"
|
alias gl "git log --oneline"
|
||||||
alias gp "git pull"
|
alias gp "git pull"
|
||||||
alias gs "git status"
|
alias gs "git status"
|
||||||
|
@ -11,6 +12,7 @@ if command -q git
|
||||||
alias h "home"
|
alias h "home"
|
||||||
alias hs "home status"
|
alias hs "home status"
|
||||||
alias hd "home diff --ignore-space-at-eol"
|
alias hd "home diff --ignore-space-at-eol"
|
||||||
|
alias hds "home diff --ignore-space-at-eol --compact-summary"
|
||||||
alias hp "home pull"
|
alias hp "home pull"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -49,9 +51,8 @@ if command -q lsof
|
||||||
end
|
end
|
||||||
|
|
||||||
# Neovim
|
# Neovim
|
||||||
if command -q nvim
|
if command -q $EDITOR
|
||||||
alias e "nvim"
|
alias e $EDITOR
|
||||||
alias n "nvim"
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# Pacman
|
# Pacman
|
||||||
|
@ -59,9 +60,9 @@ if command -q apk
|
||||||
alias p "apk"
|
alias p "apk"
|
||||||
alias pi "sudo apk add"
|
alias pi "sudo apk add"
|
||||||
alias pr "sudo apk del"
|
alias pr "sudo apk del"
|
||||||
alias pu "sudo apk update"
|
alias pu "sudo apk update && sudo apk upgrade"
|
||||||
alias pl "apk info"
|
alias pl "apk info"
|
||||||
alias powner "apk info --who-owns"
|
alias po "apk info --who-owns"
|
||||||
else if command -q pacman
|
else if command -q pacman
|
||||||
alias p "pacman"
|
alias p "pacman"
|
||||||
alias pi "sudo pacman -S"
|
alias pi "sudo pacman -S"
|
||||||
|
@ -73,7 +74,7 @@ else if command -q pacman
|
||||||
alias paur "pacman -Qm"
|
alias paur "pacman -Qm"
|
||||||
alias pfiles "pacman -Ql"
|
alias pfiles "pacman -Ql"
|
||||||
alias porphan "pacman -Qtdq"
|
alias porphan "pacman -Qtdq"
|
||||||
alias powner "pacman -Qo"
|
alias po "pacman -Qo"
|
||||||
end
|
end
|
||||||
|
|
||||||
# Sudo
|
# Sudo
|
||||||
|
|
|
@ -1,8 +1,3 @@
|
||||||
# Interactive mode
|
|
||||||
if status is-interactive
|
|
||||||
source $HOME/.config/fish/alias.fish
|
|
||||||
end
|
|
||||||
|
|
||||||
# Set environment variables from .env
|
# Set environment variables from .env
|
||||||
while read -la line
|
while read -la line
|
||||||
set -l keyval (string split -m1 "=" $line)
|
set -l keyval (string split -m1 "=" $line)
|
||||||
|
@ -12,10 +7,7 @@ while read -la line
|
||||||
set -xg $key $value
|
set -xg $key $value
|
||||||
end < ~/.env
|
end < ~/.env
|
||||||
|
|
||||||
# Add scripts to PATH
|
# Interactive mode aliases
|
||||||
fish_add_path $XDG_CONFIG_HOME/fish/scripts
|
if status is-interactive
|
||||||
|
source $HOME/.config/fish/alias.fish
|
||||||
# Add Go binaries to PATH
|
|
||||||
if command -q go
|
|
||||||
fish_add_path (go env GOPATH)/bin
|
|
||||||
end
|
end
|
|
@ -41,5 +41,4 @@ SETUVAR fish_pager_color_selected_background:\x2d\x2dbackground\x3dFFCC66
|
||||||
SETUVAR fish_pager_color_selected_completion:\x1d
|
SETUVAR fish_pager_color_selected_completion:\x1d
|
||||||
SETUVAR fish_pager_color_selected_description:\x1d
|
SETUVAR fish_pager_color_selected_description:\x1d
|
||||||
SETUVAR fish_pager_color_selected_prefix:\x1d
|
SETUVAR fish_pager_color_selected_prefix:\x1d
|
||||||
SETUVAR fish_prompt_pwd_dir_length:0
|
SETUVAR fish_prompt_pwd_dir_length:0
|
||||||
SETUVAR fish_user_paths:/home/eduard/\x2econfig/fish/scripts\x1e/home/eduard/\x2elocal/share/go/bin\x1e/home/eduard/\x2elocal/bin
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/fish
|
#!/usr/bin/fish
|
||||||
set DIRECTORIES documents music pictures projects videos
|
set DIRECTORIES documents music pictures projects videos
|
||||||
set EXCLUDES node_modules .cache .godot .svelte-kit
|
set EXCLUDES node_modules .cache .godot .svelte-kit
|
||||||
set FLAGS --archive --compress --delete --quiet
|
set FLAGS --archive --compress --delete --quiet
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/fish
|
#!/usr/bin/fish
|
||||||
echo "This will modify your git repository to count the lines of code for each commit."
|
echo "This will modify your git repository to count the lines of code for each commit."
|
||||||
read -l -P "Do you want to continue? [y/N] " CONFIRM
|
read -l -P "Do you want to continue? [y/N] " CONFIRM
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,10 @@
|
||||||
exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
|
# Autostart
|
||||||
exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
|
exec-once = swaybg -i ~/pictures/wallpapers/01.png
|
||||||
exec-once = waypaper --restore
|
|
||||||
exec-once = wl-paste --watch cliphist store
|
exec-once = wl-paste --watch cliphist store
|
||||||
exec-once = $statusbar
|
exec-once = /usr/libexec/pipewire-launcher
|
||||||
|
exec-once = $statusbar
|
||||||
|
|
||||||
|
# Disabled
|
||||||
|
#exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
|
||||||
|
#exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
|
||||||
|
#exec-once = waypaper --restore
|
|
@ -46,6 +46,7 @@ misc {
|
||||||
vfr = true
|
vfr = true
|
||||||
animate_manual_resizes = false
|
animate_manual_resizes = false
|
||||||
render_ahead_of_time = false
|
render_ahead_of_time = false
|
||||||
|
disable_hyprland_qtutils_check = true
|
||||||
}
|
}
|
||||||
|
|
||||||
cursor {
|
cursor {
|
||||||
|
@ -67,6 +68,10 @@ ecosystem {
|
||||||
no_donation_nag = true
|
no_donation_nag = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
xwayland {
|
||||||
|
enabled = false
|
||||||
|
}
|
||||||
|
|
||||||
debug {
|
debug {
|
||||||
overlay = false
|
overlay = false
|
||||||
}
|
}
|
|
@ -5,15 +5,16 @@ $logout = wlogout
|
||||||
$lockscreen = swaylock
|
$lockscreen = swaylock
|
||||||
$menu = fuzzel
|
$menu = fuzzel
|
||||||
$screenshot = IMG=~/pictures/screenshots/$(date +%Y-%m-%d_%H-%M-%S).png && grim -g "$(slurp -d)" $IMG && wl-copy < $IMG
|
$screenshot = IMG=~/pictures/screenshots/$(date +%Y-%m-%d_%H-%M-%S).png && grim -g "$(slurp -d)" $IMG && wl-copy < $IMG
|
||||||
|
$shell = fish
|
||||||
$statusbar = waybar
|
$statusbar = waybar
|
||||||
$terminal = foot
|
$terminal = foot
|
||||||
$wallpaper = waypaper
|
$wallpaper = waypaper
|
||||||
|
|
||||||
# Terminal based
|
# Terminal based
|
||||||
$editor = $terminal -e nvim
|
$editor = $terminal -e nvim
|
||||||
$files = $terminal -e yazi
|
$files = $terminal -e nnn
|
||||||
$center = [float;size 960 540;center]
|
$center = [float;size 960 540;center]
|
||||||
$floating = $center $terminal
|
$floating = $center $terminal
|
||||||
$systeminfo = $center $terminal --hold -e fastfetch
|
$systeminfo = $floating --hold -e fastfetch
|
||||||
$processmonitor = $terminal -e btop
|
$processmonitor = $floating -e btop
|
||||||
$update = $floating -e sudo pacman -Syu
|
$update = $floating -e fish
|
|
@ -1,6 +1,6 @@
|
||||||
require("boot")
|
require("boot")
|
||||||
require("settings")
|
require("settings")
|
||||||
require("lsp")
|
|
||||||
require("keys")
|
require("keys")
|
||||||
require("autocmds")
|
require("events")
|
||||||
require("usercmds")
|
require("commands")
|
||||||
|
require("languages")
|
|
@ -1,5 +1,5 @@
|
||||||
return {
|
return {
|
||||||
cmd = { "clangd", "--background-index" },
|
cmd = { "clangd", "--background-index" },
|
||||||
root_markers = { "meson_options.txt", "CMakePresets.json" },
|
root_markers = { "meson_options.txt", "CMakePresets.json", "compile_commands.json" },
|
||||||
filetypes = { "c", "cpp" },
|
filetypes = { "c", "cpp" },
|
||||||
}
|
}
|
|
@ -13,34 +13,19 @@ end
|
||||||
-- Disable plugins
|
-- Disable plugins
|
||||||
local disabled_plugins = {
|
local disabled_plugins = {
|
||||||
"2html_plugin",
|
"2html_plugin",
|
||||||
"tohtml",
|
|
||||||
"getscript",
|
|
||||||
"getscriptPlugin",
|
|
||||||
"gzip",
|
|
||||||
"logipat",
|
|
||||||
"netrw",
|
|
||||||
"netrwPlugin",
|
|
||||||
"netrwSettings",
|
|
||||||
"netrwFileHandlers",
|
|
||||||
"matchit",
|
|
||||||
"tar",
|
|
||||||
"tarPlugin",
|
|
||||||
"rrhelper",
|
|
||||||
"spellfile_plugin",
|
|
||||||
"vimball",
|
|
||||||
"vimballPlugin",
|
|
||||||
"zip",
|
|
||||||
"zipPlugin",
|
|
||||||
"tutor",
|
|
||||||
"rplugin",
|
|
||||||
"syntax",
|
|
||||||
"synmenu",
|
|
||||||
"optwin",
|
|
||||||
"compiler",
|
|
||||||
"bugreport",
|
|
||||||
"ftplugin",
|
"ftplugin",
|
||||||
|
"gzip",
|
||||||
|
"man",
|
||||||
|
"netrw",
|
||||||
|
"matchit",
|
||||||
|
"remote_plugins",
|
||||||
|
"spellfile_plugin",
|
||||||
|
"shada_plugin",
|
||||||
|
"tarPlugin",
|
||||||
|
"tutor_mode_plugin",
|
||||||
|
"zipPlugin",
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, plugin in ipairs(disabled_plugins) do
|
for _, plugin in ipairs(disabled_plugins) do
|
||||||
vim.g["loaded_" .. plugin] = 1
|
vim.g["loaded_" .. plugin] = 0
|
||||||
end
|
end
|
|
@ -11,6 +11,7 @@ vim.api.nvim_create_user_command("ToggleWord", function()
|
||||||
["yes"] = "no",
|
["yes"] = "no",
|
||||||
["Yes"] = "No",
|
["Yes"] = "No",
|
||||||
["YES"] = "NO",
|
["YES"] = "NO",
|
||||||
|
["y"] = "n",
|
||||||
["1"] = "0",
|
["1"] = "0",
|
||||||
["<"] = ">",
|
["<"] = ">",
|
||||||
["("] = ")",
|
["("] = ")",
|
|
@ -1,35 +1,18 @@
|
||||||
local on = vim.api.nvim_create_autocmd
|
local on = vim.api.nvim_create_autocmd
|
||||||
local group = vim.api.nvim_create_augroup("autocmds", {clear = true})
|
local group = vim.api.nvim_create_augroup("autocmds", {clear = true})
|
||||||
|
|
||||||
on({ "BufNewFile", "BufRead" }, {
|
|
||||||
desc = "Enable word wrap in text files and markdown documents",
|
|
||||||
group = group,
|
|
||||||
pattern = { "*.txt", "*.md" },
|
|
||||||
callback = function()
|
|
||||||
vim.opt_local.wrap = true
|
|
||||||
vim.opt_local.signcolumn = "no"
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
on({ "LspAttach" }, {
|
on({ "LspAttach" }, {
|
||||||
desc = "LSP completion",
|
desc = "LSP completion",
|
||||||
group = group,
|
group = group,
|
||||||
callback = function(ev)
|
callback = function(ev)
|
||||||
local client = vim.lsp.get_client_by_id(ev.data.client_id)
|
local client = vim.lsp.get_client_by_id(ev.data.client_id)
|
||||||
|
|
||||||
if client:supports_method("textDocument/completion") then
|
if client:supports_method("textDocument/completion") then
|
||||||
vim.lsp.completion.enable(true, client.id, ev.buf, { autotrigger = true })
|
vim.lsp.completion.enable(true, client.id, ev.buf, { autotrigger = true })
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
on({ "TermOpen", "TermEnter" }, {
|
|
||||||
desc = "Disable sign column in terminals",
|
|
||||||
group = group,
|
|
||||||
callback = function()
|
|
||||||
vim.opt_local.signcolumn = "no"
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
on({ "TextYankPost" }, {
|
on({ "TextYankPost" }, {
|
||||||
desc = "Highlight when copying text",
|
desc = "Highlight when copying text",
|
||||||
group = group,
|
group = group,
|
||||||
|
@ -38,33 +21,20 @@ on({ "TextYankPost" }, {
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
on({ "VimEnter" }, {
|
on({ "BufNewFile", "BufRead" }, {
|
||||||
desc = "Allow opening a directory and jumping to project root",
|
desc = "Enable word wrap in text files and markdown documents",
|
||||||
|
group = group,
|
||||||
|
pattern = { "*.txt", "*.md" },
|
||||||
|
callback = function()
|
||||||
|
vim.opt_local.wrap = true
|
||||||
|
vim.opt_local.signcolumn = "no"
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
on({ "TermOpen", "TermEnter" }, {
|
||||||
|
desc = "Disable sign column in terminals",
|
||||||
group = group,
|
group = group,
|
||||||
callback = function()
|
callback = function()
|
||||||
-- Change file to its directory if needed
|
vim.opt_local.signcolumn = "no"
|
||||||
local name = vim.api.nvim_buf_get_name(0)
|
|
||||||
local is_directory = vim.fn.isdirectory(name)
|
|
||||||
|
|
||||||
if is_directory == 0 then
|
|
||||||
name = vim.fs.dirname(name)
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Switch to root directory of the project
|
|
||||||
local root_patterns = { ".git", "go.mod", "init.lua" }
|
|
||||||
local root_dir = vim.fs.dirname(vim.fs.find(root_patterns, {
|
|
||||||
upward = true,
|
|
||||||
path = name,
|
|
||||||
})[1])
|
|
||||||
|
|
||||||
if root_dir then
|
|
||||||
vim.api.nvim_set_current_dir(root_dir)
|
|
||||||
else
|
|
||||||
vim.api.nvim_set_current_dir(name)
|
|
||||||
end
|
|
||||||
|
|
||||||
if is_directory ~= 0 then
|
|
||||||
--require("telescope.builtin").find_files()
|
|
||||||
end
|
|
||||||
end,
|
end,
|
||||||
})
|
})
|
|
@ -4,41 +4,37 @@ local function map(mode, lhs, rhs, info)
|
||||||
vim.keymap.set(mode, lhs, rhs, { desc = info })
|
vim.keymap.set(mode, lhs, rhs, { desc = info })
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Enter command mode without pressing shift
|
||||||
map("n", ";", ":", "Command mode")
|
map("n", ";", ":", "Command mode")
|
||||||
|
|
||||||
|
-- Undo with u, Redo with U
|
||||||
map("n", "U", "<cmd>redo<cr>", "Redo")
|
map("n", "U", "<cmd>redo<cr>", "Redo")
|
||||||
map("n", "<Bslash>", "<cmd>ToggleWord<cr>", "Toggle word")
|
|
||||||
map("n", "<C-q>", "<cmd>close<cr>", "Close window")
|
-- Quit with q like any other terminal app
|
||||||
map({"n", "v"}, "q", "<cmd>qa<cr>", "Quit all")
|
map({"n", "v"}, "q", "<cmd>qa<cr>", "Quit all")
|
||||||
map({"n", "v"}, "<leader>q", "<cmd>qa!<cr>", "Quit all")
|
map({"n", "v"}, "Q", "<cmd>qa!<cr>", "Force quit")
|
||||||
|
|
||||||
|
-- Clear search with Esc
|
||||||
map({"n", "i"}, "<esc>", "<cmd>noh<cr><esc>", "Clear search")
|
map({"n", "i"}, "<esc>", "<cmd>noh<cr><esc>", "Clear search")
|
||||||
|
|
||||||
|
-- Ctrl S to save the file from any mode
|
||||||
map({"n", "i", "s", "v"}, "<C-s>", "<cmd>w<cr><esc>", "Save file")
|
map({"n", "i", "s", "v"}, "<C-s>", "<cmd>w<cr><esc>", "Save file")
|
||||||
|
|
||||||
-- Add or delete empty lines
|
-- Grab the line and move it up/down
|
||||||
map("n", "<C-j>", "<cmd>set paste<cr>m`O<esc>``<cmd>set nopaste<cr>", "Add empty line above")
|
map("n", "<C-j>", "<cmd>set paste<cr>m`O<esc>``<cmd>set nopaste<cr>", "Add empty line above")
|
||||||
map("n", "<C-k>", "m`<cmd>-g/\\m^\\s*$/d<cr>``<cmd>noh<cr>", "Delete empty line above")
|
map("n", "<C-k>", "m`<cmd>-g/\\m^\\s*$/d<cr>``<cmd>noh<cr>", "Delete empty line above")
|
||||||
|
|
||||||
|
-- Grab the line below and move it up/down
|
||||||
map("n", "<A-j>", "<cmd>set paste<cr>m`o<esc>``<cmd>set nopaste<cr>", "Add empty line below")
|
map("n", "<A-j>", "<cmd>set paste<cr>m`o<esc>``<cmd>set nopaste<cr>", "Add empty line below")
|
||||||
map("n", "<A-k>", "m`<cmd>+g/\\m^\\s*$/d<cr>``<cmd>noh<cr>", "Delete empty line below")
|
map("n", "<A-k>", "m`<cmd>+g/\\m^\\s*$/d<cr>``<cmd>noh<cr>", "Delete empty line below")
|
||||||
|
|
||||||
-- Quick movement
|
-- Horizontal movement
|
||||||
map("n", "J", "}", "Next paragraph")
|
map({"n", "v"}, "H", "^", "Beginning of line")
|
||||||
map("n", "K", "{", "Previous paragraph")
|
map({"n", "v"}, "L", "<end>", "End of line")
|
||||||
|
|
||||||
-- Editing multiple instances
|
-- Vertical movement
|
||||||
map("n", "<f2>", "*#:%s//<C-r><C-w>/g<left><left>", "Replace word under cursor")
|
map({"n", "v"}, "J", "}", "Next paragraph")
|
||||||
map("v", "<f2>", "y/<C-r>\"<cr>N:%s//<C-r>\"/g<left><left>", "Replace selection")
|
map({"n", "v"}, "K", "{", "Previous paragraph")
|
||||||
map("n", "<f3>", "#*", "Search word under cursor")
|
|
||||||
map("v", "<f3>", "y/<C-r>\"<cr>N", "Search selection")
|
|
||||||
|
|
||||||
-- Line movement
|
|
||||||
map({"n", "v"}, "<C-b>", "^", "Beginning of line")
|
|
||||||
map("i", "<C-b>", "<esc>^i", "Beginning of line")
|
|
||||||
map({"i", "n", "v"}, "<C-e>", "<end>", "End of line")
|
|
||||||
|
|
||||||
-- Increasing and decreasing numbers
|
|
||||||
map("n", "+", "<C-a>", "Increase number")
|
|
||||||
map("n", "-", "<C-x>", "Decrease number")
|
|
||||||
map("n", "<kPlus>", "<C-a>", "Increase number")
|
|
||||||
map("n", "<kMinus>", "<C-x>", "Decrease number")
|
|
||||||
|
|
||||||
-- Indenting
|
-- Indenting
|
||||||
map("n", "<Tab>", "V>gv<esc>")
|
map("n", "<Tab>", "V>gv<esc>")
|
||||||
|
@ -46,24 +42,26 @@ map("n", "<S-Tab>", "V<gv<esc>")
|
||||||
map("v", "<Tab>", ">gv")
|
map("v", "<Tab>", ">gv")
|
||||||
map("v", "<S-Tab>", "<gv")
|
map("v", "<S-Tab>", "<gv")
|
||||||
|
|
||||||
-- Shift arrow selection
|
-- Toggle word
|
||||||
map("n", "<S-Up>", "v<Up>")
|
map("n", "<Bslash>", "<cmd>ToggleWord<cr>", "Toggle word")
|
||||||
map("n", "<S-Down>", "v<Down>")
|
|
||||||
map("n", "<S-Left>", "v<Left>")
|
|
||||||
map("n", "<S-Right>", "v<Right>")
|
|
||||||
|
|
||||||
map("v", "<S-Up>", "<Up>")
|
-- Increasing and decreasing numbers
|
||||||
map("v", "<S-Down>", "<Down>")
|
map("n", "+", "<C-a>", "Increase number")
|
||||||
map("v", "<S-Left>", "<Left>")
|
map("n", "-", "<C-x>", "Decrease number")
|
||||||
map("v", "<S-Right>", "<Right>")
|
map("n", "<kPlus>", "<C-a>", "Increase number")
|
||||||
|
map("n", "<kMinus>", "<C-x>", "Decrease number")
|
||||||
|
|
||||||
map("i", "<S-Up>", "<Esc>v<Up>")
|
-- Replace all instances
|
||||||
map("i", "<S-Down>", "<Esc>v<Down>")
|
map("n", "<f2>", "*#:%s//<C-r><C-w>/g<left><left>", "Replace word under cursor")
|
||||||
map("i", "<S-Left>", "<Esc>v<Left>")
|
map("v", "<f2>", "y/<C-r>\"<cr>N:%s//<C-r>\"/g<left><left>", "Replace selection")
|
||||||
map("i", "<S-Right>", "<Esc>v<Right>")
|
|
||||||
|
|
||||||
-- Window switching
|
-- Search all instances
|
||||||
|
map("n", "<f3>", "#*", "Search word under cursor")
|
||||||
|
map("v", "<f3>", "y/<C-r>\"<cr>N", "Search selection")
|
||||||
|
|
||||||
|
-- Window management
|
||||||
map("n", "<A-Up>", "<C-w>k", "Move to the window above")
|
map("n", "<A-Up>", "<C-w>k", "Move to the window above")
|
||||||
map("n", "<A-Down>", "<C-w>j", "Move to the window below")
|
map("n", "<A-Down>", "<C-w>j", "Move to the window below")
|
||||||
map("n", "<A-Left>", "<C-w>h", "Move to the window on the left")
|
map("n", "<A-Left>", "<C-w>h", "Move to the window on the left")
|
||||||
map("n", "<A-Right>", "<C-w>l", "Move to the window on the right")
|
map("n", "<A-Right>", "<C-w>l", "Move to the window on the right")
|
||||||
|
map("n", "<A-q>", "<cmd>close<cr>", "Close window")
|
|
@ -1,7 +1,9 @@
|
||||||
|
-- Virtual text
|
||||||
vim.diagnostic.config({
|
vim.diagnostic.config({
|
||||||
virtual_lines = true,
|
virtual_lines = true,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
-- LSP
|
||||||
vim.lsp.enable({
|
vim.lsp.enable({
|
||||||
"clangd",
|
"clangd",
|
||||||
"gopls",
|
"gopls",
|
|
@ -43,8 +43,4 @@ opt.statusline = "%{repeat('─',winwidth('.'))}"
|
||||||
|
|
||||||
-- Undo
|
-- Undo
|
||||||
opt.undofile = true
|
opt.undofile = true
|
||||||
opt.undolevels = 10000
|
opt.undolevels = 10000
|
||||||
|
|
||||||
-- Virtual text
|
|
||||||
vim.diagnostic.config({ virtual_lines = true })
|
|
||||||
vim.lsp.enable({"clangd", "gopls", "rust-analyzer"})
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"layer": "top",
|
"layer": "top",
|
||||||
"position": "top",
|
"position": "top",
|
||||||
"modules-left": ["cpu", "custom/gpu", "memory", "disk"],
|
"modules-left": ["cpu", "memory", "disk"],
|
||||||
"modules-center": ["hyprland/workspaces"],
|
"modules-center": ["hyprland/workspaces"],
|
||||||
"modules-right": ["wireplumber", "clock"],
|
"modules-right": ["wireplumber", "clock"],
|
||||||
"include": "~/.config/waybar/modules.jsonc",
|
"include": "~/.config/waybar/modules.jsonc",
|
||||||
|
|
|
@ -1,9 +1,52 @@
|
||||||
{
|
{
|
||||||
"cpu": {
|
"cpu": {
|
||||||
"interval": 2,
|
"interval": 2,
|
||||||
"format": "{icon} {usage}%",
|
"format": " {usage}%",
|
||||||
"format-icons": [" ", " ", " "],
|
"on-click": "$TERMINAL -- btop --preset 1",
|
||||||
"on-click": "$TERMINAL -- btop",
|
},
|
||||||
|
"memory": {
|
||||||
|
"interval": 2,
|
||||||
|
"format": " {used} G",
|
||||||
|
"on-click": "$TERMINAL -- btop --preset 2",
|
||||||
|
},
|
||||||
|
"disk": {
|
||||||
|
"interval": 30,
|
||||||
|
"format": " {specific_used:0.0f} G",
|
||||||
|
"path": "/",
|
||||||
|
"unit": "GiB",
|
||||||
|
"on-click": "$TERMINAL -- nnn -Td /",
|
||||||
|
},
|
||||||
|
"hyprland/workspaces": {
|
||||||
|
"format": "{icon}",
|
||||||
|
"persistent-workspaces": {
|
||||||
|
"*": 9
|
||||||
|
},
|
||||||
|
"format-icons": {
|
||||||
|
"default": " ",
|
||||||
|
"empty": " ",
|
||||||
|
"active": " ",
|
||||||
|
"urgent": " ",
|
||||||
|
},
|
||||||
|
"sort-by-number": true,
|
||||||
|
"on-click": "activate",
|
||||||
|
},
|
||||||
|
"wireplumber": {
|
||||||
|
"format": "{icon} {volume}%",
|
||||||
|
"format-muted": " ",
|
||||||
|
"format-icons": [" ", " ", " "],
|
||||||
|
"scroll-step": 2,
|
||||||
|
"on-click": "easyeffects",
|
||||||
|
},
|
||||||
|
"clock": {
|
||||||
|
"interval": 60,
|
||||||
|
"format": " {:%H:%M}",
|
||||||
|
"tooltip-format": "<tt>{calendar}</tt>",
|
||||||
|
"calendar": {
|
||||||
|
"format": {
|
||||||
|
"today": "<span color='#fAfBfC'><b>{}</b></span>"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"on-click": "date -u +'%Y-%m-%dT%H:%M:%SZ' | wl-copy",
|
||||||
},
|
},
|
||||||
"custom/gpu": {
|
"custom/gpu": {
|
||||||
"interval": 2,
|
"interval": 2,
|
||||||
|
@ -12,18 +55,6 @@
|
||||||
"return-type": "",
|
"return-type": "",
|
||||||
"on-click": "$TERMINAL -- nvtop",
|
"on-click": "$TERMINAL -- nvtop",
|
||||||
},
|
},
|
||||||
"memory": {
|
|
||||||
"interval": 2,
|
|
||||||
"format": " {used} G",
|
|
||||||
"on-click": "$TERMINAL -- btop",
|
|
||||||
},
|
|
||||||
"disk": {
|
|
||||||
"interval": 30,
|
|
||||||
"format": " {specific_used:0.0f} G",
|
|
||||||
"path": "/",
|
|
||||||
"unit": "GiB",
|
|
||||||
"on-click": "$TERMINAL -- dua i /",
|
|
||||||
},
|
|
||||||
"custom/pacman": {
|
"custom/pacman": {
|
||||||
"format": " {}",
|
"format": " {}",
|
||||||
"interval": 30,
|
"interval": 30,
|
||||||
|
@ -57,36 +88,4 @@
|
||||||
"tooltip-format": "Number of processes with UDP connections",
|
"tooltip-format": "Number of processes with UDP connections",
|
||||||
"on-click": "$TERMINAL -- bandwhich",
|
"on-click": "$TERMINAL -- bandwhich",
|
||||||
},
|
},
|
||||||
"hyprland/workspaces": {
|
|
||||||
"format": "{icon}",
|
|
||||||
"persistent-workspaces": {
|
|
||||||
"*": 9
|
|
||||||
},
|
|
||||||
"format-icons": {
|
|
||||||
"default": " ",
|
|
||||||
"empty": " ",
|
|
||||||
"active": " ",
|
|
||||||
"urgent": " ",
|
|
||||||
},
|
|
||||||
"sort-by-number": true,
|
|
||||||
"on-click": "activate",
|
|
||||||
},
|
|
||||||
"wireplumber": {
|
|
||||||
"format": "{icon} {volume}%",
|
|
||||||
"format-muted": " ",
|
|
||||||
"format-icons": [" ", " ", " "],
|
|
||||||
"scroll-step": 2,
|
|
||||||
"on-click": "easyeffects",
|
|
||||||
},
|
|
||||||
"clock": {
|
|
||||||
"interval": 60,
|
|
||||||
"format": " {:%H:%M}",
|
|
||||||
"tooltip-format": "<tt>{calendar}</tt>",
|
|
||||||
"calendar": {
|
|
||||||
"format": {
|
|
||||||
"today": "<span color='#fAfBfC'><b>{}</b></span>"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"on-click": "date -u +'%Y-%m-%dT%H:%M:%SZ' | wl-copy",
|
|
||||||
},
|
|
||||||
}
|
}
|
|
@ -6,13 +6,13 @@
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
"label" : "shutdown",
|
"label" : "shutdown",
|
||||||
"action" : "systemctl poweroff",
|
"action" : "doas poweroff",
|
||||||
"text" : "Shutdown",
|
"text" : "Shutdown",
|
||||||
"keybind" : "s"
|
"keybind" : "s"
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
"label" : "reboot",
|
"label" : "reboot",
|
||||||
"action" : "systemctl reboot",
|
"action" : "doas reboot",
|
||||||
"text" : "Reboot",
|
"text" : "Reboot",
|
||||||
"keybind" : "r"
|
"keybind" : "r"
|
||||||
}
|
}
|
||||||
|
|
4
.env
4
.env
|
@ -15,9 +15,11 @@ NUGET_PACKAGES=$XDG_CACHE_HOME/nuget
|
||||||
RUSTUP_HOME=$XDG_DATA_HOME/rustup
|
RUSTUP_HOME=$XDG_DATA_HOME/rustup
|
||||||
W3M_DIR=$XDG_DATA_HOME/w3m
|
W3M_DIR=$XDG_DATA_HOME/w3m
|
||||||
WINEPREFIX=$XDG_DATA_HOME/wine
|
WINEPREFIX=$XDG_DATA_HOME/wine
|
||||||
|
GOAMD64=v3
|
||||||
BROWSER=firefox
|
BROWSER=firefox
|
||||||
EDITOR=nvim
|
EDITOR=nvim
|
||||||
LANG=en_US.UTF-8
|
LANG=en_US.UTF-8
|
||||||
PAGER=less
|
PAGER=less
|
||||||
SSH_AUTH_SOCK=$XDG_RUNTIME_DIR/ssh-agent.socket
|
SSH_AUTH_SOCK=$XDG_RUNTIME_DIR/ssh-agent.socket
|
||||||
TERMINAL=foot
|
TERMINAL=foot
|
||||||
|
PATH=$XDG_CONFIG_HOME/fish/scripts:$XDG_BIN_HOME:$CARGO_HOME/bin:$GOPATH/bin:/usr/lib/ccache/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
Loading…
Add table
Add a link
Reference in a new issue