Compare commits

...

10 commits

Author SHA1 Message Date
20799af627
Updated config 2025-06-05 17:57:36 +02:00
b4eece087b
Updated config 2025-05-31 23:53:44 +02:00
6d21f3887c
Updated config 2025-05-31 23:51:11 +02:00
5f0343b67b
Updated config 2025-05-28 16:56:54 +02:00
666fc20045
Updated config 2025-05-28 16:39:25 +02:00
90e01eaea4
Updated config 2025-05-21 22:52:41 +02:00
6df433b2fd
Updated config 2025-05-18 16:43:32 +02:00
2b10bd8763
Updated config 2025-05-18 16:38:24 +02:00
557f33c14a
Updated config 2025-05-18 15:59:57 +02:00
285360a1dc
Updated config 2025-05-17 17:12:25 +02:00
62 changed files with 627 additions and 925 deletions

View file

@ -2,8 +2,8 @@ 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 = True
rounded_corners = True rounded_corners = True
graph_symbol = "braille" graph_symbol = "braille"
graph_symbol_cpu = "default" graph_symbol_cpu = "default"
@ -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

View file

@ -1,16 +1,5 @@
{ {
"input": { "input": {
"bass_enhancer#0": {
"amount": 3.0,
"blend": 0.0,
"bypass": false,
"floor": 12.0,
"floor-active": true,
"harmonics": 10.0,
"input-gain": 0.0,
"output-gain": 0.0,
"scope": 150.0
},
"blocklist": [], "blocklist": [],
"limiter#0": { "limiter#0": {
"alr": false, "alr": false,
@ -34,7 +23,7 @@
}, },
"plugins_order": [ "plugins_order": [
"rnnoise#0", "rnnoise#0",
"bass_enhancer#0", "speex#0",
"limiter#0" "limiter#0"
], ],
"rnnoise#0": { "rnnoise#0": {
@ -46,6 +35,20 @@
"release": 20.0, "release": 20.0,
"vad-thres": 50.0, "vad-thres": 50.0,
"wet": 0.0 "wet": 0.0
},
"speex#0": {
"bypass": false,
"enable-agc": false,
"enable-denoise": true,
"enable-dereverb": true,
"input-gain": 0.0,
"noise-suppression": -70,
"output-gain": 0.0,
"vad": {
"enable": true,
"probability-continue": 90,
"probability-start": 95
}
} }
} }
} }

View file

