diff --git a/.config/btop/btop.conf b/.config/btop/btop.conf index 2fb3895..b7f2269 100644 --- a/.config/btop/btop.conf +++ b/.config/btop/btop.conf @@ -2,7 +2,7 @@ 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" +presets = "proc:0:default,cpu:1:default mem:0:default net:0:tty" vim_keys = False rounded_corners = True graph_symbol = "braille" @@ -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/fish/alias.fish b/.config/fish/alias.fish index 7633a30..4833220 100644 --- a/.config/fish/alias.fish +++ b/.config/fish/alias.fish @@ -3,6 +3,7 @@ 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" @@ -11,6 +12,7 @@ if command -q git 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 @@ -49,9 +51,8 @@ if command -q lsof end # Neovim -if command -q nvim - alias e "nvim" - alias n "nvim" +if command -q $EDITOR + alias e $EDITOR end # Pacman @@ -59,9 +60,9 @@ if command -q apk alias p "apk" alias pi "sudo apk add" alias pr "sudo apk del" - alias pu "sudo apk update" + alias pu "sudo apk update && sudo apk upgrade" alias pl "apk info" - alias powner "apk info --who-owns" + alias po "apk info --who-owns" else if command -q pacman alias p "pacman" alias pi "sudo pacman -S" @@ -73,7 +74,7 @@ else if command -q pacman alias paur "pacman -Qm" alias pfiles "pacman -Ql" alias porphan "pacman -Qtdq" - alias powner "pacman -Qo" + alias po "pacman -Qo" end # Sudo diff --git a/.config/fish/config.fish b/.config/fish/config.fish index 2297bbd..b2182b9 100644 --- a/.config/fish/config.fish +++ b/.config/fish/config.fish @@ -1,8 +1,3 @@ -# Interactive mode -if status is-interactive - source $HOME/.config/fish/alias.fish -end - # Set environment variables from .env while read -la line set -l keyval (string split -m1 "=" $line) @@ -12,10 +7,7 @@ while read -la line set -xg $key $value end < ~/.env -# Add scripts to PATH -fish_add_path $XDG_CONFIG_HOME/fish/scripts - -# Add Go binaries to PATH -if command -q go - fish_add_path (go env GOPATH)/bin +# Interactive mode aliases +if status is-interactive + source $HOME/.config/fish/alias.fish 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/scripts/backup b/.config/fish/scripts/backup index 82daca3..2cd84d8 100755 --- a/.config/fish/scripts/backup +++ b/.config/fish/scripts/backup @@ -1,4 +1,4 @@ -#!/bin/fish +#!/usr/bin/fish set DIRECTORIES documents music pictures projects videos set EXCLUDES node_modules .cache .godot .svelte-kit set FLAGS --archive --compress --delete --quiet 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..c2f68bb 100644 --- a/.config/hypr/autostart.conf +++ b/.config/hypr/autostart.conf @@ -1,5 +1,10 @@ -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 = /usr/libexec/pipewire-launcher +exec-once = $statusbar + +# Disabled +#exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP +#exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 +#exec-once = waypaper --restore \ No newline at end of file diff --git a/.config/hypr/general.conf b/.config/hypr/general.conf index aa661a9..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 { @@ -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/programs.conf b/.config/hypr/programs.conf index 46fb852..038748b 100644 --- a/.config/hypr/programs.conf +++ b/.config/hypr/programs.conf @@ -5,15 +5,16 @@ $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 $editor = $terminal -e nvim -$files = $terminal -e yazi +$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/init.lua b/.config/nvim/init.lua index 464f3c0..bb18638 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -1,6 +1,6 @@ require("boot") require("settings") -require("lsp") 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 index 43ad75d..c8efd46 100644 --- a/.config/nvim/lua/boot.lua +++ b/.config/nvim/lua/boot.lua @@ -13,34 +13,19 @@ end -- Disable plugins local 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", + "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] = 1 + vim.g["loaded_" .. plugin] = 0 end \ 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/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 d842f3c..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 d21e641..c5c3936 100644 --- a/.config/nvim/lua/keys.lua +++ b/.config/nvim/lua/keys.lua @@ -4,41 +4,37 @@ 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") + +-- 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") @@ -46,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") \ No newline at end of file +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/settings.lua b/.config/nvim/lua/settings.lua index 7c73e8f..c4e9067 100644 --- a/.config/nvim/lua/settings.lua +++ b/.config/nvim/lua/settings.lua @@ -43,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 435a045..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": 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", - }, } \ 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/.env b/.env index ce52b29..fd770e1 100644 --- a/.env +++ b/.env @@ -15,9 +15,11 @@ 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 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 +TERMINAL=foot +PATH=$XDG_CONFIG_HOME/fish/scripts:$XDG_BIN_HOME:$CARGO_HOME/bin:$GOPATH/bin:/usr/lib/ccache/bin:/usr/sbin:/usr/bin:/sbin:/bin \ No newline at end of file