Compare commits

..

No commits in common. "20799af6275a327d52c3ae7af29b7ed9524323a1" and "047a4808cc8a389c04aac8959dbbd516eb84958b" have entirely different histories.

62 changed files with 931 additions and 633 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 = "proc:0:default,cpu:1:default mem:0:default net:0:tty" presets = "cpu:1:default,proc:0:default cpu:0:default,mem:0:default,net:0:default cpu:0:block,net:0:tty"
vim_keys = True vim_keys = False
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 = False show_disks = True
only_physical = True only_physical = True
use_fstab = True use_fstab = True
zfs_hide_datasets = False zfs_hide_datasets = False

View file

@ -1,5 +1,16 @@
{ {
"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,
@ -23,7 +34,7 @@
}, },
"plugins_order": [ "plugins_order": [
"rnnoise#0", "rnnoise#0",
"speex#0", "bass_enhancer#0",
"limiter#0" "limiter#0"
], ],
"rnnoise#0": { "rnnoise#0": {
@ -35,20 +46,6 @@
"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": 0.0, "amount": 3.0,
"blend": 0.0, "blend": 0.0,
"bypass": false, "bypass": false,
"floor": 12.0, "floor": 12.0,
"floor-active": true, "floor-active": true,
"harmonics": 8.5, "harmonics": 10.0,
"input-gain": 0.0, "input-gain": 0.0,
"output-gain": 0.0, "output-gain": 0.0,
"scope": 100.0 "scope": 150.0
}, },
"blocklist": [], "blocklist": [],
"filter#0": { "filter#0": {

View file

@ -0,0 +1,6 @@
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

@ -0,0 +1,11 @@
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

@ -0,0 +1,6 @@
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,124 +1,84 @@
# Git # Git
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 gl "git log --oneline"
alias gds "git diff --ignore-space-at-eol --compact-summary" alias gp "git pull"
alias gl "git log --oneline" alias gs "git status"
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
if command -q go alias gb "go build -v"
alias gb "go build -v" alias godeps "go list -f '{{ join .Deps \"\n\"}}' ."
alias godeps "go list -f '{{ join .Deps \"\n\"}}' ." alias gt "go test -v"
alias gt "go test -v" alias gts "gotestsum"
alias gts "gotestsum"
end # Home
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
if command -q hyperfine alias bench "hyperfine --shell=none"
alias bench "hyperfine --shell=none"
end
# Kernel # Kernel
if command -q dmesg alias kerr "sudo dmesg --level=emerg,alert,crit,err"
alias kerr "sudo dmesg --level=emerg,alert,crit,err" alias klog "sudo dmesg"
alias klog "sudo dmesg"
end
# List # List
if command -q ls alias l "ls"
alias l "ls" alias ll "ls -l"
alias ll "ls -l" alias l2 "ls -T -L2"
alias l2 "ls -T -L2" alias lu "ls -l --total-size --sort=size --reverse --no-permissions --no-user --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"
alias lp "ls -l --no-filesize --no-time"
end
# Lsof # Lsof
if command -q lsof alias tcp "lsof -PniTCP"
alias tcp "lsof -PniTCP" alias udp "lsof -PniUDP"
alias udp "lsof -PniUDP"
end
# MPV
if command -q mpv
alias music "mpv music --shuffle --no-video"
end
# Neovim # Neovim
if command -q nvim alias e "nvim"
alias e nvim alias n "nvim"
end
# Pacman # Pacman
if command -q apk alias p "pacman"
alias p "apk" alias pi "sudo pacman -S"
alias pi "sudo apk add" alias pr "sudo pacman -Rs"
alias pr "sudo apk del" alias pu "sudo pacman -Syu"
alias pu "sudo apk update && sudo apk upgrade" alias pl "pacman -Qq"
alias pl "apk info" alias pe "pacman -Qe"
alias po "apk info --who-owns" alias pc "sudo pacman -Sc"
else if command -q pacman alias paur "pacman -Qm"
alias p "pacman" alias pfiles "pacman -Ql"
alias pi "sudo pacman -S" alias porphan "pacman -Qtdq"
alias pr "sudo pacman -Rs" alias powner "pacman -Qo"
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
if command -q service alias start "sudo systemctl start"
alias services "service -l" alias stop "sudo systemctl stop"
else if command -q systemctl alias enable "sudo systemctl enable"
alias start "sudo systemctl start" alias disable "sudo systemctl disable"
alias stop "sudo systemctl stop" alias restart "sudo systemctl restart"
alias enable "sudo systemctl enable" alias running "systemctl list-units --type=service --state=running"
alias disable "sudo systemctl disable" alias disabled "systemctl list-unit-files --type=service --state=disabled"
alias restart "sudo systemctl restart" alias enabled "systemctl list-unit-files --type=service --state=enabled"
alias running "systemctl list-units --type=service --state=running" alias timers "systemctl list-timers"
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
if command -q tmux alias ta "tmux attach"
alias ta "tmux attach" alias td "tmux detach"
alias td "tmux detach" alias tl "tmux ls"
alias tl "tmux ls" alias tk "tmux kill-server"
alias tk "tmux kill-server"
end
# ... # ...
alias align "column -t -o ' '" alias bios "systemctl reboot --firmware-setup"
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,13 +1,16 @@
# 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
# Set environment variables from .env
while read -la line
set -l keyval (string split -m1 "=" $line)
set -l key (string trim $keyval[1])
set -l value (string trim $keyval[2..])
set -l value (eval echo $value)
set -xg $key $value
end < ~/.env
end end
# Load systemd user environment
set GENERATOR /usr/lib/systemd/user-environment-generators/30-systemd-environment-d-generator
if test -e $GENERATOR
export ($GENERATOR)
end
# Add to PATH
fish_add_path (go env GOPATH)/bin
fish_add_path $XDG_CONFIG_HOME/fish/scripts

View file

@ -42,3 +42,4 @@ 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
f $HOME/.config/$argv $EDITOR $HOME/.config/$argv
end end

View file

@ -1,19 +1,8 @@
function f --wraps nnn --description 'support nnn quit and change directory' function f
if test -n "$NNNLVL" -a "$NNNLVL" -ge 1 set tmp (mktemp -t "yazi-cwd.XXXXXX")
echo "nnn is already running" yazi $argv --cwd-file="$tmp"
return if set cwd (command cat -- "$tmp"); and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ]
end builtin cd -- "$cwd"
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 --wraps eza function ls
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,13 +8,7 @@ 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,26 +1,20 @@
#!/usr/bin/fish #!/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 --human-readable --progress set FLAGS -avz --delete
set HOSTS $argv set HOSTS $argv
set USER (whoami) set USER (whoami)
set DESTINATION "~/" set DESTINATION "~/files/"
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
set_color yellow echo "[$host]"
echo " $host"
for dir in $DIRECTORIES for DIR in $DIRECTORIES
set_color blue echo "Backing up $DIR..."
echo "  $dir" rsync $FLAGS ~/$DIR $USER@$host:$DESTINATION
set_color normal
rsync $FLAGS ~/$dir $host:$DESTINATION
end end
echo ""
end end

View file

@ -1,4 +1,4 @@
#!/usr/bin/fish #!/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,12 +1,5 @@
# Autostart exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
exec-once = swaybg -i ~/pictures/wallpapers/01.png exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
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,7 +46,6 @@ 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 {
@ -56,7 +55,7 @@ cursor {
input { input {
accel_profile = flat accel_profile = flat
sensitivity = -0.75 sensitivity = 0
} }
dwindle { dwindle {
@ -68,10 +67,6 @@ ecosystem {
no_donation_nag = true no_donation_nag = true
} }
xwayland {
enabled = false
}
debug { debug {
overlay = false overlay = false
} }

View file

@ -2,26 +2,24 @@ $main = SUPER
# Apps # Apps
bind = $main, B, exec, $browser bind = $main, B, exec, $browser
bind = $main, E, exec, $editor bind = $main, D, exec, $editor
bind = $main, F, exec, $files bind = $main, E, exec, $files
bind = $main, K, exec, $calendar bind = $main, F1, exec, $systeminfo
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 = $main, F1, exec, $systeminfo bind = , Print, exec, $screenshot
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, J, togglesplit, bind = $main, F, fullscreen,
bind = $main, V, togglefloating, bind = $main, V, togglefloating,
bind = $main, Super_R, fullscreen, bind = $main, J, togglesplit,
# Session management # Session management
bind = $main, Backspace, exit, bind = $main, Backspace, exit,
@ -90,6 +88,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.02+ bindle =, XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.05+
bindle =, XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.02- bindle =, XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.05-
bindl =, XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle bindl =, XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle

View file

@ -1,21 +1,19 @@
# 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 = $floating --hold -e fastfetch $systeminfo = $center $terminal --hold -e fastfetch
$processmonitor = $floating -e btop $processmonitor = $terminal -e btop
$update = $floating -e fish $update = $floating -e sudo pacman -Syu

View file

@ -1,246 +0,0 @@
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,7 +1,6 @@
require("boot")
require("settings") require("settings")
require("colors") require("lsp")
require("packages")
require("keys") require("keys")
require("events") require("autocmds")
require("commands") require("usercmds")
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", "compile_commands.json" }, root_markers = { "meson_options.txt", "CMakePresets.json" },
filetypes = { "c", "cpp" }, filetypes = { "c", "cpp" },
} }

View file

@ -1,26 +1,6 @@
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({ "LspAttach" }, {
desc = "LSP completion",
group = group,
callback = function(ev)
local client = vim.lsp.get_client_by_id(ev.data.client_id)
if client:supports_method("textDocument/completion") then
vim.lsp.completion.enable(true, client.id, ev.buf, { autotrigger = true })
end
end,
})
on({ "TextYankPost" }, {
desc = "Highlight when copying text",
group = group,
callback = function()
vim.highlight.on_yank()
end,
})
on({ "BufNewFile", "BufRead" }, { on({ "BufNewFile", "BufRead" }, {
desc = "Enable word wrap in text files and markdown documents", desc = "Enable word wrap in text files and markdown documents",
group = group, group = group,
@ -31,6 +11,17 @@ on({ "BufNewFile", "BufRead" }, {
end, end,
}) })
on({ "LspAttach" }, {
desc = "LSP completion",
group = group,
callback = function(ev)
local client = vim.lsp.get_client_by_id(ev.data.client_id)
if client:supports_method("textDocument/completion") then
vim.lsp.completion.enable(true, client.id, ev.buf, { autotrigger = true })
end
end,
})
on({ "TermOpen", "TermEnter" }, { on({ "TermOpen", "TermEnter" }, {
desc = "Disable sign column in terminals", desc = "Disable sign column in terminals",
group = group, group = group,
@ -38,3 +29,42 @@ on({ "TermOpen", "TermEnter" }, {
vim.opt_local.signcolumn = "no" vim.opt_local.signcolumn = "no"
end, end,
}) })
on({ "TextYankPost" }, {
desc = "Highlight when copying text",
group = group,
callback = function()
vim.highlight.on_yank()
end,
})
on({ "VimEnter" }, {
desc = "Allow opening a directory and jumping to project root",
group = group,
callback = function()
-- Change file to its directory if needed
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,
})

View file

@ -1,31 +0,0 @@
-- 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

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

View file

@ -0,0 +1,101 @@
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

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

View file

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

View file

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

View file

@ -0,0 +1,103 @@
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

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

View file

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

View file

@ -0,0 +1,18 @@
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

@ -0,0 +1,14 @@
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

@ -0,0 +1,17 @@
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

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

View file

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

View file

@ -0,0 +1,19 @@
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

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

View file

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

View file

@ -0,0 +1,73 @@
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

@ -0,0 +1,16 @@
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,49 +1,37 @@
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")
-- Quit with q like any other terminal app map("n", "<C-q>", "<cmd>close<cr>", "Close window")
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"}, "Q", "<cmd>qa!<cr>", "Force quit") map({"n", "v"}, "<leader>q", "<cmd>qa!<cr>", "Quit all")
-- 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")
-- Grab the line and move it up/down -- Add or delete empty lines
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")
-- Horizontal movement -- Quick movement
map({"n", "v"}, "H", "^", "Beginning of line") map("n", "J", "}", "Next paragraph")
map({"n", "v"}, "L", "<end>", "End of line") map("n", "K", "{", "Previous paragraph")
-- Vertical movement -- Editing multiple instances
map({"n", "v"}, "J", "}", "Next paragraph") map("n", "<f2>", "*#:%s//<C-r><C-w>/g<left><left>", "Replace word under cursor")
map({"n", "v"}, "K", "{", "Previous paragraph") map("v", "<f2>", "y/<C-r>\"<cr>N:%s//<C-r>\"/g<left><left>", "Replace selection")
map("n", "<f3>", "#*", "Search word under cursor")
map("v", "<f3>", "y/<C-r>\"<cr>N", "Search selection")
-- Indenting -- Line movement
map("n", "<Tab>", "V>gv<esc>") map({"n", "v"}, "<C-b>", "^", "Beginning of line")
map("n", "<S-Tab>", "V<gv<esc>") map("i", "<C-b>", "<esc>^i", "Beginning of line")
map("v", "<Tab>", ">gv") map({"i", "n", "v"}, "<C-e>", "<end>", "End of line")
map("v", "<S-Tab>", "<gv")
-- Toggle word
map("n", "<Bslash>", "<cmd>ToggleWord<cr>", "Toggle word")
-- Increasing and decreasing numbers -- Increasing and decreasing numbers
map("n", "+", "<C-a>", "Increase number") map("n", "+", "<C-a>", "Increase number")
@ -51,17 +39,30 @@ map("n", "-", "<C-x>", "Decrease number")
map("n", "<kPlus>", "<C-a>", "Increase number") map("n", "<kPlus>", "<C-a>", "Increase number")
map("n", "<kMinus>", "<C-x>", "Decrease number") map("n", "<kMinus>", "<C-x>", "Decrease number")
-- Replace all instances -- Indenting
map("n", "<f2>", "*#:%s//<C-r><C-w>/g<left><left>", "Replace word under cursor") map("n", "<Tab>", "V>gv<esc>")
map("v", "<f2>", "y/<C-r>\"<cr>N:%s//<C-r>\"/g<left><left>", "Replace selection") map("n", "<S-Tab>", "V<gv<esc>")
map("v", "<Tab>", ">gv")
map("v", "<S-Tab>", "<gv")
-- Search all instances -- Shift arrow selection
map("n", "<f3>", "#*", "Search word under cursor") map("n", "<S-Up>", "v<Up>")
map("v", "<f3>", "y/<C-r>\"<cr>N", "Search selection") map("n", "<S-Down>", "v<Down>")
map("n", "<S-Left>", "v<Left>")
map("n", "<S-Right>", "v<Right>")
-- Window management map("v", "<S-Up>", "<Up>")
map("v", "<S-Down>", "<Down>")
map("v", "<S-Left>", "<Left>")
map("v", "<S-Right>", "<Right>")
map("i", "<S-Up>", "<Esc>v<Up>")
map("i", "<S-Down>", "<Esc>v<Down>")
map("i", "<S-Left>", "<Esc>v<Left>")
map("i", "<S-Right>", "<Esc>v<Right>")
-- Window switching
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,9 +1,7 @@
-- 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

@ -0,0 +1,69 @@
-- 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

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

View file

@ -0,0 +1,23 @@
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

@ -0,0 +1,9 @@
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

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

View file

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

View file

@ -0,0 +1,36 @@
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

@ -0,0 +1,18 @@
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,3 +1,11 @@
-- 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
@ -44,3 +52,7 @@ 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

@ -11,7 +11,6 @@ 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,7 +1,7 @@
{ {
"layer": "top", "layer": "top",
"position": "top", "position": "top",
"modules-left": ["cpu", "memory", "disk"], "modules-left": ["cpu", "custom/gpu", "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,52 +1,9 @@
{ {
"cpu": { "cpu": {
"interval": 2, "interval": 2,
"format": " {usage}%", "format": "{icon} {usage}%",
"on-click": "$TERMINAL -- btop --preset 1", "format-icons": ["󰾆 ", "󰾅 ", "󰓅 "],
}, "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,
@ -55,6 +12,18 @@
"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,
@ -88,4 +57,36 @@
"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" : "doas poweroff", "action" : "systemctl poweroff",
"text" : "Shutdown", "text" : "Shutdown",
"keybind" : "s" "keybind" : "s"
} }
{ {
"label" : "reboot", "label" : "reboot",
"action" : "doas reboot", "action" : "systemctl reboot",
"text" : "Reboot", "text" : "Reboot",
"keybind" : "r" "keybind" : "r"
} }

4
.config/yazi/keymap.toml Normal file
View file

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

2
.config/yazi/yazi.toml Normal file
View file

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

32
.env
View file

@ -1,32 +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
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 @@
#!/usr/bin/fish #!/bin/fish
dbus-run-session Hyprland uwsm start hyprland.desktop