@ -1,15 +1,15 @@
{ {
"output": { "output": {
"bass_enhancer#0": { "bass_enhancer#0": {
"amount": 3.0, "amount": 0.0,
"blend": 0.0, "blend": 0.0,
"bypass": false, "bypass": false,
"floor": 12.0, "floor": 12.0,
"floor-active": true, "floor-active": true,
"harmonics": 10.0, "harmonics": 8.5,
"input-gain": 0.0, "input-gain": 0.0,
"output-gain": 0.0, "output-gain": 0.0,
"scope": 150.0 "scope": 100.0
}, },
"blocklist": [], "blocklist": [],
"filter#0": { "filter#0": {

View file

@ -1,6 +0,0 @@
XDG_CACHE_HOME=$HOME/.cache
XDG_CONFIG_HOME=$HOME/.config
XDG_DATA_HOME=$HOME/.local/share
XDG_BIN_HOME=$HOME/.local/bin
XDG_LIB_HOME=$HOME/.local/lib
XDG_STATE_HOME=$HOME/.local/state

View file

@ -1,11 +0,0 @@
CARGO_HOME=$XDG_DATA_HOME/cargo
CUDA_CACHE_PATH=$XDG_CACHE_HOME/nv
DOTNET_CLI_HOME=$XDG_DATA_HOME/dotnet
GOPATH=$XDG_DATA_HOME/go
GTK2_RC_FILES=$XDG_CONFIG_HOME/gtk-2.0/gtkrc
HISTFILE=$XDG_STATE_HOME/bash/history
NIMBLE_DIR=$XDG_DATA_HOME/nimble
NUGET_PACKAGES=$XDG_CACHE_HOME/nuget
RUSTUP_HOME=$XDG_DATA_HOME/rustup
W3M_DIR=$XDG_DATA_HOME/w3m
WINEPREFIX=$XDG_DATA_HOME/wine

View file

@ -1,6 +0,0 @@
BROWSER=firefox
EDITOR=nvim
LANG=en_US.UTF-8
PAGER=less
SSH_AUTH_SOCK=$XDG_RUNTIME_DIR/ssh-agent.socket
TERMINAL=foot

View file

@ -1,84 +1,124 @@
# Git # Git
alias g "git" if command -q git
alias gc "git clone" alias g "git"
alias gd "git diff --ignore-space-at-eol" alias gc "git clone"
alias gl "git log --oneline" alias gd "git diff --ignore-space-at-eol"
alias gp "git pull" alias gds "git diff --ignore-space-at-eol --compact-summary"
alias gs "git status" alias gl "git log --oneline"
alias gp "git pull"
alias gs "git status"
alias home "git --git-dir=$HOME/.home/ --work-tree=$HOME"
alias homeinit "git clone --bare https://git.urbach.dev/sys/home $HOME/.home && home checkout"
alias h "home"
alias hs "home status"
alias hd "home diff --ignore-space-at-eol"
alias hds "home diff --ignore-space-at-eol --compact-summary"
alias hp "home pull"
end
# Go # Go
alias gb "go build -v" if command -q go
alias godeps "go list -f '{{ join .Deps \"\n\"}}' ." alias gb "go build -v"
alias gt "go test -v" alias godeps "go list -f '{{ join .Deps \"\n\"}}' ."
alias gts "gotestsum" alias gt "go test -v"
alias gts "gotestsum"
# Home end
alias home "git --git-dir=$HOME/.home/ --work-tree=$HOME"
alias homeinit "git clone --bare https://git.urbach.dev/sys/home $HOME/.home && home checkout"
alias h "home"
alias hs "home status"
alias hd "home diff --ignore-space-at-eol"
alias hp "home pull"
# Hyperfine # Hyperfine
alias bench "hyperfine --shell=none" if command -q hyperfine
alias bench "hyperfine --shell=none"
end
# Kernel # Kernel
alias kerr "sudo dmesg --level=emerg,alert,crit,err" if command -q dmesg
alias klog "sudo dmesg" alias kerr "sudo dmesg --level=emerg,alert,crit,err"
alias klog "sudo dmesg"
end
# List # List
alias l "ls" if command -q ls
alias ll "ls -l" alias l "ls"
alias l2 "ls -T -L2" alias ll "ls -l"
alias lu "ls -l --total-size --sort=size --reverse --no-permissions --no-user --no-time" alias l2 "ls -T -L2"
alias lp "ls -l --no-filesize --no-time" alias lu "ls -l --total-size --sort=size --reverse --no-permissions --no-user --no-time"
alias lp "ls -l --no-filesize --no-time"
end
# Lsof # Lsof
alias tcp "lsof -PniTCP" if command -q lsof
alias udp "lsof -PniUDP" alias tcp "lsof -PniTCP"
alias udp "lsof -PniUDP"
end
# MPV
if command -q mpv
alias music "mpv music --shuffle --no-video"
end
# Neovim # Neovim
alias e "nvim" if command -q nvim
alias n "nvim" alias e nvim
end
# Pacman # Pacman
alias p "pacman" if command -q apk
alias pi "sudo pacman -S" alias p "apk"
alias pr "sudo pacman -Rs" alias pi "sudo apk add"
alias pu "sudo pacman -Syu" alias pr "sudo apk del"
alias pl "pacman -Qq" alias pu "sudo apk update && sudo apk upgrade"
alias pe "pacman -Qe" alias pl "apk info"
alias pc "sudo pacman -Sc" alias po "apk info --who-owns"
alias paur "pacman -Qm" else if command -q pacman
alias pfiles "pacman -Ql" alias p "pacman"
alias porphan "pacman -Qtdq" alias pi "sudo pacman -S"
alias powner "pacman -Qo" alias pr "sudo pacman -Rs"
alias pu "sudo pacman -Syu"
alias pl "pacman -Qq"
alias pe "pacman -Qe"
alias pc "sudo pacman -Sc"
alias paur "pacman -Qm"
alias pfiles "pacman -Ql"
alias porphan "pacman -Qtdq"
alias po "pacman -Qo"
end
# Sudo
if command -q doas
alias sudo "doas"
end
# Systemctl # Systemctl
alias start "sudo systemctl start" if command -q service
alias stop "sudo systemctl stop" alias services "service -l"
alias enable "sudo systemctl enable" else if command -q systemctl
alias disable "sudo systemctl disable" alias start "sudo systemctl start"
alias restart "sudo systemctl restart" alias stop "sudo systemctl stop"
alias running "systemctl list-units --type=service --state=running" alias enable "sudo systemctl enable"
alias disabled "systemctl list-unit-files --type=service --state=disabled" alias disable "sudo systemctl disable"
alias enabled "systemctl list-unit-files --type=service --state=enabled" alias restart "sudo systemctl restart"
alias timers "systemctl list-timers" alias running "systemctl list-units --type=service --state=running"
alias disabled "systemctl list-unit-files --type=service --state=disabled"
alias enabled "systemctl list-unit-files --type=service --state=enabled"
alias timers "systemctl list-timers"
alias bios "systemctl reboot --firmware-setup"
end
# Tmux # Tmux
alias ta "tmux attach" if command -q tmux
alias td "tmux detach" alias ta "tmux attach"
alias tl "tmux ls" alias td "tmux detach"
alias tk "tmux kill-server" alias tl "tmux ls"
alias tk "tmux kill-server"
end
# ... # ...
alias bios "systemctl reboot --firmware-setup" alias align "column -t -o ' '"
alias cfg "config" alias cfg "config"
alias cls "clear" alias cls "clear"
alias debug "blinkenlights" alias debug "blinkenlights"
alias disasm "llvm-objdump --disassembler-color=on --x86-asm-syntax=intel -d" alias disasm "llvm-objdump --disassembler-color=on --x86-asm-syntax=intel -d"
alias ff "fastfetch" alias ff "fastfetch"
alias fn "rg --files | rg"
alias hex "hexdump -C" alias hex "hexdump -C"
alias log "journalctl" alias log "journalctl"
alias utc "date -u +'%Y-%m-%dT%H:%M:%SZ'" alias utc "date -u +'%Y-%m-%dT%H:%M:%SZ'"

View file

@ -1,16 +1,13 @@
# Interactive mode
if status is-interactive if status is-interactive
# Aliases
source $HOME/.config/fish/alias.fish source $HOME/.config/fish/alias.fish
set -x LS_COLORS di=0:ln=0:so=0:pi=0:ex=0:bd=0:cd=0:su=0:sg=0:tw=0:ow=0
end
# Load systemd user environment # Set environment variables from .env
set GENERATOR /usr/lib/systemd/user-environment-generators/30-systemd-environment-d-generator while read -la line
set -l keyval (string split -m1 "=" $line)
if test -e $GENERATOR set -l key (string trim $keyval[1])
export ($GENERATOR) set -l value (string trim $keyval[2..])
end set -l value (eval echo $value)
set -xg $key $value
# Add to PATH end < ~/.env
fish_add_path (go env GOPATH)/bin end
fish_add_path $XDG_CONFIG_HOME/fish/scripts

View file

@ -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

View file

@ -1,3 +1,3 @@
function config function config
$EDITOR $HOME/.config/$argv f $HOME/.config/$argv
end end

View file

@ -1,8 +1,19 @@
function f function f --wraps nnn --description 'support nnn quit and change directory'
set tmp (mktemp -t "yazi-cwd.XXXXXX") if test -n "$NNNLVL" -a "$NNNLVL" -ge 1
yazi $argv --cwd-file="$tmp" echo "nnn is already running"
if set cwd (command cat -- "$tmp"); and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ] return
builtin cd -- "$cwd" end
if test -n "$XDG_CONFIG_HOME"
set -x NNN_TMPFILE "$XDG_CONFIG_HOME/nnn/.lastd"
else
set -x NNN_TMPFILE "$HOME/.config/nnn/.lastd"
end
command nnn $argv
if test -e $NNN_TMPFILE
source $NNN_TMPFILE
rm -- $NNN_TMPFILE
end end
rm -f -- "$tmp"
end end

View file

@ -1,4 +1,4 @@
function ls function ls --wraps eza
if command -q eza if command -q eza
eza --group-directories-first --time-style relative -T -L1 $argv eza --group-directories-first --time-style relative -T -L1 $argv
else else

View file

@ -8,7 +8,13 @@ end
function init_session function init_session
tmux new-session -d -s main -d -x (tput cols) -y (tput lines) tmux new-session -d -s main -d -x (tput cols) -y (tput lines)
tmux split-window -v -l 10 journalctl -f
if command -q journalctl
tmux split-window -v -l 10 journalctl -f
else if command -q logread
tmux split-window -v -l 10 logread -f
end
tmux select-pane -t 0 tmux select-pane -t 0
tmux split-window -h -l 50 btop tmux split-window -h -l 50 btop
tmux select-pane -t 0 tmux select-pane -t 0

View file

@ -1,20 +1,26 @@
#!/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 -avz --delete set FLAGS --archive --compress --delete --human-readable --progress
set HOSTS $argv set HOSTS $argv
set USER (whoami) set USER (whoami)
set DESTINATION "~/files/" set DESTINATION "~/"
for exclude in $EXCLUDES for exclude in $EXCLUDES
set -a FLAGS --exclude $exclude set -a FLAGS --exclude $exclude
end end
for host in $HOSTS for host in $HOSTS
echo "[$host]" set_color yellow
echo " $host"
for DIR in $DIRECTORIES for dir in $DIRECTORIES
echo "Backing up $DIR..." set_color blue
rsync $FLAGS ~/$DIR $USER@$host:$DESTINATION echo "  $dir"
set_color normal
rsync $FLAGS ~/$dir $host:$DESTINATION
end end
echo ""
end end

View file

@ -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

View file

@ -1,5 +1,12 @@
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 = $statusbar
exec-once = ssh-agent -D -a $SSH_AUTH_SOCK
exec-once = openrc --user gui
# Disabled
#exec-once = /usr/libexec/pipewire-launcher
#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

View file

@ -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 {
@ -55,7 +56,7 @@ cursor {
input { input {
accel_profile = flat accel_profile = flat
sensitivity = 0 sensitivity = -0.75
} }
dwindle { dwindle {
@ -67,6 +68,10 @@ ecosystem {
no_donation_nag = true no_donation_nag = true
} }
xwayland {
enabled = false
}
debug { debug {
overlay = false overlay = false
} }

View file

@ -2,24 +2,26 @@ $main = SUPER
# Apps # Apps
bind = $main, B, exec, $browser bind = $main, B, exec, $browser
bind = $main, D, exec, $editor bind = $main, E, exec, $editor
bind = $main, E, exec, $files bind = $main, F, exec, $files
bind = $main, F1, exec, $systeminfo bind = $main, K, exec, $calendar
bind = $main, L, exec, $lockscreen bind = $main, L, exec, $lockscreen
bind = $main, M, exec, $email
bind = $main, P, exec, $processmonitor bind = $main, P, exec, $processmonitor
bind = $main, Return, exec, $floating
bind = $main, S, exec, pkill $statusbar || $statusbar bind = $main, S, exec, pkill $statusbar || $statusbar
bind = $main, Space, exec, pkill $menu || $menu
bind = $main, T, exec, $terminal bind = $main, T, exec, $terminal
bind = $main, W, exec, $wallpaper bind = $main, W, exec, $wallpaper
bind = $main, U, exec, $update bind = $main, U, exec, $update
bind = , Print, exec, $screenshot bind = $main, F1, exec, $systeminfo
bind = $main, Return, exec, $floating
bind = $main, Space, exec, pkill $menu || $menu
bind =, Print, exec, $screenshot
# Window management # Window management
bind = $main, C, killactive, bind = $main, C, killactive,
bind = $main, F, fullscreen,
bind = $main, V, togglefloating,
bind = $main, J, togglesplit, bind = $main, J, togglesplit,
bind = $main, V, togglefloating,
bind = $main, Super_R, fullscreen,
# Session management # Session management
bind = $main, Backspace, exit, bind = $main, Backspace, exit,
@ -88,6 +90,6 @@ bindl =, XF86AudioNext, exec, playerctl next
bindl =, XF86AudioPrev, exec, playerctl previous bindl =, XF86AudioPrev, exec, playerctl previous
# Volume control # Volume control
bindle =, XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.05+ bindle =, XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.02+
bindle =, XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.05- bindle =, XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.02-
bindl =, XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle bindl =, XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle

View file

@ -1,19 +1,21 @@
# Apps # Apps
$browser = firefox $browser = firefox
$email = evolution
$files = thunar
$logout = wlogout $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
$calendar = $terminal -e calcurse
$editor = $terminal -e nvim $editor = $terminal -e nvim
$email = $terminal -e aerc
$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

View file

@ -0,0 +1,246 @@
vim.cmd("highlight clear")
vim.o.background = "dark"
vim.o.termguicolors = true
vim.g.colors_name = "monokai"
local c = {
base0 = "#222426",
base1 = "#272a30",
base2 = "#26292C",
base3 = "#2E323C",
base4 = "#333842",
base5 = "#4d5154",
base6 = "#9ca0a4",
base7 = "#b1b1b1",
base8 = "#e3e3e1",
border = "#a1b5b1",
brown = "#504945",
white = "#f8f8f0",
grey = "#8F908A",
black = "#000000",
pink = "#f92672",
green = "#a6e22e",
aqua = "#66d9ef",
yellow = "#e6db74",
orange = "#fd971f",
purple = "#ae81ff",
red = "#e95678",
diff_add = "#3d5213",
diff_remove = "#4a0f23",
diff_change = "#27406b",
diff_text = "#23324d",
}
local hl = function(group, opts)
vim.api.nvim_set_hl(0, group, opts)
end
-- Syntax
hl("Normal", { fg = c.white, bg = c.base2 })
hl("NormalFloat", { bg = c.base1 })
hl("Pmenu", { fg = c.white, bg = c.base3 })
hl("PmenuSel", { fg = c.base4, bg = c.orange })
hl("PmenuSelBold", { fg = c.base4, bg = c.orange })
hl("PmenuThumb", { fg = c.purple, bg = c.green })
hl("PmenuSbar", { bg = c.base3 })
hl("Cursor", { reverse = true })
hl("ColorColumn", { bg = c.base3 })
hl("CursorLine", { bg = c.base3 })
hl("NonText", { fg = c.base5 })
hl("Visual", { bg = c.base4 })
hl("VisualNOS", { bg = c.base3 })
hl("Search", { fg = c.base2, bg = c.yellow })
hl("IncSearch", { fg = c.base2, bg = c.orange })
hl("CursorLineNr", { fg = c.orange, bg = c.base2 })
hl("MatchParen", { fg = c.pink })
hl("Question", { fg = c.yellow })
hl("ModeMsg", { fg = c.white, bold = true })
hl("MoreMsg", { fg = c.white, bold = true })
hl("ErrorMsg", { fg = c.red, bold = true })
hl("WarningMsg", { fg = c.yellow, bold = true })
hl("VertSplit", { fg = c.brown })
hl("LineNr", { fg = c.base5, bg = c.base2 })
hl("SignColumn", { fg = c.white, bg = c.base2 })
hl("StatusLine", { fg = c.base7, bg = c.base3 })
hl("StatusLineNC", { fg = c.grey, bg = c.base3 })
hl("Tabline", {})
hl("TabLineFill", {})
hl("TabLineSel", { bg = c.base4 })
hl("SpellBad", { fg = c.red, undercurl = true })
hl("SpellCap", { fg = c.purple, undercurl = true })
hl("SpellRare", { fg = c.aqua, undercurl = true })
hl("SpellLocal", { fg = c.pink, undercurl = true })
hl("SpecialKey", { fg = c.pink })
hl("Title", { fg = c.yellow, bold = true })
hl("Directory", { fg = c.aqua })
hl("DiffAdd", { bg = c.diff_add })
hl("DiffDelete", { bg = c.diff_remove })
hl("DiffChange", { bg = c.diff_change })
hl("DiffText", { bg = c.diff_text })
hl("diffAdded", { fg = c.green })
hl("diffRemoved", { fg = c.pink })
hl("Folded", { fg = c.grey, bg = c.base3 })
hl("FoldColumn", { fg = c.white, bg = c.black })
hl("Constant", { fg = c.aqua })
hl("Number", { fg = c.purple })
hl("Float", { fg = c.purple })
hl("Boolean", { fg = c.purple })
hl("Character", { fg = c.yellow })
hl("String", { fg = c.yellow })
hl("Type", { fg = c.aqua })
hl("Structure", { fg = c.aqua })
hl("StorageClass", { fg = c.aqua })
hl("Typedef", { fg = c.aqua })
hl("Identifier", { fg = c.white })
hl("Function", { fg = c.green, italic = true })
hl("Statement", { fg = c.pink })
hl("Operator", { fg = c.pink })
hl("Label", { fg = c.pink })
hl("Keyword", { fg = c.pink, italic = true })
hl("PreProc", { fg = c.green })
hl("Include", { fg = c.aqua, italic = true })
hl("Define", { fg = c.pink })
hl("Macro", { fg = c.pink })
hl("PreCondit", { fg = c.pink })
hl("Special", { fg = c.white })
hl("SpecialChar", { fg = c.pink })
hl("Delimiter", { fg = c.white })
hl("SpecialComment", { fg = c.grey, italic = true })
hl("Tag", { fg = c.orange })
hl("Todo", { fg = c.orange })
hl("Comment", { fg = c.base6, italic = true })
hl("Underlined", { underline = true })
hl("Ignore", {})
hl("Error", { fg = c.red })
hl("Terminal", { fg = c.white, bg = c.base2 })
hl("EndOfBuffer", { fg = c.base2 })
hl("Conceal", { fg = c.grey })
hl("vCursor", { reverse = true })
hl("iCursor", { reverse = true })
hl("lCursor", { reverse = true })
hl("CursorIM", { reverse = true })
hl("CursorColumn", { bg = c.base3 })
hl("Whitespace", { fg = c.base5 })
hl("WildMenu", { fg = c.white, bg = c.orange })
hl("QuickFixLine", { fg = c.purple, bold = true })
hl("Debug", { fg = c.orange })
hl("debugBreakpoint", { fg = c.base2, bg = c.red })
hl("Conditional", { fg = c.pink })
hl("Repeat", { fg = c.pink })
hl("Exception", { fg = c.pink })
-- Plugins
--hl("@annotation", { fg = c.green })
--hl("@attribute", { fg = c.green })
--hl("@boolean", { fg = c.purple })
--hl("@character", { fg = c.yellow })
--hl("@character.special", { fg = c.purple })
--hl("@comment", { fg = c.base6, italic = true })
--hl("@conceal", { fg = c.grey })
--hl("@conditional", { fg = c.pink })
--hl("@conditional.ternary", { fg = c.pink })
--hl("@constant", { fg = c.aqua })
--hl("@constant.builtin", { fg = c.purple })
--hl("@constant.macro", { fg = c.purple })
--hl("@constructor", { fg = c.aqua })
--hl("@debug", { fg = c.pink })
--hl("@define", { fg = c.aqua })
--hl("@definition", { fg = c.green })
--hl("@definition.associated", { fg = c.green })
--hl("@definition.constant", { fg = c.green })
--hl("@definition.enum", { fg = c.green })
--hl("@definition.field", { fg = c.green })
--hl("@definition.function", { fg = c.green })
--hl("@definition.import", { fg = c.white })
--hl("@definition.macro", { fg = c.green, italic = true })
--hl("@definition.method", { fg = c.green })
--hl("@definition.namespace", { fg = c.white })
--hl("@definition.parameter", { fg = c.orange })
--hl("@definition.type", { fg = c.green })
--hl("@definition.var", { fg = c.green })
--hl("@error", { fg = c.red })
--hl("@exception", { fg = c.pink })
--hl("@field", { fg = c.white })
--hl("@float", { fg = c.purple })
--hl("@function", { fg = c.green, italic = true })
--hl("@function.builtin", { fg = c.aqua })
--hl("@function.call", { fg = c.white })
--hl("@function.macro", { fg = c.green, italic = true })
--hl("@include", { fg = c.aqua, italic = true })
--hl("@keyword", { fg = c.pink, italic = true })
--hl("@keyword.function", { fg = c.aqua, italic = true })
--hl("@keyword.operator", { fg = c.pink })
--hl("@keyword.return", { fg = c.pink })
--hl("@label", { fg = c.pink })
--hl("@math", { fg = c.yellow })
--hl("@method", { fg = c.green })
--hl("@method.call", { fg = c.white })
--hl("@namespace", { fg = c.purple })
--hl("@number", { fg = c.purple })
--hl("@operator", { fg = c.pink })
--hl("@parameter", { fg = c.orange })
--hl("@parameter.reference", { fg = c.white })
--hl("@preproc", { fg = c.green })
--hl("@property", { fg = c.white })
--hl("@punctuation.bracket", { fg = c.white })
--hl("@punctuation.delimiter", { fg = c.white })
--hl("@punctuation.special", { fg = c.pink })
--hl("@reference", { fg = c.white })
--hl("@repeat", { fg = c.pink })
--hl("@scope", { fg = c.white })
--hl("@storageclass", { fg = c.aqua })
--hl("@storageclass.lifetime", { fg = c.aqua })
--hl("@strike", { fg = c.grey })
--hl("@string", { fg = c.yellow })
--hl("@string.escape", { fg = c.purple })
--hl("@string.regex", { fg = c.purple })
--hl("@string.special", { fg = c.purple })
--hl("@symbol", { fg = c.purple })
--hl("@tag", { fg = c.pink })
--hl("@tag.attribute", { fg = c.green })
--hl("@tag.delimiter", { fg = c.white })
--hl("@text", { fg = c.green })
--hl("@text.danger", { fg = c.red, bold = true })
--hl("@text.diff.add", { fg = c.diff_add })
--hl("@text.diff.delete", { fg = c.diff_remove })
--hl("@text.emphasis", { bold = true })
--hl("@text.environment", { fg = c.purple })
--hl("@text.environment.name", { fg = c.aqua })
--hl("@text.literal", { fg = c.yellow })
--hl("@text.math", { fg = c.yellow })
--hl("@text.note", { fg = c.aqua, bold = true })
--hl("@text.quote", { fg = c.grey })
--hl("@text.reference", { fg = c.orange, italic = true })
--hl("@text.strike", { fg = c.grey })
--hl("@text.strong", { bold = true })
--hl("@text.title", { fg = c.yellow, bold = true })
--hl("@text.todo", { fg = c.aqua })
--hl("@text.underline", { underline = true })
--hl("@text.uri", { fg = c.aqua, underline = true })
--hl("@text.warning", { fg = c.yellow, bold = true })
--hl("@todo", { fg = c.aqua })
--hl("@type", { fg = c.aqua })
--hl("@type.builtin", { fg = c.aqua })
--hl("@type.definition", { fg = c.aqua })
--hl("@type.qualifier", { fg = c.pink })
--hl("@uri", { fg = c.aqua, underline = true })
--hl("@variable", { fg = c.white })
--hl("@variable.builtin", { fg = c.orange })
--hl("dbui_tables", { fg = c.white })
--hl("DiagnosticSignError", { fg = c.red })
--hl("DiagnosticSignWarn", { fg = c.yellow })
--hl("DiagnosticSignInfo", { fg = c.white })
--hl("DiagnosticSignHint", { fg = c.aqua })
--hl("DiagnosticVirtualTextError", { fg = c.red })
--hl("DiagnosticVirtualTextWarn", { fg = c.yellow })
--hl("DiagnosticVirtualTextInfo", { fg = c.white })
--hl("DiagnosticVirtualTextHint", { fg = c.aqua })
--hl("DiagnosticUnderlineError", { undercurl = true, sp = c.red })
--hl("DiagnosticUnderlineWarn", { undercurl = true, sp = c.yellow })
--hl("DiagnosticUnderlineInfo", { undercurl = true, sp = c.white })
--hl("DiagnosticUnderlineHint", { undercurl = true, sp = c.aqua })
--hl("CursorWord0", { bg = c.white, fg = c.black })
--hl("CursorWord1", { bg = c.white, fg = c.black })
--hl("NvimTreeFolderName", { fg = c.white })
--hl("NvimTreeRootFolder", { fg = c.pink })
--hl("NvimTreeSpecialFile", { fg = c.white })

View file

@ -1,6 +1,7 @@
require("boot")
require("settings") require("settings")
require("lsp") require("colors")
require("packages")
require("keys") require("keys")
require("autocmds") require("events")
require("usercmds") require("commands")
require("languages")

View file

@ -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" },
} }

31
.config/nvim/lua/boot.lua Normal file
View file

@ -0,0 +1,31 @@
-- Disable providers
local disabled_providers = {
"node",
"perl",
"python3",
"ruby",
}
for _, provider in ipairs(disabled_providers) do
vim.g["loaded_" .. provider .. "_provider"] = 0
end
-- Disable plugins
local disabled_plugins = {
"2html_plugin",
"ftplugin",
"gzip",
"man",
"netrw",
"matchit",
"remote_plugins",
"spellfile_plugin",
"shada_plugin",
"tarPlugin",
"tutor_mode_plugin",
"zipPlugin",
}
for _, plugin in ipairs(disabled_plugins) do
vim.g["loaded_" .. plugin] = 0
end

View file

@ -0,0 +1 @@
vim.cmd("colorscheme monokai")

View file

@ -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",
["<"] = ">", ["<"] = ">",
["("] = ")", ["("] = ")",

View file

@ -1,101 +0,0 @@
local icons = {
Namespace = "󰌗",
Text = "󰉿",
Method = "󰆧",
Function = "󰆧",
Constructor = "",
Field = "󰜢",
Variable = "󰀫",
Class = "󰠱",
Interface = "",
Module = "",
Property = "󰜢",
Unit = "󰑭",
Value = "󰎠",
Enum = "",
Keyword = "󰌋",
Snippet = "",
Color = "󰏘",
File = "󰈚",
Reference = "󰈇",
Folder = "󰉋",
EnumMember = "",
Constant = "󰏿",
Struct = "󰙅",
Event = "",
Operator = "󰆕",
TypeParameter = "󰊄",
Table = "",
Object = "󰅩",
Tag = "",
Array = "[]",
Boolean = "",
Number = "",
Null = "󰟢",
String = "󰉿",
Calendar = "",
Watch = "󰥔",
Package = "",
Copilot = "",
Codeium = "",
TabNine = "",
}
return {
"hrsh7th/nvim-cmp",
event = "InsertEnter",
dependencies = {
-- "hrsh7th/cmp-nvim-lsp",
-- "hrsh7th/cmp-buffer",
-- "hrsh7th/cmp-path",
-- "L3MON4D3/LuaSnip",
},
opts = {
completion = {
autocomplete = true,
completeopt = "menu,menuone,noinsert",
},
formatting = {
fields = { "abbr", "kind", "menu" },
format = function(_, item)
local icon = icons[item.kind] or ""
item.kind = string.format(" %s %s", icon, item.kind)
return item
end,
},
-- snippet = {
-- expand = function(args)
-- require("luasnip").lsp_expand(args.body)
-- end,
-- },
-- preselect = cmp.PreselectMode.None,
sources = {
-- { name = "nvim_lsp" },
-- { name = "luasnip" },
{ name = "buffer" },
-- { name = "path" },
},
window = {
completion = {
border = "rounded",
scrollbar = false,
},
documentation = {
border = "rounded",
}
},
},
config = function(_, opts)
local cmp = require("cmp")
opts.mapping = {
["<C-space>"] = cmp.mapping.complete(),
["<C-up>"] = cmp.mapping.select_prev_item(),
["<C-down>"] = cmp.mapping.select_next_item(),
["<C-x>"] = cmp.mapping.abort(),
["<cr>"] = cmp.mapping.confirm({ select = true }),
}
cmp.setup(opts)
end,
}

View file

@ -1,11 +0,0 @@
return {
"j-hui/fidget.nvim",
opts = {
integration = {
["nvim-tree"] = {
enable = true,
},
},
},
config = true,
}

View file

@ -1,15 +0,0 @@
return {
"lukas-reineke/indent-blankline.nvim",
event = "VeryLazy",
main = "ibl",
opts = {
indent = {
char = "",
},
scope = {
enabled = true,
show_start = false,
},
},
config = true,
}

View file

@ -1,4 +0,0 @@
return {
"mrded/nvim-lsp-notify",
config = true,
}

View file

@ -1,103 +0,0 @@
return {
"neovim/nvim-lspconfig",
event = { "BufReadPre", "BufNewFile" },
opts = {
servers = {
clangd = {},
gdscript = {},
gopls = {},
lua_ls = {
settings = {
Lua = {
completion = {
callSnippet = "Replace",
},
runtime = {
version = "LuaJIT",
},
workspace = {
checkThirdParty = false,
library = {
"${3rd}/luv/library",
unpack(vim.api.nvim_get_runtime_file("", true)),
},
},
},
},
},
rust_analyzer = {
settings = {
["rust-analyzer"] = {
imports = {
granularity = {
group = "module",
},
prefix = "self",
},
cargo = {
buildScripts = {
enable = true,
},
},
procMacro = {
enable = true
},
},
},
},
},
},
config = function(_, opts)
-- Servers
local servers = opts.servers
for server, server_opts in pairs(servers) do
require("lspconfig")[server].setup(server_opts)
end
-- Icons
local icons = {
Error = "",
Warn = "",
Hint = "",
Info = "",
}
for name, icon in pairs(icons) do
name = "DiagnosticSign" .. name
vim.fn.sign_define(name, { text = icon, texthl = name, numhl = "" })
end
-- Runs when the LSP is attached
vim.api.nvim_create_autocmd("LspAttach", {
group = vim.api.nvim_create_augroup("lsp-attach", { clear = true }),
callback = function(event)
local function map(mode, lhs, rhs, info)
vim.keymap.set(mode, lhs, rhs, { buffer = event.buf, desc = "LSP: " .. info })
end
map("n", "gr", require("telescope.builtin").lsp_references, "References")
map("n", "gd", require("telescope.builtin").lsp_definitions, "Definition")
map({ "n", "i" }, "<f1>", vim.lsp.buf.hover, "Hover")
map({ "n", "i" }, "<f2>", vim.lsp.buf.rename, "Rename")
map({ "n", "i" }, "<C-f>", vim.lsp.buf.format, "Format")
map("n", "<leader>ca", vim.lsp.buf.code_action, "Code action")
-- Highlight the word your cursor is on
-- local client = vim.lsp.get_client_by_id(event.data.client_id)
--
-- if client and client.server_capabilities.documentHighlightProvider then
-- vim.api.nvim_create_autocmd({ "CursorHold", "CursorHoldI" }, {
-- buffer = event.buf,
-- callback = vim.lsp.buf.document_highlight,
-- })
--
-- vim.api.nvim_create_autocmd({ "CursorMoved", "CursorMovedI" }, {
-- buffer = event.buf,
-- callback = vim.lsp.buf.clear_references,
-- })
-- end
end,
})
end,
}

View file

@ -1,11 +0,0 @@
return {
"L3MON4D3/LuaSnip",
dependencies = {
"rafamadriz/friendly-snippets"
},
event = "InsertEnter",
version = "v2.*",
config = function()
require("luasnip.loaders.from_vscode").lazy_load()
end,
}

View file

@ -1,8 +0,0 @@
return {
"echasnovski/mini.completion",
event = "InsertEnter",
opts = {
set_vim_settings = false,
},
config = true,
}

View file

@ -1,18 +0,0 @@
return {
"echasnovski/mini.surround",
event = { "BufReadPost", "BufNewFile" },
opts = {
mappings = {
add = 'gsa',
delete = 'gsd',
find = 'gsf',
find_left = 'gsF',
highlight = 'gsh',
replace = 'gsr',
update_n_lines = 'gsn',
suffix_last = '',
suffix_next = '',
},
},
config = true,
}

View file

@ -1,14 +0,0 @@
return {
"mg979/vim-visual-multi",
keys = {
{ "<C-d>", mode = { "n", "x" }, desc = "Multicursor (word)" },
{ "<C-Up>", mode = { "n", "x" }, desc = "Multicursor (next line)" },
{ "<C-Down>", mode = { "n", "x" }, desc = "Multicursor (previous line)" },
},
init = function()
vim.g.VM_maps = {
["Find Under"] = "<C-d>",
["Find Subword Under"] = "<C-d>",
}
end,
}

View file

@ -1,17 +0,0 @@
return {
"folke/noice.nvim",
event = "VeryLazy",
dependencies = {
"MunifTanjim/nui.nvim",
},
opts = {
lsp = {
override = {
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
["vim.lsp.util.stylize_markdown"] = true,
["cmp.entry.get_documentation"] = true,
},
},
},
config = true,
}

View file

@ -1,11 +0,0 @@
return {
"rcarriga/nvim-notify",
event = "VeryLazy",
opts = {
background_colour = "#000000",
fps = 60,
render = "compact",
timeout = 0,
},
config = true,
}

View file

@ -1,7 +0,0 @@
return {
"NvChad/nvterm",
keys = {
{ "<A-i>", "<cmd>lua require('nvterm.terminal').toggle('float')<cr>", mode = { "n", "t" }, desc = "Toggle terminal" },
},
config = true,
}

View file

@ -1,19 +0,0 @@
return {
"navarasu/onedark.nvim",
lazy = false,
priority = 1000,
opts = {
style = "dark",
transparent = true,
term_colors = true,
highlights = {
["StatusLine"] = {fg = "$bg3", bg = "Normal"},
["StatusLineNC"] = {fg = "$bg3", bg = "Normal"},
},
},
config = function(_, opts)
local theme = require("onedark")
theme.setup(opts)
theme.load()
end,
}

View file

@ -1,10 +0,0 @@
return {
"folke/snacks.nvim",
event = "BufReadPre",
opts = {
explorer = {
replace_netrw = true,
},
},
config = true,
}

View file

@ -1,7 +0,0 @@
return {
"nvim-pack/nvim-spectre",
keys = {
{ "<leader>sr", function() require("spectre").open() end, desc = "Replace in files (Spectre)" },
},
config = true,
}

View file

@ -1,73 +0,0 @@
local function on_attach(bufnr)
local api = require("nvim-tree.api")
-- default mappings
api.config.mappings.default_on_attach(bufnr)
local function opts(desc)
return { desc = "nvim-tree: " .. desc, buffer = bufnr, noremap = true, silent = true, nowait = true }
end
-- navigation
vim.keymap.set("n", "<C-Up>", api.tree.change_root_to_parent, opts("Up"))
vim.keymap.set("n", "<C-Left>", api.tree.change_root_to_parent, opts("Up"))
vim.keymap.set("n", "<C-Down>", api.tree.change_root_to_node, opts("Enter"))
vim.keymap.set("n", "<C-Right>", api.tree.change_root_to_node, opts("Enter"))
-- open folders with a single click
vim.keymap.set("n", "<LeftRelease>", function()
vim.defer_fn(function ()
local win = vim.api.nvim_get_current_win()
local view = require("nvim-tree.view")
if view.get_winnr() ~= win then return end
api.node.open.edit()
api.tree.focus()
end, 10)
end, opts("Open folder/file"))
end
return {
"nvim-tree/nvim-tree.lua",
event = "VeryLazy",
dependencies = {
"nvim-tree/nvim-web-devicons",
},
keys = {
{ "<leader>e", function() require("nvim-tree.api").tree.toggle() end, desc = "Toggle files" },
},
opts = {
filesystem_watchers = {
enable = true,
},
filters = {
dotfiles = false,
},
on_attach = on_attach,
renderer = {
root_folder_label = false,
highlight_git = true,
icons = {
show = {
git = false,
},
glyphs = {
git = {
unstaged = "",
untracked = "",
deleted = "",
},
},
},
},
sync_root_with_cwd = true,
update_focused_file = {
enable = true,
update_root = false,
},
view = {
width = 30,
},
},
config = true,
}

View file

@ -1,16 +0,0 @@
return {
"folke/trouble.nvim",
event = "VeryLazy",
keys = {
{ "<leader>x", function() require("trouble").toggle() end, desc = "Show errors" },
},
dependencies = {
"nvim-tree/nvim-web-devicons",
},
opts = {
position = "right",
padding = false,
use_diagnostic_signs = true,
},
config = true,
}

View file

@ -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,
}) })

View file

@ -1,43 +1,40 @@
vim.g.mapleader = " "
local function map(mode, lhs, rhs, info) 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", "<leader>l", "<cmd>Lazy<cr>", "Lazy")
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>")
@ -45,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")

View file

@ -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",

View file

@ -1,69 +0,0 @@
-- Install the package manager if needed
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",
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
-- Load plugins
require("lazy").setup("plugins", {
defaults = {
lazy = true,
},
change_detection = {
notify = false
},
rocks = {
enabled = false
},
ui = {
icons = {
ft = "",
lazy = "󰂠 ",
loaded = "",
not_loaded = "",
},
},
performance = {
rtp = {
disabled_plugins = {
"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",
},
},
},
})

View file

@ -1,5 +0,0 @@
return {
"windwp/nvim-autopairs",
event = "InsertEnter",
config = true,
}

View file

@ -1,23 +0,0 @@
return {
"numToStr/Comment.nvim",
keys = {
{
"<C-/>",
"<cmd>lua require('Comment.api').toggle.linewise.current()<cr>",
desc = "Toggle comment",
},
{
"<C-/>",
"<esc><cmd>lua require('Comment.api').toggle.linewise(vim.fn.visualmode())<cr>",
mode = "v",
desc = "Toggle comment",
},
},
config = true,
opts = {
mappings = {
basic = false,
extra = false,
},
},
}

View file

@ -1,9 +0,0 @@
return {
"folke/flash.nvim",
event = { "BufReadPost", "BufNewFile" },
keys = {
{ "s", function() require("flash").jump() end, mode = { "n", "o", "x" }, desc = "Flash" },
{ "S", function() require("flash").treesitter() end, mode = { "n", "o", "x" }, desc = "Flash Treesitter" },
},
config = true,
}

View file

@ -1,5 +0,0 @@
return {
"lewis6991/gitsigns.nvim",
event = "BufReadPre",
config = true,
}

View file

@ -1,7 +0,0 @@
return {
"tanvirtin/monokai.nvim",
lazy = false,
priority = 1000,
opts = {},
config = true,
}

View file

@ -1,36 +0,0 @@
return {
"nvim-telescope/telescope.nvim",
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-telescope/telescope-project.nvim",
},
keys = {
{"<C-Tab>", "<cmd>Telescope buffers<cr>", desc = "Buffers"},
{"<leader>f", "<cmd>Telescope find_files<cr>", desc = "Find files"},
{"<leader>p", "<cmd>Telescope project<cr>", desc = "Projects"},
{"<leader>r", "<cmd>Telescope oldfiles<cr>", desc = "Recent files"},
},
config = function()
require("telescope").setup({
defaults = {
mappings = {
i = {
["<esc>"] = require("telescope.actions").close,
},
},
prompt_prefix = " ",
selection_caret = "",
},
extensions = {
project = {
base_dirs = {
{ path = "~/projects", max_depth = 3 },
},
order_by = "desc",
sync_with_nvim_tree = true,
theme = "dropdown",
},
},
})
end,
}

View file

@ -1,18 +0,0 @@
return {
"nvim-treesitter/nvim-treesitter",
event = { "BufReadPost", "BufNewFile" },
build = ":TSUpdate",
opts = {
ensure_installed = {
"go",
"gomod",
"gowork",
"gosum",
},
highlight = { enable = true },
indent = { enable = true },
},
config = function(_, opts)
require("nvim-treesitter.configs").setup(opts)
end,
}

View file

@ -1,11 +1,3 @@
-- Globals
local g = vim.g
g.mapleader = " "
for _, provider in ipairs { "node", "perl", "python3", "ruby" } do
g["loaded_" .. provider .. "_provider"] = 0
end
-- Options -- Options
local opt = vim.opt local opt = vim.opt
opt.autowrite = false opt.autowrite = false
@ -51,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"})

View file

@ -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",

View file

@ -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": 5,
"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",
},
} }

