diff --git a/.config/btop/btop.conf b/.config/btop/btop.conf index 2fb3895..9ab983f 100644 --- a/.config/btop/btop.conf +++ b/.config/btop/btop.conf @@ -2,8 +2,8 @@ color_theme = "Default" theme_background = False truecolor = True 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" -vim_keys = False +presets = "proc:0:default,cpu:1:default mem:0:default net:0:tty" +vim_keys = True rounded_corners = True graph_symbol = "braille" graph_symbol_cpu = "default" @@ -48,7 +48,7 @@ mem_below_net = False zfs_arc_cached = True show_swap = True swap_disk = True -show_disks = True +show_disks = False only_physical = True use_fstab = True zfs_hide_datasets = False diff --git a/.config/easyeffects/input/default.json b/.config/easyeffects/input/default.json index 0e3b9df..9457c25 100644 --- a/.config/easyeffects/input/default.json +++ b/.config/easyeffects/input/default.json @@ -1,16 +1,5 @@ { "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": [], "limiter#0": { "alr": false, @@ -34,7 +23,7 @@ }, "plugins_order": [ "rnnoise#0", - "bass_enhancer#0", + "speex#0", "limiter#0" ], "rnnoise#0": { @@ -46,6 +35,20 @@ "release": 20.0, "vad-thres": 50.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 + } } } -} \ No newline at end of file +} diff --git a/.config/easyeffects/output/default.json b/.config/easyeffects/output/default.json index 63bd8ed..e2c2a7a 100644 --- a/.config/easyeffects/output/default.json +++ b/.config/easyeffects/output/default.json @@ -1,15 +1,15 @@ { "output": { "bass_enhancer#0": { - "amount": 3.0, + "amount": 0.0, "blend": 0.0, "bypass": false, "floor": 12.0, "floor-active": true, - "harmonics": 10.0, + "harmonics": 8.5, "input-gain": 0.0, "output-gain": 0.0, - "scope": 150.0 + "scope": 100.0 }, "blocklist": [], "filter#0": { diff --git a/.config/environment.d/10-xdg.conf b/.config/environment.d/10-xdg.conf deleted file mode 100644 index d1372d1..0000000 --- a/.config/environment.d/10-xdg.conf +++ /dev/null @@ -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 \ No newline at end of file diff --git a/.config/environment.d/20-dirs.conf b/.config/environment.d/20-dirs.conf deleted file mode 100644 index 9f11f31..0000000 --- a/.config/environment.d/20-dirs.conf +++ /dev/null @@ -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 \ No newline at end of file diff --git a/.config/environment.d/30-general.conf b/.config/environment.d/30-general.conf deleted file mode 100644 index 8ce7a7a..0000000 --- a/.config/environment.d/30-general.conf +++ /dev/null @@ -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 \ No newline at end of file diff --git a/.config/fish/alias.fish b/.config/fish/alias.fish index 5fbd36d..49a3ace 100644 --- a/.config/fish/alias.fish +++ b/.config/fish/alias.fish @@ -1,84 +1,124 @@ # Git -alias g "git" -alias gc "git clone" -alias gd "git diff --ignore-space-at-eol" -alias gl "git log --oneline" -alias gp "git pull" -alias gs "git status" +if command -q git + alias g "git" + alias gc "git clone" + alias gd "git diff --ignore-space-at-eol" + alias gds "git diff --ignore-space-at-eol --compact-summary" + 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 -alias gb "go build -v" -alias godeps "go list -f '{{ join .Deps \"\n\"}}' ." -alias gt "go test -v" -alias gts "gotestsum" - -# 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" +if command -q go + alias gb "go build -v" + alias godeps "go list -f '{{ join .Deps \"\n\"}}' ." + alias gt "go test -v" + alias gts "gotestsum" +end # Hyperfine -alias bench "hyperfine --shell=none" +if command -q hyperfine + alias bench "hyperfine --shell=none" +end # Kernel -alias kerr "sudo dmesg --level=emerg,alert,crit,err" -alias klog "sudo dmesg" +if command -q dmesg + alias kerr "sudo dmesg --level=emerg,alert,crit,err" + alias klog "sudo dmesg" +end # List -alias l "ls" -alias ll "ls -l" -alias l2 "ls -T -L2" -alias lu "ls -l --total-size --sort=size --reverse --no-permissions --no-user --no-time" -alias lp "ls -l --no-filesize --no-time" +if command -q ls + alias l "ls" + alias ll "ls -l" + alias l2 "ls -T -L2" + 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 -alias tcp "lsof -PniTCP" -alias udp "lsof -PniUDP" +if command -q lsof + alias tcp "lsof -PniTCP" + alias udp "lsof -PniUDP" +end + +# MPV +if command -q mpv + alias music "mpv music --shuffle --no-video" +end # Neovim -alias e "nvim" -alias n "nvim" +if command -q nvim + alias e nvim +end # Pacman -alias p "pacman" -alias pi "sudo pacman -S" -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 powner "pacman -Qo" +if command -q apk + alias p "apk" + alias pi "sudo apk add" + alias pr "sudo apk del" + alias pu "sudo apk update && sudo apk upgrade" + alias pl "apk info" + alias po "apk info --who-owns" +else if command -q pacman + alias p "pacman" + alias pi "sudo pacman -S" + 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 -alias start "sudo systemctl start" -alias stop "sudo systemctl stop" -alias enable "sudo systemctl enable" -alias disable "sudo systemctl disable" -alias restart "sudo systemctl restart" -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" +if command -q service + alias services "service -l" +else if command -q systemctl + alias start "sudo systemctl start" + alias stop "sudo systemctl stop" + alias enable "sudo systemctl enable" + alias disable "sudo systemctl disable" + alias restart "sudo systemctl restart" + 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 -alias ta "tmux attach" -alias td "tmux detach" -alias tl "tmux ls" -alias tk "tmux kill-server" +if command -q tmux + alias ta "tmux attach" + alias td "tmux detach" + 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 cls "clear" alias debug "blinkenlights" alias disasm "llvm-objdump --disassembler-color=on --x86-asm-syntax=intel -d" alias ff "fastfetch" +alias fn "rg --files | rg" alias hex "hexdump -C" alias log "journalctl" alias utc "date -u +'%Y-%m-%dT%H:%M:%SZ'" diff --git a/.config/fish/config.fish b/.config/fish/config.fish index e5dfdee..b4bace5 100644 --- a/.config/fish/config.fish +++ b/.config/fish/config.fish @@ -1,16 +1,13 @@ -# Interactive mode if status is-interactive + # Aliases 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 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 \ No newline at end of file + # 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 \ No newline at end of file diff --git a/.config/fish/fish_variables b/.config/fish/fish_variables index 8070b83..8369e25 100644 --- a/.config/fish/fish_variables +++ b/.config/fish/fish_variables @@ -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_description:\x1d SETUVAR fish_pager_color_selected_prefix:\x1d -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 +SETUVAR fish_prompt_pwd_dir_length:0 \ No newline at end of file diff --git a/.config/fish/functions/config.fish b/.config/fish/functions/config.fish index 85d8819..0fb4829 100644 --- a/.config/fish/functions/config.fish +++ b/.config/fish/functions/config.fish @@ -1,3 +1,3 @@ function config - $EDITOR $HOME/.config/$argv + f $HOME/.config/$argv end diff --git a/.config/fish/functions/f.fish b/.config/fish/functions/f.fish index 651a4af..bfde20b 100644 --- a/.config/fish/functions/f.fish +++ b/.config/fish/functions/f.fish @@ -1,8 +1,19 @@ -function f - set tmp (mktemp -t "yazi-cwd.XXXXXX") - yazi $argv --cwd-file="$tmp" - if set cwd (command cat -- "$tmp"); and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ] - builtin cd -- "$cwd" +function f --wraps nnn --description 'support nnn quit and change directory' + if test -n "$NNNLVL" -a "$NNNLVL" -ge 1 + echo "nnn is already running" + return + 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 - rm -f -- "$tmp" end \ No newline at end of file diff --git a/.config/fish/functions/ls.fish b/.config/fish/functions/ls.fish index 81daf1e..b407316 100644 --- a/.config/fish/functions/ls.fish +++ b/.config/fish/functions/ls.fish @@ -1,4 +1,4 @@ -function ls +function ls --wraps eza if command -q eza eza --group-directories-first --time-style relative -T -L1 $argv else diff --git a/.config/fish/functions/t.fish b/.config/fish/functions/t.fish index 6f3f549..4ef6470 100644 --- a/.config/fish/functions/t.fish +++ b/.config/fish/functions/t.fish @@ -8,7 +8,13 @@ end function init_session 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 split-window -h -l 50 btop tmux select-pane -t 0 diff --git a/.config/fish/scripts/backup b/.config/fish/scripts/backup index 626b4c8..4495c2b 100755 --- a/.config/fish/scripts/backup +++ b/.config/fish/scripts/backup @@ -1,20 +1,26 @@ -#!/bin/fish +#!/usr/bin/fish set DIRECTORIES documents music pictures projects videos set EXCLUDES node_modules .cache .godot .svelte-kit -set FLAGS -avz --delete +set FLAGS --archive --compress --delete --human-readable --progress set HOSTS $argv set USER (whoami) -set DESTINATION "~/files/" +set DESTINATION "~/" for exclude in $EXCLUDES set -a FLAGS --exclude $exclude end for host in $HOSTS - echo "[$host]" + set_color yellow + echo " $host" - for DIR in $DIRECTORIES - echo "Backing up $DIR..." - rsync $FLAGS ~/$DIR $USER@$host:$DESTINATION + for dir in $DIRECTORIES + set_color blue + echo "  $dir" + + set_color normal + rsync $FLAGS ~/$dir $host:$DESTINATION end + + echo "" end \ No newline at end of file diff --git a/.config/fish/scripts/gitloc b/.config/fish/scripts/gitloc index c9ea178..e93b45d 100755 --- a/.config/fish/scripts/gitloc +++ b/.config/fish/scripts/gitloc @@ -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." read -l -P "Do you want to continue? [y/N] " CONFIRM diff --git a/.config/hypr/autostart.conf b/.config/hypr/autostart.conf index 1d84f1d..c791a3e 100644 --- a/.config/hypr/autostart.conf +++ b/.config/hypr/autostart.conf @@ -1,5 +1,12 @@ -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 +# Autostart +exec-once = swaybg -i ~/pictures/wallpapers/01.png exec-once = wl-paste --watch cliphist store -exec-once = $statusbar \ No newline at end of file +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 \ No newline at end of file diff --git a/.config/hypr/general.conf b/.config/hypr/general.conf index 8d099b6..d0bdf8e 100644 --- a/.config/hypr/general.conf +++ b/.config/hypr/general.conf @@ -46,6 +46,7 @@ misc { vfr = true animate_manual_resizes = false render_ahead_of_time = false + disable_hyprland_qtutils_check = true } cursor { @@ -55,7 +56,7 @@ cursor { input { accel_profile = flat - sensitivity = 0 + sensitivity = -0.75 } dwindle { @@ -67,6 +68,10 @@ ecosystem { no_donation_nag = true } +xwayland { + enabled = false +} + debug { overlay = false } \ No newline at end of file diff --git a/.config/hypr/keys.conf b/.config/hypr/keys.conf index a585578..b2b2422 100644 --- a/.config/hypr/keys.conf +++ b/.config/hypr/keys.conf @@ -2,24 +2,26 @@ $main = SUPER # Apps bind = $main, B, exec, $browser -bind = $main, D, exec, $editor -bind = $main, E, exec, $files -bind = $main, F1, exec, $systeminfo +bind = $main, E, exec, $editor +bind = $main, F, exec, $files +bind = $main, K, exec, $calendar bind = $main, L, exec, $lockscreen +bind = $main, M, exec, $email bind = $main, P, exec, $processmonitor -bind = $main, Return, exec, $floating bind = $main, S, exec, pkill $statusbar || $statusbar -bind = $main, Space, exec, pkill $menu || $menu bind = $main, T, exec, $terminal bind = $main, W, exec, $wallpaper 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 bind = $main, C, killactive, -bind = $main, F, fullscreen, -bind = $main, V, togglefloating, bind = $main, J, togglesplit, +bind = $main, V, togglefloating, +bind = $main, Super_R, fullscreen, # Session management bind = $main, Backspace, exit, @@ -88,6 +90,6 @@ bindl =, XF86AudioNext, exec, playerctl next bindl =, XF86AudioPrev, exec, playerctl previous # Volume control -bindle =, XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.05+ -bindle =, XF86AudioLowerVolume, 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.02- bindl =, XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle \ No newline at end of file diff --git a/.config/hypr/programs.conf b/.config/hypr/programs.conf index ba3365b..f39c23d 100644 --- a/.config/hypr/programs.conf +++ b/.config/hypr/programs.conf @@ -1,19 +1,21 @@ # Apps $browser = firefox -$email = evolution -$files = thunar $logout = wlogout $lockscreen = swaylock $menu = fuzzel $screenshot = IMG=~/pictures/screenshots/$(date +%Y-%m-%d_%H-%M-%S).png && grim -g "$(slurp -d)" $IMG && wl-copy < $IMG +$shell = fish $statusbar = waybar $terminal = foot $wallpaper = waypaper # Terminal based +$calendar = $terminal -e calcurse $editor = $terminal -e nvim +$email = $terminal -e aerc +$files = $terminal -e nnn $center = [float;size 960 540;center] $floating = $center $terminal -$systeminfo = $center $terminal --hold -e fastfetch -$processmonitor = $terminal -e btop -$update = $floating -e sudo pacman -Syu \ No newline at end of file +$systeminfo = $floating --hold -e fastfetch +$processmonitor = $floating -e btop +$update = $floating -e fish \ No newline at end of file diff --git a/.config/nvim/colors/monokai.lua b/.config/nvim/colors/monokai.lua new file mode 100644 index 0000000..e52480a --- /dev/null +++ b/.config/nvim/colors/monokai.lua @@ -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 }) \ No newline at end of file diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index 13fa7bf..30972e0 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -1,6 +1,7 @@ +require("boot") require("settings") -require("lsp") -require("packages") +require("colors") require("keys") -require("autocmds") -require("usercmds") \ No newline at end of file +require("events") +require("commands") +require("languages") \ No newline at end of file diff --git a/.config/nvim/lsp/clangd.lua b/.config/nvim/lsp/clangd.lua index ef2ede0..626d4e2 100644 --- a/.config/nvim/lsp/clangd.lua +++ b/.config/nvim/lsp/clangd.lua @@ -1,5 +1,5 @@ return { cmd = { "clangd", "--background-index" }, - root_markers = { "meson_options.txt", "CMakePresets.json" }, + root_markers = { "meson_options.txt", "CMakePresets.json", "compile_commands.json" }, filetypes = { "c", "cpp" }, } \ No newline at end of file diff --git a/.config/nvim/lua/boot.lua b/.config/nvim/lua/boot.lua new file mode 100644 index 0000000..c8efd46 --- /dev/null +++ b/.config/nvim/lua/boot.lua @@ -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 \ No newline at end of file diff --git a/.config/nvim/lua/colors.lua b/.config/nvim/lua/colors.lua new file mode 100644 index 0000000..537fa75 --- /dev/null +++ b/.config/nvim/lua/colors.lua @@ -0,0 +1 @@ +vim.cmd("colorscheme monokai") \ No newline at end of file diff --git a/.config/nvim/lua/usercmds.lua b/.config/nvim/lua/commands.lua similarity index 97% rename from .config/nvim/lua/usercmds.lua rename to .config/nvim/lua/commands.lua index 570d0fb..12522d1 100644 --- a/.config/nvim/lua/usercmds.lua +++ b/.config/nvim/lua/commands.lua @@ -11,6 +11,7 @@ vim.api.nvim_create_user_command("ToggleWord", function() ["yes"] = "no", ["Yes"] = "No", ["YES"] = "NO", + ["y"] = "n", ["1"] = "0", ["<"] = ">", ["("] = ")", diff --git a/.config/nvim/lua/disabled/cmp.lua b/.config/nvim/lua/disabled/cmp.lua deleted file mode 100644 index 6c10686..0000000 --- a/.config/nvim/lua/disabled/cmp.lua +++ /dev/null @@ -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 = { - [""] = cmp.mapping.complete(), - [""] = cmp.mapping.select_prev_item(), - [""] = cmp.mapping.select_next_item(), - [""] = cmp.mapping.abort(), - [""] = cmp.mapping.confirm({ select = true }), - } - - cmp.setup(opts) - end, -} diff --git a/.config/nvim/lua/disabled/fidget.lua b/.config/nvim/lua/disabled/fidget.lua deleted file mode 100644 index 00a18ac..0000000 --- a/.config/nvim/lua/disabled/fidget.lua +++ /dev/null @@ -1,11 +0,0 @@ -return { - "j-hui/fidget.nvim", - opts = { - integration = { - ["nvim-tree"] = { - enable = true, - }, - }, - }, - config = true, -} diff --git a/.config/nvim/lua/disabled/indent.lua b/.config/nvim/lua/disabled/indent.lua deleted file mode 100644 index 10d362b..0000000 --- a/.config/nvim/lua/disabled/indent.lua +++ /dev/null @@ -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, -} diff --git a/.config/nvim/lua/disabled/lsp-notify.lua b/.config/nvim/lua/disabled/lsp-notify.lua deleted file mode 100644 index 6f61709..0000000 --- a/.config/nvim/lua/disabled/lsp-notify.lua +++ /dev/null @@ -1,4 +0,0 @@ -return { - "mrded/nvim-lsp-notify", - config = true, -} diff --git a/.config/nvim/lua/disabled/lsp.lua b/.config/nvim/lua/disabled/lsp.lua deleted file mode 100644 index 72ec8d4..0000000 --- a/.config/nvim/lua/disabled/lsp.lua +++ /dev/null @@ -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" }, "", vim.lsp.buf.hover, "Hover") - map({ "n", "i" }, "", vim.lsp.buf.rename, "Rename") - map({ "n", "i" }, "", vim.lsp.buf.format, "Format") - map("n", "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, -} diff --git a/.config/nvim/lua/disabled/luasnip.lua b/.config/nvim/lua/disabled/luasnip.lua deleted file mode 100644 index a4865c1..0000000 --- a/.config/nvim/lua/disabled/luasnip.lua +++ /dev/null @@ -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, -} diff --git a/.config/nvim/lua/disabled/mini-complete.lua b/.config/nvim/lua/disabled/mini-complete.lua deleted file mode 100644 index 698d0e6..0000000 --- a/.config/nvim/lua/disabled/mini-complete.lua +++ /dev/null @@ -1,8 +0,0 @@ -return { - "echasnovski/mini.completion", - event = "InsertEnter", - opts = { - set_vim_settings = false, - }, - config = true, -} diff --git a/.config/nvim/lua/disabled/mini-surround.lua b/.config/nvim/lua/disabled/mini-surround.lua deleted file mode 100644 index e687abe..0000000 --- a/.config/nvim/lua/disabled/mini-surround.lua +++ /dev/null @@ -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, -} diff --git a/.config/nvim/lua/disabled/multicursor.lua b/.config/nvim/lua/disabled/multicursor.lua deleted file mode 100644 index e168951..0000000 --- a/.config/nvim/lua/disabled/multicursor.lua +++ /dev/null @@ -1,14 +0,0 @@ -return { - "mg979/vim-visual-multi", - keys = { - { "", mode = { "n", "x" }, desc = "Multicursor (word)" }, - { "", mode = { "n", "x" }, desc = "Multicursor (next line)" }, - { "", mode = { "n", "x" }, desc = "Multicursor (previous line)" }, - }, - init = function() - vim.g.VM_maps = { - ["Find Under"] = "", - ["Find Subword Under"] = "", - } - end, -} diff --git a/.config/nvim/lua/disabled/noice.lua b/.config/nvim/lua/disabled/noice.lua deleted file mode 100644 index b8ce7f6..0000000 --- a/.config/nvim/lua/disabled/noice.lua +++ /dev/null @@ -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, -} diff --git a/.config/nvim/lua/disabled/notify.lua b/.config/nvim/lua/disabled/notify.lua deleted file mode 100644 index 27ffe6a..0000000 --- a/.config/nvim/lua/disabled/notify.lua +++ /dev/null @@ -1,11 +0,0 @@ -return { - "rcarriga/nvim-notify", - event = "VeryLazy", - opts = { - background_colour = "#000000", - fps = 60, - render = "compact", - timeout = 0, - }, - config = true, -} diff --git a/.config/nvim/lua/disabled/nvterm.lua b/.config/nvim/lua/disabled/nvterm.lua deleted file mode 100644 index ae6851d..0000000 --- a/.config/nvim/lua/disabled/nvterm.lua +++ /dev/null @@ -1,7 +0,0 @@ -return { - "NvChad/nvterm", - keys = { - { "", "lua require('nvterm.terminal').toggle('float')", mode = { "n", "t" }, desc = "Toggle terminal" }, - }, - config = true, -} diff --git a/.config/nvim/lua/disabled/onedark.lua b/.config/nvim/lua/disabled/onedark.lua deleted file mode 100644 index 33b1b5a..0000000 --- a/.config/nvim/lua/disabled/onedark.lua +++ /dev/null @@ -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, -} diff --git a/.config/nvim/lua/disabled/snacks.lua b/.config/nvim/lua/disabled/snacks.lua deleted file mode 100644 index 817be35..0000000 --- a/.config/nvim/lua/disabled/snacks.lua +++ /dev/null @@ -1,10 +0,0 @@ -return { - "folke/snacks.nvim", - event = "BufReadPre", - opts = { - explorer = { - replace_netrw = true, - }, - }, - config = true, -} \ No newline at end of file diff --git a/.config/nvim/lua/disabled/spectre.lua b/.config/nvim/lua/disabled/spectre.lua deleted file mode 100644 index ebbe15e..0000000 --- a/.config/nvim/lua/disabled/spectre.lua +++ /dev/null @@ -1,7 +0,0 @@ -return { - "nvim-pack/nvim-spectre", - keys = { - { "sr", function() require("spectre").open() end, desc = "Replace in files (Spectre)" }, - }, - config = true, -} diff --git a/.config/nvim/lua/disabled/tree.lua b/.config/nvim/lua/disabled/tree.lua deleted file mode 100644 index b97f63d..0000000 --- a/.config/nvim/lua/disabled/tree.lua +++ /dev/null @@ -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", "", api.tree.change_root_to_parent, opts("Up")) - vim.keymap.set("n", "", api.tree.change_root_to_parent, opts("Up")) - vim.keymap.set("n", "", api.tree.change_root_to_node, opts("Enter")) - vim.keymap.set("n", "", api.tree.change_root_to_node, opts("Enter")) - - -- open folders with a single click - vim.keymap.set("n", "", 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 = { - { "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, -} diff --git a/.config/nvim/lua/disabled/trouble.lua b/.config/nvim/lua/disabled/trouble.lua deleted file mode 100644 index 2a79606..0000000 --- a/.config/nvim/lua/disabled/trouble.lua +++ /dev/null @@ -1,16 +0,0 @@ -return { - "folke/trouble.nvim", - event = "VeryLazy", - keys = { - { "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, -} diff --git a/.config/nvim/lua/autocmds.lua b/.config/nvim/lua/events.lua similarity index 56% rename from .config/nvim/lua/autocmds.lua rename to .config/nvim/lua/events.lua index 6cced5c..440e4a6 100644 --- a/.config/nvim/lua/autocmds.lua +++ b/.config/nvim/lua/events.lua @@ -1,35 +1,18 @@ local on = vim.api.nvim_create_autocmd 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" }, { 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" }, { - desc = "Disable sign column in terminals", - group = group, - callback = function() - vim.opt_local.signcolumn = "no" - end, -}) - on({ "TextYankPost" }, { desc = "Highlight when copying text", group = group, @@ -38,33 +21,20 @@ on({ "TextYankPost" }, { end, }) -on({ "VimEnter" }, { - desc = "Allow opening a directory and jumping to project root", +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({ "TermOpen", "TermEnter" }, { + desc = "Disable sign column in terminals", 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 + vim.opt_local.signcolumn = "no" end, }) \ No newline at end of file diff --git a/.config/nvim/lua/keys.lua b/.config/nvim/lua/keys.lua index e8088fe..c5c3936 100644 --- a/.config/nvim/lua/keys.lua +++ b/.config/nvim/lua/keys.lua @@ -1,43 +1,40 @@ +vim.g.mapleader = " " + local function map(mode, lhs, rhs, info) vim.keymap.set(mode, lhs, rhs, { desc = info }) end +-- Enter command mode without pressing shift map("n", ";", ":", "Command mode") + +-- Undo with u, Redo with U map("n", "U", "redo", "Redo") -map("n", "", "ToggleWord", "Toggle word") -map("n", "", "close", "Close window") -map("n", "l", "Lazy", "Lazy") + +-- Quit with q like any other terminal app map({"n", "v"}, "q", "qa", "Quit all") -map({"n", "v"}, "q", "qa!", "Quit all") +map({"n", "v"}, "Q", "qa!", "Force quit") + +-- Clear search with Esc map({"n", "i"}, "", "noh", "Clear search") + +-- Ctrl S to save the file from any mode map({"n", "i", "s", "v"}, "", "w", "Save file") --- Add or delete empty lines +-- Grab the line and move it up/down map("n", "", "set pastem`O``set nopaste", "Add empty line above") map("n", "", "m`-g/\\m^\\s*$/d``noh", "Delete empty line above") + +-- Grab the line below and move it up/down map("n", "", "set pastem`o``set nopaste", "Add empty line below") map("n", "", "m`+g/\\m^\\s*$/d``noh", "Delete empty line below") --- Quick movement -map("n", "J", "}", "Next paragraph") -map("n", "K", "{", "Previous paragraph") +-- Horizontal movement +map({"n", "v"}, "H", "^", "Beginning of line") +map({"n", "v"}, "L", "", "End of line") --- Editing multiple instances -map("n", "", "*#:%s///g", "Replace word under cursor") -map("v", "", "y/\"N:%s//\"/g", "Replace selection") -map("n", "", "#*", "Search word under cursor") -map("v", "", "y/\"N", "Search selection") - --- Line movement -map({"n", "v"}, "", "^", "Beginning of line") -map("i", "", "^i", "Beginning of line") -map({"i", "n", "v"}, "", "", "End of line") - --- Increasing and decreasing numbers -map("n", "+", "", "Increase number") -map("n", "-", "", "Decrease number") -map("n", "", "", "Increase number") -map("n", "", "", "Decrease number") +-- Vertical movement +map({"n", "v"}, "J", "}", "Next paragraph") +map({"n", "v"}, "K", "{", "Previous paragraph") -- Indenting map("n", "", "V>gv") @@ -45,24 +42,26 @@ map("n", "", "V") map("v", "", ">gv") map("v", "", "", "v") -map("n", "", "v") -map("n", "", "v") -map("n", "", "v") +-- Toggle word +map("n", "", "ToggleWord", "Toggle word") -map("v", "", "") -map("v", "", "") -map("v", "", "") -map("v", "", "") +-- Increasing and decreasing numbers +map("n", "+", "", "Increase number") +map("n", "-", "", "Decrease number") +map("n", "", "", "Increase number") +map("n", "", "", "Decrease number") -map("i", "", "v") -map("i", "", "v") -map("i", "", "v") -map("i", "", "v") +-- Replace all instances +map("n", "", "*#:%s///g", "Replace word under cursor") +map("v", "", "y/\"N:%s//\"/g", "Replace selection") --- Window switching +-- Search all instances +map("n", "", "#*", "Search word under cursor") +map("v", "", "y/\"N", "Search selection") + +-- Window management map("n", "", "k", "Move to the window above") map("n", "", "j", "Move to the window below") map("n", "", "h", "Move to the window on the left") map("n", "", "l", "Move to the window on the right") +map("n", "", "close", "Close window") \ No newline at end of file diff --git a/.config/nvim/lua/lsp.lua b/.config/nvim/lua/languages.lua similarity index 82% rename from .config/nvim/lua/lsp.lua rename to .config/nvim/lua/languages.lua index 6f1d10a..58f4de1 100644 --- a/.config/nvim/lua/lsp.lua +++ b/.config/nvim/lua/languages.lua @@ -1,7 +1,9 @@ +-- Virtual text vim.diagnostic.config({ virtual_lines = true, }) +-- LSP vim.lsp.enable({ "clangd", "gopls", diff --git a/.config/nvim/lua/packages.lua b/.config/nvim/lua/packages.lua deleted file mode 100644 index 82a9611..0000000 --- a/.config/nvim/lua/packages.lua +++ /dev/null @@ -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", - }, - }, - }, -}) \ No newline at end of file diff --git a/.config/nvim/lua/plugins/autopairs.lua b/.config/nvim/lua/plugins/autopairs.lua deleted file mode 100644 index 6378d47..0000000 --- a/.config/nvim/lua/plugins/autopairs.lua +++ /dev/null @@ -1,5 +0,0 @@ -return { - "windwp/nvim-autopairs", - event = "InsertEnter", - config = true, -} diff --git a/.config/nvim/lua/plugins/comment.lua b/.config/nvim/lua/plugins/comment.lua deleted file mode 100644 index b21a3d2..0000000 --- a/.config/nvim/lua/plugins/comment.lua +++ /dev/null @@ -1,23 +0,0 @@ -return { - "numToStr/Comment.nvim", - keys = { - { - "", - "lua require('Comment.api').toggle.linewise.current()", - desc = "Toggle comment", - }, - { - "", - "lua require('Comment.api').toggle.linewise(vim.fn.visualmode())", - mode = "v", - desc = "Toggle comment", - }, - }, - config = true, - opts = { - mappings = { - basic = false, - extra = false, - }, - }, -} diff --git a/.config/nvim/lua/plugins/flash.lua b/.config/nvim/lua/plugins/flash.lua deleted file mode 100644 index 2f69412..0000000 --- a/.config/nvim/lua/plugins/flash.lua +++ /dev/null @@ -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, -} diff --git a/.config/nvim/lua/plugins/gitsigns.lua b/.config/nvim/lua/plugins/gitsigns.lua deleted file mode 100644 index 419cbd8..0000000 --- a/.config/nvim/lua/plugins/gitsigns.lua +++ /dev/null @@ -1,5 +0,0 @@ -return { - "lewis6991/gitsigns.nvim", - event = "BufReadPre", - config = true, -} \ No newline at end of file diff --git a/.config/nvim/lua/plugins/monokai.lua b/.config/nvim/lua/plugins/monokai.lua deleted file mode 100644 index 8dd7b26..0000000 --- a/.config/nvim/lua/plugins/monokai.lua +++ /dev/null @@ -1,7 +0,0 @@ -return { - "tanvirtin/monokai.nvim", - lazy = false, - priority = 1000, - opts = {}, - config = true, -} diff --git a/.config/nvim/lua/plugins/telescope.lua b/.config/nvim/lua/plugins/telescope.lua deleted file mode 100644 index 8f18a87..0000000 --- a/.config/nvim/lua/plugins/telescope.lua +++ /dev/null @@ -1,36 +0,0 @@ -return { - "nvim-telescope/telescope.nvim", - dependencies = { - "nvim-lua/plenary.nvim", - "nvim-telescope/telescope-project.nvim", - }, - keys = { - {"", "Telescope buffers", desc = "Buffers"}, - {"f", "Telescope find_files", desc = "Find files"}, - {"p", "Telescope project", desc = "Projects"}, - {"r", "Telescope oldfiles", desc = "Recent files"}, - }, - config = function() - require("telescope").setup({ - defaults = { - mappings = { - i = { - [""] = 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, -} diff --git a/.config/nvim/lua/plugins/treesitter.lua b/.config/nvim/lua/plugins/treesitter.lua deleted file mode 100644 index 78459c1..0000000 --- a/.config/nvim/lua/plugins/treesitter.lua +++ /dev/null @@ -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, -} diff --git a/.config/nvim/lua/settings.lua b/.config/nvim/lua/settings.lua index b113589..c4e9067 100644 --- a/.config/nvim/lua/settings.lua +++ b/.config/nvim/lua/settings.lua @@ -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 local opt = vim.opt opt.autowrite = false @@ -51,8 +43,4 @@ opt.statusline = "%{repeat('─',winwidth('.'))}" -- Undo opt.undofile = true -opt.undolevels = 10000 - --- Virtual text -vim.diagnostic.config({ virtual_lines = true }) -vim.lsp.enable({"clangd", "gopls", "rust-analyzer"}) \ No newline at end of file +opt.undolevels = 10000 \ No newline at end of file diff --git a/.config/waybar/config.jsonc b/.config/waybar/config.jsonc index 15b6f73..ad2a19e 100644 --- a/.config/waybar/config.jsonc +++ b/.config/waybar/config.jsonc @@ -1,7 +1,7 @@ { "layer": "top", "position": "top", - "modules-left": ["cpu", "custom/gpu", "memory", "disk"], + "modules-left": ["cpu", "memory", "disk"], "modules-center": ["hyprland/workspaces"], "modules-right": ["wireplumber", "clock"], "include": "~/.config/waybar/modules.jsonc", diff --git a/.config/waybar/modules.jsonc b/.config/waybar/modules.jsonc index eab87ff..e32a11c 100644 --- a/.config/waybar/modules.jsonc +++ b/.config/waybar/modules.jsonc @@ -1,9 +1,52 @@ { "cpu": { "interval": 2, - "format": "{icon} {usage}%", - "format-icons": ["󰾆 ", "󰾅 ", "󰓅 "], - "on-click": "$TERMINAL -- btop", + "format": " {usage}%", + "on-click": "$TERMINAL -- btop --preset 1", + }, + "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": "{calendar}", + "calendar": { + "format": { + "today": "{}" + } + }, + "on-click": "date -u +'%Y-%m-%dT%H:%M:%SZ' | wl-copy", }, "custom/gpu": { "interval": 2, @@ -12,18 +55,6 @@ "return-type": "", "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": { "format": " {}", "interval": 30, @@ -57,36 +88,4 @@ "tooltip-format": "Number of processes with UDP connections", "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": "{calendar}", - "calendar": { - "format": { - "today": "{}" - } - }, - "on-click": "date -u +'%Y-%m-%dT%H:%M:%SZ' | wl-copy", - }, } \ No newline at end of file diff --git a/.config/wlogout/layout b/.config/wlogout/layout index e125ce4..3faf70d 100644 --- a/.config/wlogout/layout +++ b/.config/wlogout/layout @@ -6,13 +6,13 @@ } { "label" : "shutdown", - "action" : "systemctl poweroff", + "action" : "doas poweroff", "text" : "Shutdown", "keybind" : "s" } { "label" : "reboot", - "action" : "systemctl reboot", + "action" : "doas reboot", "text" : "Reboot", "keybind" : "r" } diff --git a/.config/yazi/keymap.toml b/.config/yazi/keymap.toml deleted file mode 100644 index b5f0281..0000000 --- a/.config/yazi/keymap.toml +++ /dev/null @@ -1,4 +0,0 @@ -[[manager.prepend_keymap]] -on = [ "" ] -run = 'shell "$SHELL" --block --confirm' -desc = "Open shell here" \ No newline at end of file diff --git a/.config/yazi/yazi.toml b/.config/yazi/yazi.toml deleted file mode 100644 index a01d710..0000000 --- a/.config/yazi/yazi.toml +++ /dev/null @@ -1,2 +0,0 @@ -[manager] -show_hidden = true \ No newline at end of file diff --git a/.env b/.env new file mode 100644 index 0000000..4e93052 --- /dev/null +++ b/.env @@ -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" \ No newline at end of file diff --git a/.gitignore b/.gitignore index 3ac64d3..9d7d6e9 100644 --- a/.gitignore +++ b/.gitignore @@ -6,13 +6,13 @@ lazy-lock.json !.editorconfig !.gitignore !.init +!.env !/.config /.config/* !/.config/alacritty !/.config/btop !/.config/cava !/.config/easyeffects -!/.config/environment.d !/.config/fastfetch !/.config/foot !/.config/fish diff --git a/.init b/.init index 5a7901a..ce30d1c 100755 --- a/.init +++ b/.init @@ -1,2 +1,2 @@ -#!/bin/fish -uwsm start hyprland.desktop \ No newline at end of file +#!/usr/bin/fish +dbus-run-session Hyprland \ No newline at end of file