View file

@ -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"
} }

View file

@ -1,4 +0,0 @@
[[manager.prepend_keymap]]
on = [ "<C-s>" ]
run = 'shell "$SHELL" --block --confirm'
desc = "Open shell here"

View file

@ -1,2 +0,0 @@
[manager]
show_hidden = true

32
.env Normal file
View file

@ -0,0 +1,32 @@
XDG_CACHE_HOME=$HOME/.cache
XDG_CONFIG_HOME=$HOME/.config
XDG_DATA_HOME=$HOME/.local/share
XDG_BIN_HOME=$HOME/.local/bin
XDG_LIB_HOME=$HOME/.local/lib
XDG_STATE_HOME=$HOME/.local/state
CARGO_HOME=$XDG_DATA_HOME/cargo
CUDA_CACHE_PATH=$XDG_CACHE_HOME/nv
DOTNET_CLI_HOME=$XDG_DATA_HOME/dotnet
GOPATH=$XDG_DATA_HOME/go
GTK2_RC_FILES=$XDG_CONFIG_HOME/gtk-2.0/gtkrc
HISTFILE=$XDG_STATE_HOME/bash/history
NIMBLE_DIR=$XDG_DATA_HOME/nimble
NUGET_PACKAGES=$XDG_CACHE_HOME/nuget
RUSTUP_HOME=$XDG_DATA_HOME/rustup
W3M_DIR=$XDG_DATA_HOME/w3m
WINEPREFIX=$XDG_DATA_HOME/wine
GOAMD64=v3
GOARM64=v8.2
BROWSER=firefox
EDITOR=nvim
VISUAL=$EDITOR
LANG=en_US.UTF-8
PAGER=less
SSH_AUTH_SOCK=$XDG_RUNTIME_DIR/ssh-agent.socket
TERMINAL=foot
PATH="/usr/sbin:/usr/bin:/sbin:/bin"
PATH="/usr/lib/ccache/bin:$PATH"
PATH="$GOPATH/bin:$PATH"
PATH="$CARGO_HOME/bin:$PATH"
PATH="$XDG_BIN_HOME:$PATH"
PATH="$XDG_CONFIG_HOME/fish/scripts:$PATH"

2
.gitignore vendored
View file

@ -6,13 +6,13 @@ lazy-lock.json
!.editorconfig !.editorconfig
!.gitignore !.gitignore
!.init !.init
!.env
!/.config !/.config
/.config/* /.config/*
!/.config/alacritty !/.config/alacritty
!/.config/btop !/.config/btop
!/.config/cava !/.config/cava
!/.config/easyeffects !/.config/easyeffects
!/.config/environment.d
!/.config/fastfetch !/.config/fastfetch
!/.config/foot !/.config/foot
!/.config/fish !/.config/fish

4
.init
View file

@ -1,2 +1,2 @@
#!/bin/fish #!/usr/bin/fish
uwsm start hyprland.desktop dbus-run-session Hyprland