diff --git a/aerc/.config/aerc/aerc.conf b/aerc/.config/aerc/aerc.conf index 6ce822f..84d73b6 100644 --- a/aerc/.config/aerc/aerc.conf +++ b/aerc/.config/aerc/aerc.conf @@ -576,11 +576,11 @@ sort = -r date [viewer] # pager=less -Rc -pager=pager = bat --style=plain --paging=always -html-unsafe-images=false -html-filter=dante +pager= bat --style=plain --paging=always +# html-unsafe-images=false +# html-filter=dante image/*=chafa -f kitty -s ${width}x${height} -text/html=dante +text/html= ~/.local/bin/mailhtml2md application/pdf=zathura video/*=mpv header-layout=From,To,Subject,Date diff --git a/kanata/.config/systemd/user/default.target.wants/gammastep.service b/kanata/.config/systemd/user/default.target.wants/gammastep.service new file mode 120000 index 0000000..3a5c9c6 --- /dev/null +++ b/kanata/.config/systemd/user/default.target.wants/gammastep.service @@ -0,0 +1 @@ +/home/liph/.config/systemd/user/gammastep.service \ No newline at end of file diff --git a/kanata/.config/systemd/user/gammastep.service b/kanata/.config/systemd/user/gammastep.service new file mode 100644 index 0000000..c4c76ef --- /dev/null +++ b/kanata/.config/systemd/user/gammastep.service @@ -0,0 +1,13 @@ +[Unit] +Description=Gamma-colour filter (red-shift) for Wayland +After=graphical-session.target +PartOf=graphical-session.target + +[Service] +Type=simple +ExecStart=/usr/bin/gammastep -l 47.38:8.54 -t 6000:4000 +Restart=on-failure +RestartSec=3 + +[Install] +WantedBy=default.target diff --git a/kanata/.config/systemd/user/imple b/kanata/.config/systemd/user/imple new file mode 100644 index 0000000..7ed1e5a --- /dev/null +++ b/kanata/.config/systemd/user/imple @@ -0,0 +1,83 @@ +[38:2:144:140:170;48:2:42:39:63m [38:2:109:128:134m [22;1;38:2:144:140:170mwob.service + 1 [38:2:156:207:216m┆ +[38:2:110:106:134m~ +[38:2:110:106:134m~ +[38:2:110:106:134m~ +[38:2:110:106:134m~ +[38:2:110:106:134m~ +[38:2:110:106:134m~ +[38:2:110:106:134m~ +[38:2:110:106:134m~ +[38:2:110:106:134m~ +[38:2:110:106:134m~ +[38:2:110:106:134m~ +[38:2:110:106:134m~ +[38:2:110:106:134m~ +[38:2:110:106:134m~ +[38:2:110:106:134m~ +[38:2:110:106:134m~ +[38:2:110:106:134m~ +[38:2:110:106:134m~ +[38:2:110:106:134m~ +[38:2:110:106:134m~ +[38:2:110:106:134m~ +[38:2:110:106:134m~ +[38:2:110:106:134m~ +[38:2:110:106:134m~ +[38:2:110:106:134m~ +[38:2:110:106:134m~ +[38:2:110:106:134m~ +[38:2:110:106:134m~ +[38:2:110:106:134m~ +[38:2:110:106:134m~ +[38:2:110:106:134m~ +[38:2:110:106:134m~ +[38:2:110:106:134m~ +[38:2:110:106:134m~ +[38:2:110:106:134m~ +[38:2:110:106:134m~ +[38:2:110:106:134m~ +[38:2:110:106:134m~ +[38:2:110:106:134m~ +[38:2:110:106:134m~ +[38:2:110:106:134m~ +[38:2:110:106:134m~ +[38:2:110:106:134m~ +[38:2:110:106:134m~ +[38:2:110:106:134m~ +[38:2:110:106:134m~ +[38:2:110:106:134m~ +[38:2:110:106:134m~ +[38:2:110:106:134m~ +[38:2:110:106:134m~ +[38:2:110:106:134m~ +[38:2:110:106:134m~ +[38:2:110:106:134m~ +[38:2:110:106:134m~ +[38:2:110:106:134m~ +[38:2:110:106:134m~ +[38:2:110:106:134m~ +[38:2:110:106:134m~ +[38:2:110:106:134m~ +[38:2:110:106:134m~ +[38:2:110:106:134m~ +[38:2:110:106:134m~ +[38:2:110:106:134m~ +[38:2:110:106:134m~ +[38:2:110:106:134m~ +[38:2:110:106:134m~ +[38:2:110:106:134m~ +[38:2:110:106:134m~ +[38:2:110:106:134m~ +[38:2:110:106:134m~ +[38:2:110:106:134m~ +[38:2:110:106:134m~ +[38:2:110:106:134m~ +[38:2:110:106:134m~ +[38:2:110:106:134m~ +[38:2:110:106:134m~ +[38:2:110:106:134m~ +[38:2:110:106:134m~ +[38:2:110:106:134m~ +[38:2:110:106:134m~ +[22;1;38:2:35:33:54;48:2:234:154:151m NORMAL [22;38:2:234:154:151;48:2:42:39:63m[38:2:224:222:244m wob.service [38:2:57:53:82m[38:2:234:154:151;48:2:57:53:82m Top [22;1;38:2:35:33:54;48:2:234:154:151m 1:1 diff --git a/kitty/.config/kitty/current-theme.conf b/kitty/.config/kitty/current-theme.conf index a856d7f..4d4de88 100644 --- a/kitty/.config/kitty/current-theme.conf +++ b/kitty/.config/kitty/current-theme.conf @@ -1,47 +1,56 @@ -background #282828 -foreground #d4be98 +## name: Rosé Pine Moon +## author: mvllow +## license: MIT +## upstream: https://github.com/rose-pine/kitty/blob/main/dist/rose-pine-moon.conf +## blurb: All natural pine, faux fur and a bit of soho vibes for the classy minimalist -selection_background #d4be98 -selection_foreground #282828 +foreground #e0def4 +background #232136 +selection_foreground #e0def4 +selection_background #44415a -cursor #a89984 -cursor_text_color background +cursor #56526e +cursor_text_color #e0def4 -active_tab_background #282828 -active_tab_foreground #d4be98 -active_tab_font_style bold -inactive_tab_background #282828 -inactive_tab_foreground #a89984 -inactive_tab_font_style normal +url_color #c4a7e7 -# Black -color0 #665c54 -color8 #928374 +active_tab_foreground #e0def4 +active_tab_background #393552 +inactive_tab_foreground #6e6a86 +inactive_tab_background #232136 -# Red -color1 #ea6962 -color9 #ea6962 +active_border_color #3e8fb0 +inactive_border_color #44415a -# Green -color2 #a9b665 -color10 #a9b665 +# black +color0 #393552 +color8 #6e6a86 -# Yellow -color3 #e78a4e -color11 #d8a657 +# red +color1 #eb6f92 +color9 #eb6f92 -# Blue -color4 #7daea3 -color12 #7daea3 +# green +color2 #3e8fb0 +color10 #3e8fb0 -# Magenta -color5 #d3869b -color13 #d3869b +# yellow +color3 #f6c177 +color11 #f6c177 -# Cyan -color6 #89b482 -color14 #89b482 +# blue +color4 #9ccfd8 +color12 #9ccfd8 + +# magenta +color5 #c4a7e7 +color13 #c4a7e7 + +# cyan +color6 #ea9a97 +color14 #ea9a97 + +# white +color7 #e0def4 +color15 #e0def4 -# White -color7 #d4be98 -color15 #d4be98 diff --git a/kitty/.config/kitty/kitty.conf b/kitty/.config/kitty/kitty.conf index 8ac10cc..a809503 100644 --- a/kitty/.config/kitty/kitty.conf +++ b/kitty/.config/kitty/kitty.conf @@ -1,5 +1,5 @@ # BEGIN_KITTY_THEME -# Gruvbox Material +# Rosé Pine Moon include current-theme.conf # END_KITTY_THEME # diff --git a/kitty/.config/kitty/kitty.conf.bak b/kitty/.config/kitty/kitty.conf.bak index 99fdc20..8ac10cc 100644 --- a/kitty/.config/kitty/kitty.conf.bak +++ b/kitty/.config/kitty/kitty.conf.bak @@ -1,22 +1,23 @@ # BEGIN_KITTY_THEME -# Catppuccin-Mocha +# Gruvbox Material include current-theme.conf # END_KITTY_THEME # +shell zsh --login font_family JetBrainsMono Nerd Font -bold_font JetBrainsMono Nerd Font Bold -italic_font JetBrainsMono Nerd Font Italic -bold_italic_font JetBrainsMono Nerd Font Bold Italic +bold_font auto +italic_font auto +bold_italic_font auto font_size 12 -# background_opacity 0.95 +background_opacity 0.90 term xterm-256color -# allow_hyperlinks yes +allow_hyperlinks yes -# copy_on_select yes -# paste_actions confirm-if-large +copy_on_select yes +paste_actions confirm-if-large diff --git a/niri/.config/niri/config.kdl b/niri/.config/niri/config.kdl index 3a12739..09fbf58 100644 --- a/niri/.config/niri/config.kdl +++ b/niri/.config/niri/config.kdl @@ -34,14 +34,14 @@ environment { } output "eDP-1" { mode "2880x1800@59.990" - scale 1.2 + scale 1.1 position x=0 y=0 focus-at-startup } -output "HDMI-A-1" { +output "DP-4" { mode "2560x1440@59.951" position x=1645 y=0 - scale 1.0 + scale 0.8 } layout { gaps 2 @@ -79,6 +79,7 @@ spawn-at-startup "waybar" "-c" "/home/liph/.config/niri/waybar-niri/config.jsonc spawn-at-startup "swaync" // spawn-at-startup "kanshi" spawn-at-startup "swww-daemon" +spawn-at-startup "xwayland-satellite" spawn-at-startup "kitty" spawn-at-startup "librewolf" spawn-at-startup "sh" "-c" "sleep 5 && exec swayidle -w timeout 300 hyprlock timeout 600 'niri msg action power-off-monitors' resume 'niri msg action power-on-monitors' timeout 3600 'systemctl suspend'" @@ -140,35 +141,35 @@ window-rule { window-rule { match app-id="floating_btop" default-column-width { - proportion 0.5 + proportion 0.6667 } open-floating true } window-rule { match app-id="floating_htop" default-column-width { - proportion 0.5 + proportion 0.6667 } open-floating true } window-rule { match app-id="floating_bluetui" default-column-width { - proportion 0.5 + proportion 0.6667 } open-floating true } window-rule { match app-id="floating_pulsemixer" default-column-width { - proportion 0.5 + proportion 0.6667 } open-floating true } window-rule { match app-id="floating_wavemon" default-column-width { - proportion 0.5 + proportion 0.6667 } open-floating true } @@ -217,6 +218,9 @@ binds { Mod+Mod5+R hotkey-overlay-title="Open Bluetui" { spawn "kitty" "--class" "floating_bluetui" "-e" "bluetui" } + Mod+Mod5+T hotkey-overlay-title="Open Wavemon" { + spawn "kitty" "--class" "floating_wavemon" "-e" "wavemon" + } // Brightness Controll Mod+Ctrl+0 { spawn "sh" "-c" "~/scripts/layer_notify.sh 0" @@ -528,6 +532,10 @@ binds { Mod+Shift+4 { spawn "sh" "-c" "grim -g \"$(slurp)\" - | wl-copy && notify-send -t 2000 'Screenshot' 'Area copied to clipboard'" } + // area screenshot → annotate in swappy + Mod+Shift+5 { + spawn "sh" "-c" "grim -g \"$(slurp)\" - | swappy -f -" + } Mod+Escape allow-inhibiting=false { toggle-keyboard-shortcuts-inhibit } diff --git a/nvim/.config/nvim/.luarc.json b/nvim/.config/nvim/.luarc.json index aad784f..39ba1c1 100644 --- a/nvim/.config/nvim/.luarc.json +++ b/nvim/.config/nvim/.luarc.json @@ -6,6 +6,7 @@ ], "runtime.unicodeName": true, "diagnostics.disable": [ - "undefined-doc-name" + "undefined-doc-name", + "assign-type-mismatch" ] } \ No newline at end of file diff --git a/nvim/.config/nvim/after/ftplugin/html.lua b/nvim/.config/nvim/after/ftplugin/html.lua new file mode 100644 index 0000000..687b374 --- /dev/null +++ b/nvim/.config/nvim/after/ftplugin/html.lua @@ -0,0 +1,89 @@ +-- after/ftplugin/html.lua (or just :source % once) +local port = 8085 +local root = vim.loop.cwd() +local job_id = nil + +vim.api.nvim_create_user_command("Serve", function() + -- kill previous python instance + if job_id then + vim.fn.jobstop(job_id) + end + + -- one-liner HTTP server + websocket broadcast + local script = ([[ +import http.server, os, subprocess, threading, time, mimetypes, json +from http.server import HTTPServer, SimpleHTTPRequestHandler +import websockets, asyncio, pathlib + +ROOT = %q +PORT = %d +clients = set() + +class Handler(SimpleHTTPRequestHandler): + def log_message(self, fmt, *args): pass # shut up + def do_GET(self): + if self.path == '/': + self.path = '/index.html' + # inject tiny reload script into every HTML + if self.path.endswith('.html'): + ctype = 'text/html; charset=utf-8' + with open(os.path.join(ROOT, self.path.lstrip('/')), 'rb') as f: + content = f.read().decode() + inject = '' + content = content.replace('', inject .. '') + self.send_response(200) + self.send_header('Content-type', ctype) + self.end_headers() + self.wfile.write(content.encode()) + else: + super().do_GET() + +async def ws_handler(websocket): + clients.add(websocket) + try: + await websocket.wait_closed() + finally: + clients.remove(websocket) + +async def websocket_main(): + await websockets.serve(ws_handler, "localhost", %d, path="/ws") + +def broadcast_reload(): + for c in clients: + asyncio.run(c.send("reload")) + clients.clear() + +def reload_loop(): + while True: + time.sleep(0.05) + try: + subprocess.check_call(["inotifywait", "-e", "close_write", "-t", "0", ROOT], + stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) + broadcast_reload() + except: pass # inotify not installed → noop (manual F5 still works) + +def main(): + threading.Thread(target=reload_loop, daemon=True).start() + asyncio.set_event_loop(asyncio.new_event_loop()) + threading.Thread(target=lambda: asyncio.run(websocket_main()), daemon=True).start() + HTTPServer(("", PORT), Handler).serve_forever() + +if __name__ == '__main__': + main() +]]):format(root, port, port, port) + + job_id = vim.fn.jobstart({ "python", "-c", script }, { stdout_buffered = true }) + vim.fn.jobstart({ "sleep", "0.2" }, { + on_exit = function() + vim.ui.open(("http://localhost:%d"):format(port)) + end, + }) + vim.notify("Serving → http://localhost:" .. port, vim.log.levels.INFO) +end, {}) + +vim.api.nvim_create_user_command("ServeStop", function() + if job_id then + vim.fn.jobstop(job_id) + job_id = nil + end +end, {}) diff --git a/nvim/.config/nvim/after/ftplugin/mail.lua b/nvim/.config/nvim/after/ftplugin/mail.lua index 3d2b075..84b8999 100644 --- a/nvim/.config/nvim/after/ftplugin/mail.lua +++ b/nvim/.config/nvim/after/ftplugin/mail.lua @@ -5,13 +5,13 @@ local function extract_email(address_string) if email then return email end - + -- Match standalone email: "email@example.com" email = address_string:match("([%w%._%+-]+@[%w%._%+-]+)") if email then return email end - + -- Fallback: return as-is if no pattern matches return address_string end @@ -21,14 +21,14 @@ function _G.mail_complete(findstart, base) if findstart == 1 then -- Find start of word local line = vim.api.nvim_get_current_line() - local col = vim.fn.col('.') + local col = vim.fn.col(".") local line_to_cursor = line:sub(1, col - 1) - + -- Only on header lines if not line_to_cursor:match("^%s*[ToCcBcFrom]+:%s*") then return -1 end - + -- Find start of current address local start = line_to_cursor:reverse():find("[%s,]") if start then @@ -42,10 +42,10 @@ function _G.mail_complete(findstart, base) if not handle then return {} end - + local result = handle:read("*a") handle:close() - + local matches = {} for address in result:gmatch("[^\r\n]+") do if address ~= "" then @@ -54,21 +54,21 @@ function _G.mail_complete(findstart, base) table.insert(matches, clean_email) end end - + return matches end end -- Set omnifunc -vim.bo.omnifunc = 'v:lua.mail_complete' +vim.bo.omnifunc = "v:lua.mail_complete" -- Map Tab to trigger completion on header lines -vim.keymap.set('i', '', function() +vim.keymap.set("i", "", function() local line = vim.api.nvim_get_current_line() if line:match("^%s*[ToCcBcFrom]+:%s*") then - return '' + return "" else - return '' + return "" end end, { expr = true, buffer = true }) @@ -80,10 +80,10 @@ local function pick_email() vim.notify("Could not query abook", vim.log.levels.ERROR) return end - + local addresses = {} local display_addresses = {} - + for line in handle:lines() do if line ~= "" then local clean_email = extract_email(line) @@ -93,12 +93,12 @@ local function pick_email() end end handle:close() - + if #addresses == 0 then vim.notify("No addresses in abook", vim.log.levels.WARN) return end - + -- Use vim.ui.select (works with fzf-lua if installed) vim.ui.select(display_addresses, { prompt = "Select recipient:", @@ -114,15 +114,13 @@ local function pick_email() local new_line = line:sub(1, col) .. email .. line:sub(col + 1) vim.api.nvim_set_current_line(new_line) -- Move cursor after inserted text - vim.api.nvim_win_set_cursor(0, {row, col + #email}) + vim.api.nvim_win_set_cursor(0, { row, col + #email }) end end) end -- Map Ctrl+f to pick email (Option 3) -vim.keymap.set('i', '', pick_email, { buffer = true, desc = "Pick email address with fzf" }) +vim.keymap.set("i", "", pick_email, { buffer = true, desc = "Pick email address with fzf" }) -- Optional: Map Ctrl+a for Tab completion manually (in case Tab doesn't work) -vim.keymap.set('i', '', '', { buffer = true, desc = "Trigger address completion" }) -``` -im.keymap.set("i", "", "", { buffer = true, desc = "Trigger address completion" }) +vim.keymap.set("i", "", "", { buffer = true, desc = "Trigger address completion" }) diff --git a/nvim/.config/nvim/lazy-lock.json b/nvim/.config/nvim/lazy-lock.json index 42c63b7..3fd89bc 100644 --- a/nvim/.config/nvim/lazy-lock.json +++ b/nvim/.config/nvim/lazy-lock.json @@ -1,7 +1,7 @@ { "Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" }, "LuaSnip": { "branch": "master", "commit": "5a1e39223db9a0498024a77b8441169d260c8c25" }, - "R.nvim": { "branch": "main", "commit": "80268b5a66ad48e308513cb0ebccc16d5e1e7d5a" }, + "R.nvim": { "branch": "main", "commit": "659dc18aba2d2b799c04efbce66a15ea87bd6ec6" }, "barbecue": { "branch": "main", "commit": "cd7e7da622d68136e13721865b4d919efd6325ed" }, "catppuccin": { "branch": "main", "commit": "beaf41a30c26fd7d6c386d383155cbd65dd554cd" }, "cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" }, @@ -10,7 +10,8 @@ "cmp-nvim-lua": { "branch": "main", "commit": "e3a22cb071eb9d6508a156306b102c45cd2d573d" }, "cmp-path": { "branch": "main", "commit": "c642487086dbd9a93160e1679a1327be111cbc25" }, "cmp-r": { "branch": "main", "commit": "70bfe8f4c062acc10266e24825439c009a0b1b89" }, - "cmp-tabnine": { "branch": "main", "commit": "c0167cdc86c15e782c5461ee62aebee89231c2ed" }, + "cmp-vimtex": { "branch": "master", "commit": "5283bf9108ef33d41e704027b9ef22437ce7a15b" }, + "cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" }, "conform.nvim": { "branch": "master", "commit": "c2526f1cde528a66e086ab1668e996d162c75f4f" }, "dashboard-nvim": { "branch": "master", "commit": "0775e567b6c0be96d01a61795f7b64c1758262f6" }, "diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" }, @@ -19,14 +20,15 @@ "everforest": { "branch": "master", "commit": "b03a03148c8b34c24c96960b93da9c8883d11f54" }, "flash.nvim": { "branch": "main", "commit": "fcea7ff883235d9024dc41e638f164a450c14ca2" }, "friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" }, - "fzf-lua": { "branch": "main", "commit": "c86b72c62b01d2242cafa45fb0d1fc3bf66e6a2b" }, - "gitsigns.nvim": { "branch": "main", "commit": "1ce96a464fdbc24208e24c117e2021794259005d" }, + "fzf-lua": { "branch": "main", "commit": "fb8c50ba62a0daa433b7ac2b78834f318322b879" }, + "gitsigns.nvim": { "branch": "main", "commit": "31217271a7314c343606acb4072a94a039a19fb5" }, "grapple.nvim": { "branch": "main", "commit": "b41ddfc1c39f87f3d1799b99c2f0f1daa524c5f7" }, "gruvbox-mat": { "branch": "master", "commit": "790afe9dd085aa04eccd1da3626c5fa05c620e53" }, "indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" }, "kanagawa.nvim": { "branch": "master", "commit": "aef7f5cec0a40dbe7f3304214850c472e2264b10" }, "lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" }, "lazydev.nvim": { "branch": "main", "commit": "5231c62aa83c2f8dc8e7ba957aa77098cda1257d" }, + "live-preview.nvim": { "branch": "main", "commit": "f056b4b859d54595afce53e67129f7684380d3ba" }, "lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" }, "luvit-meta": { "branch": "main", "commit": "0ea4ff636c5bb559ffa78108561d0976f4de9682" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "ae609525ddf01c153c39305730b1791800ffe4fe" }, @@ -41,20 +43,22 @@ "nvim-cmp": { "branch": "main", "commit": "da88697d7f45d16852c6b2769dc52387d1ddc45f" }, "nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" }, "nvim-lint": { "branch": "master", "commit": "bcd1a44edbea8cd473af7e7582d3f7ffc60d8e81" }, - "nvim-lspconfig": { "branch": "master", "commit": "0480b120318ec8bab27b530ffab6ee76a8c4d806" }, + "nvim-lspconfig": { "branch": "master", "commit": "f4e9d367d4e067d7a5fabc9fd3f1349b291eb718" }, "nvim-navic": { "branch": "master", "commit": "f5eba192f39b453675d115351808bd51276d9de5" }, "nvim-notify": { "branch": "master", "commit": "8701bece920b38ea289b457f902e2ad184131a5d" }, "nvim-spectre": { "branch": "master", "commit": "72f56f7585903cd7bf92c665351aa585e150af0f" }, "nvim-surround": { "branch": "main", "commit": "1098d7b3c34adcfa7feb3289ee434529abd4afd1" }, "nvim-tmux-navigation": { "branch": "main", "commit": "4898c98702954439233fdaf764c39636681e2861" }, - "nvim-treesitter": { "branch": "main", "commit": "70a9fecaf5aeae70c765d4c51a8038165a91aa06" }, + "nvim-treesitter": { "branch": "main", "commit": "9f2dad22ef8bb14fd1e0a3aa8859cdc88170668b" }, "nvim-treesitter-textobjects": { "branch": "main", "commit": "a0e182ae21fda68c59d1f36c9ed45600aef50311" }, "nvim-ts-context-commentstring": { "branch": "main", "commit": "1b212c2eee76d787bbea6aa5e92a2b534e7b4f8f" }, + "nvim-ufo": { "branch": "main", "commit": "ab3eb124062422d276fae49e0dd63b3ad1062cfc" }, "nvim-web-devicons": { "branch": "master", "commit": "746ffbb17975ebd6c40142362eee1b0249969c5c" }, "obsidian.nvim": { "branch": "main", "commit": "ae1f76a75c7ce36866e1d9342a8f6f5b9c2caf9b" }, "onedark-warm": { "branch": "master", "commit": "213c23ae45a04797572242568d5d51937181792d" }, "plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" }, "portal.nvim": { "branch": "main", "commit": "77d9d53fec945bfa407d5fd7120f1b4f117450ed" }, + "promise-async": { "branch": "main", "commit": "119e8961014c9bfaf1487bf3c2a393d254f337e2" }, "rainbow-delimiters.nvim": { "branch": "master", "commit": "d6b802552cbe7d643a3b6b31f419c248d1f1e220" }, "render-markdown.nvim": { "branch": "main", "commit": "48b4175dbca8439d30c1f52231cbe5a712c8f9d9" }, "rose-pine": { "branch": "main", "commit": "cf2a288696b03d0934da713d66c6d71557b5c997" }, @@ -62,9 +66,11 @@ "sonokai": { "branch": "master", "commit": "b023c5280b16fe2366f5e779d8d2756b3e5ee9c3" }, "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, "telescope.nvim": { "branch": "master", "commit": "ad7d9580338354ccc136e5b8f0aa4f880434dcdc" }, + "todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" }, + "toggleterm.nvim": { "branch": "main", "commit": "50ea089fc548917cc3cc16b46a8211833b9e3c7c" }, "tokyonight": { "branch": "main", "commit": "5da1b76e64daf4c5d410f06bcb6b9cb640da7dfd" }, "trouble.nvim": { "branch": "main", "commit": "bd67efe408d4816e25e8491cc5ad4088e708a69a" }, - "vimtex": { "branch": "master", "commit": "f707368022cdb851716be0d2970b90599c84a6a6" }, + "vimtex": { "branch": "master", "commit": "95b93a24740f7b89dd8331326b41bdd1337d79f6" }, "which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" }, - "yazi.nvim": { "branch": "main", "commit": "b3df5d00bbf5cd862b853993135598f12b2eb3b5" } + "yazi.nvim": { "branch": "main", "commit": "a3fe7b5855254974837c23c915865478b0d54534" } } diff --git a/nvim/.config/nvim/lua/plugins.inactive/completions_1.lua b/nvim/.config/nvim/lua/plugins.inactive/completions_1.lua new file mode 100644 index 0000000..cf35da7 --- /dev/null +++ b/nvim/.config/nvim/lua/plugins.inactive/completions_1.lua @@ -0,0 +1,65 @@ +-- completions.lua: Provides intelligent code completion via LSP or snippet engines. +-- completion.lua (nvim-cmp + LuaSnip) +return { + ------------------------------------------------------------------ + -- 1. Snippet engine & pre-made snippets + ------------------------------------------------------------------ + { + "L3MON4D3/LuaSnip", + version = "v2.*", + build = "make install_jsregexp", + dependencies = { "rafamadriz/friendly-snippets" }, + }, + ------------------------------------------------------------------ + -- 2. Core completion engine + standard sources + ------------------------------------------------------------------ + { + "hrsh7th/nvim-cmp", + dependencies = { + "hrsh7th/cmp-nvim-lsp", + "hrsh7th/cmp-buffer", + "hrsh7th/cmp-path", + "hrsh7th/cmp-cmdline", + "hrsh7th/cmp-nvim-lua", + "micangl/cmp-vimtex", + }, + ------------------------------------------------------------------ + -- 3. nvim-cmp setup + ------------------------------------------------------------------ + config = function() + local cmp = require("cmp") + require("luasnip.loaders.from_vscode").lazy_load() + cmp.setup({ + snippet = { + expand = function(args) + require("luasnip").lsp_expand(args.body) + end, + }, + window = { + completion = cmp.config.window.bordered(), + documentation = cmp.config.window.bordered(), + }, + mapping = cmp.mapping.preset.insert({ + [""] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }), + [""] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }), + [""] = cmp.mapping.confirm({ select = true }), + [""] = cmp.mapping.abort(), + [""] = cmp.mapping.scroll_docs(-4), + [""] = cmp.mapping.scroll_docs(4), + }), + sources = cmp.config.sources({ + { name = "vimtex" }, + { name = "nvim_lsp" }, + { name = "luasnip" }, + { name = "nvim_lua" }, + }, { + { name = "buffer" }, + { name = "path" }, + }), + }) + -- cmd-line completion + cmp.setup.cmdline({ "/", "?" }, { sources = { { name = "buffer" } } }) + cmp.setup.cmdline(":", { sources = cmp.config.sources({ { name = "path" } }, { { name = "cmdline" } }) }) + end, + }, +} diff --git a/nvim/.config/nvim/lua/plugins.inactive/dap.lua b/nvim/.config/nvim/lua/plugins.inactive/dap.lua new file mode 100644 index 0000000..3e438e3 --- /dev/null +++ b/nvim/.config/nvim/lua/plugins.inactive/dap.lua @@ -0,0 +1,92 @@ +-- lua/plugins/dap.lua +return { + { "mfussenegger/nvim-dap" }, -- core debugger client + { "rcarriga/nvim-dap-ui", dependencies = { "mfussenegger/nvim-dap" } }, + + -- Adapter bridge (Mason downloads the compiled server for us) + { + "mxsdev/nvim-dap-vscode-js", + dependencies = { "mfussenegger/nvim-dap" }, + config = function() + local mason_js = vim.fn.stdpath "data" + .. "/mason/packages/js-debug-adapter" -- Mason path + require("dap-vscode-js").setup { + node_path = "node", -- node binary + debugger_path = mason_js, -- root dir of js-debug + adapters = { "pwa-node","pwa-chrome","pwa-msedge","node-terminal" } + } + end + }, + + -- Ensure js-debug-adapter is present (Mason does the download) + { + "williamboman/mason.nvim", + cmd = { "Mason" }, + config = true, + }, + { + "williamboman/mason-lspconfig.nvim", -- pull Mason registry + opts = function(_, o) + o.ensure_installed = o.ensure_installed or {} + vim.list_extend(o.ensure_installed, { "js-debug-adapter" }) + end + }, + + -- Optional key-maps (adapt to your taste) + { + "mfussenegger/nvim-dap", + keys = { + { "", function() require("dap").continue() end, desc="Start / Continue" }, + { "", function() require("dap").toggle_breakpoint() end, desc="Toggle BP" }, + { "", function() require("dap").step_over() end, desc="Step over" }, + { "", function() require("dap").step_into() end, desc="Step into" }, + { "",function() require("dap").step_out() end, desc="Step out" }, + } + }, + + -- Debugger UI (optional) + { + "rcarriga/nvim-dap-ui", + opts = {}, + keys = { + { "du", function() require("dapui").toggle() end, desc="Dap-UI" }, + } + } +} + +-- ------------------------------------------------------------- +-- Launch / attach configurations +-- ------------------------------------------------------------- +local dap = require "dap" + +dap.configurations.javascript = { + -- 1. Run current file with node + { + name = "Launch Node file", + type = "pwa-node", + request = "launch", + program = "${file}", + cwd = "${workspaceFolder}", + stopOnEntry = false, + }, + -- 2. Attach to an existing node process (started with --inspect) + { + name = "Attach to node process", + type = "pwa-node", + request = "attach", + processId = require("dap.utils").pick_process + }, + -- 3. Launch Chrome and attach to page + { + name = "Launch Chrome & attach", + type = "pwa-chrome", + request = "launch", + url = "http://localhost:8080", + webRoot = "${workspaceFolder}", + userDataDir = false -- reuse your normal profile + } +} + +-- share same configs for TS +dap.configurations.typescript = dap.configurations.javascript +dap.configurations.typescriptreact = dap.configurations.javascript diff --git a/nvim/.config/nvim/lua/plugins.inactive/emmet.lua b/nvim/.config/nvim/lua/plugins.inactive/emmet.lua new file mode 100644 index 0000000..1e148ce --- /dev/null +++ b/nvim/.config/nvim/lua/plugins.inactive/emmet.lua @@ -0,0 +1,71 @@ +return { + "olimorris/emmet-ls", + ft = { + "html", + "htm", + "css", + "scss", + "sass", + "less", + "javascript", + "javascriptreact", + "typescript", + "typescriptreact", + "vue", + "svelte", + "php", + "xml", + "xsl", + }, + config = function() + -- Enable snippet support + local capabilities = vim.lsp.protocol.make_client_capabilities() + capabilities.textDocument.completion.completionItem.snippetSupport = true + + -- Set up emmet-ls using the new method + vim.api.nvim_create_autocmd("FileType", { + pattern = { + "html", + "htm", + "css", + "scss", + "sass", + "less", + "javascript", + "javascriptreact", + "typescript", + "typescriptreact", + "vue", + "svelte", + "php", + "xml", + "xsl", + }, + callback = function(args) + vim.lsp.start({ + name = "emmet-ls", + cmd = { "emmet-ls", "--stdio" }, + root_dir = vim.fs.dirname(vim.fs.find({ ".git" }, { upward = true })[1]), + capabilities = capabilities, + filetypes = { + "html", + "htm", + "css", + "scss", + "sass", + "less", + "javascript", + "javascriptreact", + "typescript", + "typescriptreact", + "vue", + "svelte", + "php", + "xml", + "xsl", + }, + }) + end, + }) + end, +} diff --git a/nvim/.config/nvim/lua/plugins.inactive/noice.lua b/nvim/.config/nvim/lua/plugins.inactive/noice.lua new file mode 100644 index 0000000..43c87e2 --- /dev/null +++ b/nvim/.config/nvim/lua/plugins.inactive/noice.lua @@ -0,0 +1,17 @@ +-- noice.lua: Replaces default UI messages with polished, keyboard-friendly notifications. + +return { -- lazy.nvim + { + "folke/noice.nvim", + event = "VeryLazy", + opts = {}, + dependencies = { + -- if you lazy-load any plugin below, make sure to add proper `module="..."` entries + "MunifTanjim/nui.nvim", + -- OPTIONAL: + -- `nvim-notify` is only needed, if you want to use the notification view. + -- If not available, we use `mini` as the fallback + "rcarriga/nvim-notify", + }, + }, +} diff --git a/nvim/.config/nvim/lua/plugins.inactive/ufo.lua b/nvim/.config/nvim/lua/plugins.inactive/ufo.lua index 3475e1f..dbc1805 100644 --- a/nvim/.config/nvim/lua/plugins.inactive/ufo.lua +++ b/nvim/.config/nvim/lua/plugins.inactive/ufo.lua @@ -1,3 +1,4 @@ +-- ~/.config/nvim/lua/plugins/nvim-ufo.lua return { "kevinhwang91/nvim-ufo", dependencies = "kevinhwang91/promise-async", @@ -26,13 +27,14 @@ return { }, }, config = function() - local ufo = require("ufo") - ufo.setup({ - provider_selector = function(bufnr, filetype, buftype) - -- prefer LSP, fall back to treesitter - return { "lsp", "treesitter" } + require("ufo").setup({ + provider_selector = function(_, filetype) + -- File-types that constantly throw UfoFallbackException → skip TS + local noisy = { "html", "css", "json", "yaml", "txt", "md" } + if vim.tbl_contains(noisy, filetype) then + return { "lsp", "indent" } -- 2 providers max → no warning + end end, - fold_virt_text_handler = ufo.handler, -- default virtual text }) end, } diff --git a/nvim/.config/nvim/lua/plugins.inactive/vimtex.lua b/nvim/.config/nvim/lua/plugins.inactive/vimtex.lua new file mode 100644 index 0000000..d4f95f1 --- /dev/null +++ b/nvim/.config/nvim/lua/plugins.inactive/vimtex.lua @@ -0,0 +1,88 @@ +-- vimtex.lua: Full LaTeX editing support (compiling, viewing, and syntax). + +return { + "lervag/vimtex", + ft = "tex", + config = function() + -- PDF viewer + vim.g.vimtex_view_method = "zathura" + + -- Compiler settings + vim.g.vimtex_compiler_latexmk = { + continuous = 1, + callback = 1, + options = { + "-pdf", + "-shell-escape", + "-verbose", + "-file-line-error", + "-synctex=1", + "-interaction=nonstopmode", + }, + } + -- Concealment (makes LaTeX prettier to read) + vim.g.vimtex_syntax_conceal = { + accents = 1, + math_symbols = 1, + math_fracs = 1, + math_super_sub = 1, + } + + vim.g.vimtex_toc_config = { + name = "TOC", + layers = { "content", "todo", "include" }, + split_width = 25, + todo_sorted = 0, + show_help = 1, + show_numbers = 1, + } + + -- Don't open quickfix window automatically + vim.g.vimtex_quickfix_mode = 0 + + -- kenable folding + vim.g.vimtex_fold_enabled = 1 + + -- What to fold (customize as needed) + vim.g.vimtex_fold_types = { + envs = { + enabled = 1, + whitelist = {}, -- Empty = all environments + blacklist = {}, + }, + sections = { + enabled = 1, + sections = { + "%(add)?part", + "%(chapter|%(sub)*section|%(sub)?paragraph)", + "appendix", + }, + }, + items = { + enabled = 0, -- Don't fold individual list items + }, + } + + -- Disable some features for better performance (optional) + vim.g.vimtex_indent_enabled = 1 + vim.g.vimtex_syntax_enabled = 1 + + vim.g.vimtex_syntax_conceal = { + accents = 1, + ligatures = 1, + cites = 1, + fancy = 1, + spacing = 1, + greek = 1, + math_bounds = 1, + math_delimiters = 1, + math_fracs = 1, + math_super_sub = 1, + math_symbols = 1, + sections = 0, + styles = 1, + } + + vim.opt.conceallevel = 2 + end, +} diff --git a/nvim/.config/nvim/lua/plugins/completions.lua b/nvim/.config/nvim/lua/plugins/completions.lua index 4da8884..e7647be 100644 --- a/nvim/.config/nvim/lua/plugins/completions.lua +++ b/nvim/.config/nvim/lua/plugins/completions.lua @@ -1,5 +1,6 @@ -- completions.lua: Provides intelligent code completion via LSP or snippet engines. -- completion.lua (nvim-cmp + LuaSnip) + return { ------------------------------------------------------------------ -- 1. Snippet engine & pre-made snippets @@ -9,8 +10,14 @@ return { version = "v2.*", build = "make install_jsregexp", dependencies = { "rafamadriz/friendly-snippets" }, + config = function() + require("luasnip.loaders.from_vscode").lazy_load() + require("luasnip.loaders.from_lua").load({ + paths = { vim.fn.stdpath("config") .. "/snippets" }, + }) + end, }, - ------------------------------------------------------------------ + -------------------------------------------------------------- -- 2. Core completion engine + standard sources ------------------------------------------------------------------ { @@ -21,43 +28,59 @@ return { "hrsh7th/cmp-path", "hrsh7th/cmp-cmdline", "hrsh7th/cmp-nvim-lua", + "micangl/cmp-vimtex", + "saadparwaiz1/cmp_luasnip", }, ------------------------------------------------------------------ -- 3. nvim-cmp setup ------------------------------------------------------------------ config = function() local cmp = require("cmp") - require("luasnip.loaders.from_vscode").lazy_load() + local luasnip = require("luasnip") + cmp.setup({ snippet = { expand = function(args) - require("luasnip").lsp_expand(args.body) + luasnip.lsp_expand(args.body) -- Correctly calls LuaSnip [3] end, }, - window = { - completion = cmp.config.window.bordered(), - documentation = cmp.config.window.bordered(), - }, mapping = cmp.mapping.preset.insert({ - [""] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }), - [""] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }), - [""] = cmp.mapping.confirm({ select = true }), - [""] = cmp.mapping.abort(), [""] = cmp.mapping.scroll_docs(-4), [""] = cmp.mapping.scroll_docs(4), + [""] = cmp.mapping.complete(), + [""] = cmp.mapping.confirm({ select = true }), + + -- Fix: Tab now handles expansion and jumping + [""] = cmp.mapping(function(fallback) + if cmp.visible() then + cmp.select_next_item() + elseif luasnip.expand_or_jumpable() then + luasnip.expand_or_jump() + else + fallback() + end + end, { "i", "s" }), + + [""] = cmp.mapping(function(fallback) + if cmp.visible() then + cmp.select_prev_item() + elseif luasnip.jumpable(-1) then + luasnip.jump(-1) + else + fallback() + end + end, { "i", "s" }), }), sources = cmp.config.sources({ - { name = "nvim_lsp" }, - { name = "luasnip" }, - { name = "nvim_lua" }, + { name = "luasnip", priority = 1000 }, -- Priority 2: Standard Snippets + { name = "nvim_lsp", priority = 750 }, -- Priority 1: LSP (Snippets) + { name = "vimtex", priority = 500 }, -- Priority 3: Vimtex (Text/Commands) + { name = "nvim_lua", priority = 250 }, }, { { name = "buffer" }, { name = "path" }, }), }) - -- cmd-line completion - cmp.setup.cmdline({ "/", "?" }, { sources = { { name = "buffer" } } }) - cmp.setup.cmdline(":", { sources = cmp.config.sources({ { name = "path" } }, { { name = "cmdline" } }) }) end, }, } diff --git a/nvim/.config/nvim/lua/plugins/dashboard.lua b/nvim/.config/nvim/lua/plugins/dashboard.lua index 88dd3f7..0a4cbb4 100644 --- a/nvim/.config/nvim/lua/plugins/dashboard.lua +++ b/nvim/.config/nvim/lua/plugins/dashboard.lua @@ -77,15 +77,15 @@ return { key_hl = "Number", action = "ObsidianQuickSwitch", }, - -- { - -- icon = " ", - -- icon_hl = "Title", - -- desc = "Projects (SPC fp) ", -- Note: shows keymap - -- desc_hl = "String", - -- key = "p", - -- key_hl = "Number", - -- action = "Telescope projections", -- Will lazy-load when pressed - -- }, + { + icon = " ", + icon_hl = "Title", + desc = "Projects (SPC fp) ", -- Note: shows keymap + desc_hl = "String", + key = "p", + key_hl = "Number", + action = "Telescope projections", -- Will lazy-load when pressed + }, { icon = " ", icon_hl = "Title", diff --git a/nvim/.config/nvim/lua/plugins/live-preview.lua b/nvim/.config/nvim/lua/plugins/live-preview.lua new file mode 100644 index 0000000..936c373 --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/live-preview.lua @@ -0,0 +1,26 @@ +-- ~/.config/nvim/lua/plugins/live-preview.lua +return { + "brianhuster/live-preview.nvim", + dev = false, + cmd = { "LivePreview", "LivePreviewStop" }, + keys = { + { "lp", "LivePreview", desc = "Start live HTML preview" }, + }, + config = function() + require("live-preview").setup({ + port = 3027, -- local server port + browser = "default", -- system browser + dynamic_root = true, -- serve from the project root + autokill = false, -- keep server alive when you leave nvim + }) + + -- (optional) auto-save on change so the browser refreshes + vim.o.autowriteall = true + vim.api.nvim_create_autocmd({ "InsertLeavePre", "TextChanged" }, { + pattern = "*.{html,htm,css,js,md}", + callback = function() + vim.cmd("silent! write") + end, + }) + end, +} diff --git a/nvim/.config/nvim/lua/plugins/lsp-config.lua b/nvim/.config/nvim/lua/plugins/lsp-config.lua index 1960493..a67c8f0 100644 --- a/nvim/.config/nvim/lua/plugins/lsp-config.lua +++ b/nvim/.config/nvim/lua/plugins/lsp-config.lua @@ -95,7 +95,7 @@ return { language = "en-US", enabled = { "latex", "tex", "bib", "markdown", "mail", "text" }, checkFrequency = "save", -- Only check when you save, not on every keystroke - diagnosticSeverity = "hint", -- Less intrusive + diagnosticSeverity = "warning", -- Less intrusive completionEnabled = true, additionalRules = { enablePickyRules = true, diff --git a/nvim/.config/nvim/lua/plugins/mason.lua b/nvim/.config/nvim/lua/plugins/mason.lua index 4462591..1fa8617 100644 --- a/nvim/.config/nvim/lua/plugins/mason.lua +++ b/nvim/.config/nvim/lua/plugins/mason.lua @@ -15,6 +15,7 @@ return { ensure_installed = { "lua_ls", "pyright", + "emmet_ls", "bashls", "ts_ls", "solargraph", diff --git a/nvim/.config/nvim/lua/plugins/noice.lua b/nvim/.config/nvim/lua/plugins/noice.lua index 56d06b9..e89173f 100644 --- a/nvim/.config/nvim/lua/plugins/noice.lua +++ b/nvim/.config/nvim/lua/plugins/noice.lua @@ -1,18 +1,32 @@ -- noice.lua: Replaces default UI messages with polished, keyboard-friendly notifications. -return { -- lazy.nvim +return { { "folke/noice.nvim", event = "VeryLazy", opts = { - -- add any options here + cmdline = { + view = "cmdline_popup", + opts = { border = { style = "rounded", padding = { 0, 1 } } }, + }, + messages = { + view = "notify", + view_opts = { border = { style = "rounded", padding = { 0, 1 } } }, + }, + popupmenu = { + backend = "nui", + nui = { border = { style = "rounded", padding = { 0, 1 } } }, + }, + lsp = { + hover = { opts = { border = { style = "rounded", padding = { 0, 1 } } } }, + signature = { opts = { border = { style = "rounded", padding = { 0, 1 } } } }, + }, + presets = { + lsp_doc_border = true, -- adds border to hover/signature automatically + }, }, dependencies = { - -- if you lazy-load any plugin below, make sure to add proper `module="..."` entries "MunifTanjim/nui.nvim", - -- OPTIONAL: - -- `nvim-notify` is only needed, if you want to use the notification view. - -- If not available, we use `mini` as the fallback "rcarriga/nvim-notify", }, }, diff --git a/nvim/.config/nvim/lua/plugins/obsidian.lua b/nvim/.config/nvim/lua/plugins/obsidian.lua index 83cbf8a..ee4e75d 100644 --- a/nvim/.config/nvim/lua/plugins/obsidian.lua +++ b/nvim/.config/nvim/lua/plugins/obsidian.lua @@ -12,8 +12,8 @@ return { opts = { workspaces = { { - name = "personal", - path = "/mnt/flash1/podman/nextcloud/config/obsidian/vaults/Phil/", + name = "liph", + path = "/mnt/flash1/podman/nextcloud/config/obsidian/vaults", }, }, diff --git a/nvim/.config/nvim/lua/plugins/todo-comments.lua b/nvim/.config/nvim/lua/plugins/todo-comments.lua new file mode 100644 index 0000000..c5d0b8d --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/todo-comments.lua @@ -0,0 +1,68 @@ +return { + "folke/todo-comments.nvim", + event = "VeryLazy", -- start only after UI is ready + dependencies = { "nvim-lua/plenary.nvim" }, + opts = { + signs = true, -- show icons in the sign column + sign_priority = 10, + keywords = { + FIX = { icon = " ", color = "error", alt = { "FIXME", "BUG", "FIXIT", "ISSUE" } }, + TODO = { icon = " ", color = "info", alt = { "todo" } }, + HACK = { icon = " ", color = "warning", alt = { "hack" } }, + WARN = { icon = " ", color = "warning", alt = { "WARNING", "XXX" } }, + PERF = { icon = " ", color = "#e6645a", alt = { "OPTIM", "PERFORMANCE", "OPTIMIZE" } }, + NOTE = { icon = " ", color = "hint", alt = { "INFO", "NOTE" } }, + TEST = { icon = "⏲ ", color = "test", alt = { "TESTING", "PASSED", "FAILED" } }, + }, + merge_keywords = true, -- merge with default list above + highlight = { + before = "", -- "fg" or "bg" or "" + keyword = "wide", -- "fg", "bg", "wide" or "" + after = "fg", -- "fg" or "bg" or "" + pattern = [[.*<(KEYWORDS)\s*:]], + comments_only = true, -- highlight only inside comments + max_line_len = 400, + exclude = {}, -- list of filetypes to exclude + }, + colors = { + error = { "DiagnosticError", "#e6645a" }, + warning = { "DiagnosticWarn", "#ff9e64" }, + info = { "DiagnosticInfo", "#7aa2f7" }, + hint = { "DiagnosticHint", "#9ece6a" }, + test = { "#d4ae5b" }, + }, + search = { + command = "rg", + args = { + "--color=never", + "--no-heading", + "--with-filename", + "--line-number", + "--column", + }, + pattern = [[\b(KEYWORDS):]], -- ripgrep regex + }, + }, + keys = { + -- navigation between todo-comments + { + "]t", + function() + require("todo-comments").jump_next() + end, + desc = "Next todo comment", + }, + { + "[t", + function() + require("todo-comments").jump_prev() + end, + desc = "Previous todo comment", + }, + -- telescope / fzf-lua live search + { "st", "TodoTelescope", desc = "Todo comments (Telescope)" }, + { "sT", "TodoFzfLua", desc = "Todo comments (FzfLua)" }, + -- Trouble.nvim integration + { "xt", "TodoTrouble", desc = "Todo comments (Trouble)" }, + }, +} diff --git a/nvim/.config/nvim/lua/plugins/toggleterm.lua b/nvim/.config/nvim/lua/plugins/toggleterm.lua new file mode 100644 index 0000000..5bc98eb --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/toggleterm.lua @@ -0,0 +1,59 @@ +return { + "akinsho/toggleterm.nvim", + version = "*", + cmd = { "ToggleTerm", "TermExec" }, + keys = { + -- normal terminal (horizontal split) + { "", "ToggleTerm direction=horizontal", desc = "Toggle horizontal terminal" }, + -- floating terminal + { "", "ToggleTerm direction=float", desc = "Toggle floating terminal" }, + -- vertical terminal + { "tv", "ToggleTerm direction=vertical size=60", desc = "Toggle vertical terminal" }, + }, + opts = { + size = function(term) + if term.direction == "horizontal" then + return 15 + elseif term.direction == "vertical" then + return vim.o.columns * 0.4 + end + end, + open_mapping = [[]], + shading_factor = 2, + direction = "horizontal", + float_opts = { + border = "rounded", + width = math.floor(vim.o.columns * 0.9), + height = math.floor(vim.o.lines * 0.9), + winblend = 0, + }, + highlights = { + FloatBorder = { link = "FloatBorder" }, + }, + persist_size = true, + persist_mode = true, + shell = vim.o.shell, + auto_scroll = true, + close_on_exit = true, + }, + config = function(_, opts) + require("toggleterm").setup(opts) + + -- send escape to leave terminal mode + vim.keymap.set("t", "", [[]]) + + -- quick access to lazygit (requires lazygit binary) + vim.keymap.set("n", "gg", function() + local Terminal = require("toggleterm.terminal").Terminal + local lazygit = Terminal:new({ + cmd = "lazygit", + direction = "float", + hidden = true, + on_open = function(t) + vim.api.nvim_buf_set_keymap(t.bufnr, "t", "", [[]], { noremap = true, silent = true }) + end, + }) + lazygit:toggle() + end, { desc = "LazyGit floating window" }) + end, +} diff --git a/nvim/.config/nvim/lua/plugins/ufo.lua b/nvim/.config/nvim/lua/plugins/ufo.lua new file mode 100644 index 0000000..736b8e6 --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/ufo.lua @@ -0,0 +1,61 @@ +return { + "kevinhwang91/nvim-ufo", + dependencies = "kevinhwang91/promise-async", + event = { "BufReadPost", "BufNewFile" }, + keys = { + { + "zR", + function() + require("ufo").openAllFolds() + end, + desc = "Ufo: open all folds", + }, + { + "zM", + function() + require("ufo").closeAllFolds() + end, + desc = "Ufo: close all folds", + }, + { + "zr", + function() + require("ufo").openFoldsExceptKinds() + end, + desc = "Ufo: open outer folds", + }, + + ------------------------------------------------------------------ + -- 1. Close everything *outside* the current fold hierarchy + ------------------------------------------------------------------ + { + "zX", + function() + require("ufo").closeAllFolds() -- close every fold + vim.cmd("normal! l") -- ONE right press + vim.cmd("normal! zo") -- open fold under cursor + vim.cmd("normal! zz") -- keep it centred + end, + desc = "Close folds outside current (+1 right)", + }, + ------------------------------------------------------------------ + -- 3. helpers you already had + ------------------------------------------------------------------ + { "zt", "za", desc = "Toggle fold under cursor" }, + }, + + config = function() + require("ufo").setup({ + foldlevel = 99, + foldlevelstart = 99, + provider_selector = function(_, ft) + -- Silence the fallback spam by skipping Treesitter for noisy types + local noisy = { "html", "css", "json", "yaml", "txt", "markdown", "zsh" } + if vim.tbl_contains(noisy, ft) then + return { "lsp", "indent" } -- max 2 providers + end + return { "lsp" } + end, + }) + end, +} diff --git a/nvim/.config/nvim/lua/plugins/vimtex.lua b/nvim/.config/nvim/lua/plugins/vimtex.lua index d4f95f1..601508b 100644 --- a/nvim/.config/nvim/lua/plugins/vimtex.lua +++ b/nvim/.config/nvim/lua/plugins/vimtex.lua @@ -6,7 +6,6 @@ return { config = function() -- PDF viewer vim.g.vimtex_view_method = "zathura" - -- Compiler settings vim.g.vimtex_compiler_latexmk = { continuous = 1, @@ -27,7 +26,6 @@ return { math_fracs = 1, math_super_sub = 1, } - vim.g.vimtex_toc_config = { name = "TOC", layers = { "content", "todo", "include" }, @@ -36,13 +34,10 @@ return { show_help = 1, show_numbers = 1, } - -- Don't open quickfix window automatically vim.g.vimtex_quickfix_mode = 0 - - -- kenable folding + -- Enable folding vim.g.vimtex_fold_enabled = 1 - -- What to fold (customize as needed) vim.g.vimtex_fold_types = { envs = { @@ -62,11 +57,11 @@ return { enabled = 0, -- Don't fold individual list items }, } - -- Disable some features for better performance (optional) vim.g.vimtex_indent_enabled = 1 vim.g.vimtex_syntax_enabled = 1 + -- Enhanced concealment settings - ADD THESE OPTIONS vim.g.vimtex_syntax_conceal = { accents = 1, ligatures = 1, @@ -83,6 +78,44 @@ return { styles = 1, } + -- Set conceal level (2 = moderate concealment) vim.opt.conceallevel = 2 + + -- KEYBINDS FOR UNFOLDING AND CONCEALMENT TOGGLE + vim.api.nvim_create_autocmd("FileType", { + pattern = "tex", + callback = function() + -- Toggle all folds open/close + vim.keymap.set("n", "fo", "zR", { buffer = true, desc = "Open all folds" }) + vim.keymap.set("n", "fc", "zM", { buffer = true, desc = "Close all folds" }) + + -- Toggle concealment (show/hide LaTeX commands) + vim.keymap.set("n", "tc", function() + if vim.opt.conceallevel:get() == 0 then + vim.opt.conceallevel = 2 + print("Concealment enabled") + else + vim.opt.conceallevel = 0 + print("Concealment disabled") + end + end, { buffer = true, desc = "Toggle concealment" }) + + -- Alternative: Quick toggle for specific vimtex concealment + vim.keymap.set("n", "tv", function() + if vim.g.vimtex_syntax_conceal_enabled == 1 then + vim.g.vimtex_syntax_conceal_enabled = 0 + print("VimTeX concealment disabled") + else + vim.g.vimtex_syntax_conceal_enabled = 1 + print("VimTeX concealment enabled") + end + end, { buffer = true, desc = "Toggle vimtex conceal" }) + end, + }) + + -- -- You can also add global keybinds if preferred + -- vim.keymap.set("n", "lt", "VimtexTocToggle", { desc = "LaTeX TOC" }) + -- vim.keymap.set("n", "lc", "VimtexCompile", { desc = "LaTeX compile" }) + -- vim.keymap.set("n", "lv", "VimtexView", { desc = "LaTeX view" }) end, } diff --git a/nvim/.config/nvim/lua/snippetse/tex.lua b/nvim/.config/nvim/lua/snippetse/tex.lua new file mode 100644 index 0000000..db2d2b0 --- /dev/null +++ b/nvim/.config/nvim/lua/snippetse/tex.lua @@ -0,0 +1,70 @@ +local ls = require("luasnip") +local s = ls.snippet +local t = ls.text_node +local i = ls.insert_node +local fmt = require("luasnip.extras.fmt").fmt + +ls.add_snippets("tex", { + + -- \beg → full figure environment + s( + "beg", + fmt( + [[ +\begin{{{}}}{} +{} +\end{{{}}}]], + { + i(1, "environment"), + i(2, ""), + i(3, ""), + -- mirror node 1 so \end matches \begin automatically + require("luasnip.extras").rep(1), + } + ) + ), + + -- fig → full figure block + s( + "fig", + fmt( + [[ +\begin{{figure}}[htbp] + \centering + \includegraphics[width={}]{{{}} + \caption{{{}}} + \label{{fig:{}}} +\end{{figure}}]], + { + i(1, "0.8\\textwidth"), + i(2, "file"), + i(3, "caption"), + i(4, "label"), + } + ) + ), + + -- eq → equation + s( + "eq", + fmt( + [[ +\begin{{equation}} + {} +\end{{equation}}]], + { i(1, "") } + ) + ), + + -- ali → align + s( + "ali", + fmt( + [[ +\begin{{align}} + {} &= {} \\ +\end{{align}}]], + { i(1, ""), i(2, "") } + ) + ), +}) diff --git a/nvim/.config/nvim/lua/vim-options.lua b/nvim/.config/nvim/lua/vim-options.lua index a8c43c3..7fbee1d 100644 --- a/nvim/.config/nvim/lua/vim-options.lua +++ b/nvim/.config/nvim/lua/vim-options.lua @@ -17,6 +17,32 @@ vim.keymap.set("n", "", ":wincmd l") vim.keymap.set("n", "h", ":nohlsearch") vim.wo.number = true --- In your keybindings file -vim.keymap.set("n", "lc", ":!pdflatex %", { desc = "Compile LaTeX" }) -vim.keymap.set("n", "lv", ":!zathura %:r.pdf &", { desc = "View PDF" }) +-- latex pdf compile and live preview +-- vimtex already provides these — just map them to your preferred keys +vim.keymap.set("n", "lc", "VimtexCompile", { desc = "Compile LaTeX (toggle)" }) +vim.keymap.set("n", "lv", "VimtexView", { desc = "View PDF in Zathura" }) +vim.keymap.set("n", "le", "VimtexErrors", { desc = "Show errors" }) +vim.keymap.set("n", "lk", "VimtexStop", { desc = "Stop compiler" }) +vim.keymap.set("n", "lK", "VimtexStopAll", { desc = "Stop all compilers" }) +vim.keymap.set("n", "lx", "VimtexClean", { desc = "Clean aux files" }) +vim.keymap.set("n", "lt", "VimtexTocToggle", { desc = "Toggle TOC" }) +-- vim.keymap.set("n", "lc", ":!pdflatex %", { desc = "Compile LaTeX" }) +-- vim.keymap.set("n", "lv", ":!zathura %:r.pdf &", { desc = "View PDF" }) +-- vim.g.vimtex_fold_enabled = 1 +-- vim.g.vimtex_fold_types = { +-- sections = { +-- parse_levels = 1, +-- sections = { "section", "subsection", "subsubsection" }, +-- }, +-- envs = { +-- blacklist = { "document" }, +-- }, +-- } +-- -- vimtex knows these environment names and will expand them fully +-- vim.g.vimtex_complete_enabled = 1 +-- vim.g.vimtex_complete_close_braces = 1 + +vim.o.foldcolumn = "1" -- small gutter with +/- signs +vim.o.foldlevel = 99 -- start with all folds open +vim.o.foldlevelstart = 99 +vim.o.foldtext = "" -- use default line diff --git a/scripts/scripts/a.out b/scripts/scripts/a.out new file mode 100644 index 0000000..e69de29 diff --git a/scripts/scripts/email2vcf.sh b/scripts/scripts/email2vcf.sh new file mode 100755 index 0000000..70cf6a9 --- /dev/null +++ b/scripts/scripts/email2vcf.sh @@ -0,0 +1,5 @@ +# Convert your aerc/maildir to vCards +em2vcf /mnt/flash1/mail-server/mail/maildir/ \ + --output-folder ~/.contacts_mail/ \ + --no-duplicates \ + --overwrite diff --git a/scripts/scripts/maildir2vcf.sh b/scripts/scripts/maildir2vcf.sh new file mode 100755 index 0000000..aee5094 --- /dev/null +++ b/scripts/scripts/maildir2vcf.sh @@ -0,0 +1,43 @@ +#!/usr/bin/env python3 +# ~/.local/bin/maildir2vcf +import email, os, sys, pathlib, fileinput + +MAILDIR = pathlib.Path.home()/ "Mail" # ← change if your mail sits elsewhere +OUTDIR = pathlib.Path.home()/ ".contacts_mail" +OUTDIR.mkdir(exist_ok=True) + +seen = set() # de-duplicate on lower-case e-mail + +def vcard(name, mail): + safe_name = name.replace(";", " ").strip() or "No Name" + safe_mail = mail.strip().lower() + if safe_mail in seen: # already exported + return + seen.add(safe_mail) + fn = OUTDIR/f"{safe_mail}.vcf" + fn.write_text(f"""\ +BEGIN:VCARD +VERSION:3.0 +FN:{safe_name} +EMAIL:{safe_mail} +END:VCARD +""") + +def addresses_from_msg(path): + with open(path, "rb") as f: + msg = email.message_from_binary_file(f) + for hdr in ("From", "To", "Cc", "Bcc"): + for addr in email.utils.getaddresses(msg.get_all(hdr, [])): + name, mail = addr + if "@" in mail: + vcard(name, mail) + +# walk cur/ + new/ (typical Maildir layout) +for sub in ("cur", "new"): + for root, _, files in os.walk(MAILDIR/sub): + for file in files: + if file.startswith("."): + continue + addresses_from_msg(pathlib.Path(root)/file) + +print("Exported", len(seen), "unique addresses →", OUTDIR) diff --git a/scripts/scripts/newfile.vcf b/scripts/scripts/newfile.vcf new file mode 100644 index 0000000..e69de29 diff --git a/yazi/.config/yazi/flavors/dracula.yazi b/yazi/.config/yazi/flavors/dracula.yazi deleted file mode 160000 index 1b1a8d1..0000000 --- a/yazi/.config/yazi/flavors/dracula.yazi +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 1b1a8d1083474defa9e4c1c3de4db9576f23175f diff --git a/yazi/.config/yazi/flavors/rose-pine-moon.yazi/LICENSE b/yazi/.config/yazi/flavors/rose-pine-moon.yazi/LICENSE new file mode 100644 index 0000000..78e74c8 --- /dev/null +++ b/yazi/.config/yazi/flavors/rose-pine-moon.yazi/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2025 Mintass + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/yazi/.config/yazi/flavors/rose-pine-moon.yazi/LICENSE-tmtheme b/yazi/.config/yazi/flavors/rose-pine-moon.yazi/LICENSE-tmtheme new file mode 100644 index 0000000..ef13b56 --- /dev/null +++ b/yazi/.config/yazi/flavors/rose-pine-moon.yazi/LICENSE-tmtheme @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 Rosé Pine + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/yazi/.config/yazi/flavors/rose-pine-moon.yazi/README.md b/yazi/.config/yazi/flavors/rose-pine-moon.yazi/README.md new file mode 100644 index 0000000..b241c25 --- /dev/null +++ b/yazi/.config/yazi/flavors/rose-pine-moon.yazi/README.md @@ -0,0 +1,36 @@ +
+ Yazi logo +
+ +

+ Rosé Pine Moon Flavor for Yazi +

+ +## 👀 Preview + + + +## 🎨 Installation + +```sh +ya pkg add Mintass/rose-pine-moon +``` + +## ⚙️ Usage + +To set it as your dark flavor, change the content of your `theme.toml` to: + +```toml +[flavor] +dark = "rose-pine-moon" +``` + +Make sure your `theme.toml` doesn't contain anything other than `[flavor]`, unless you want to override certain styles of this flavor. + +See the [Yazi flavor documentation](https://yazi-rs.github.io/docs/flavors/overview) for more details. + +## 📜 License + +The flavor is MIT-licensed, and the included tmTheme is also MIT-licensed. + +Check the [LICENSE](LICENSE) and [LICENSE-tmtheme](LICENSE-tmtheme) file for more details. diff --git a/yazi/.config/yazi/flavors/rose-pine-moon.yazi/flavor.toml b/yazi/.config/yazi/flavors/rose-pine-moon.yazi/flavor.toml new file mode 100644 index 0000000..67fb881 --- /dev/null +++ b/yazi/.config/yazi/flavors/rose-pine-moon.yazi/flavor.toml @@ -0,0 +1,253 @@ +# vim:fileencoding=utf-8:foldmethod=marker + +# : App {{{ + +[app] +overall = { bg = "#232136" } + +# : }}} + + +# : Manager {{{ + +[mgr] +cwd = { fg = "#9ccfd8" } + +# Find +find_keyword = { fg = "#f6c177", bold = true, italic = true, underline = true } +find_position = { fg = "#c4a7e7", bg = "reset", bold = true, italic = true } + +# Symlink +symlink_target = { italic = true } + +# Marker +marker_copied = { fg = "#3e8fb0", bg = "#3e8fb0" } +marker_cut = { fg = "#eb6f92", bg = "#eb6f92" } +marker_marked = { fg = "#ea9a97", bg = "#ea9a97" } +marker_selected = { fg = "#f6c177", bg = "#f6c177" } + +# Count +count_copied = { fg = "#e0def4", bg = "#3e8fb0" } +count_cut = { fg = "#e0def4", bg = "#eb6f92" } +count_selected = { fg = "#232136", bg = "#f6c177" } + +# Border +border_symbol = "│" +border_style = { fg = "#56526e" } + +# Highlighting +syntect_theme = "" + +# : }}} + + +# : Tabs {{{ + +[tabs] +active = { fg = "#e0def4", bg = "#3e8fb0", bold = true } +inactive = { fg = "#3e8fb0", bg = "#e0def4" } + +# Separator +sep_inner = { open = "", close = "" } +sep_outer = { open = "", close = "" } + +# : }}} + + +# : Mode {{{ + +[mode] +normal_main = { fg = "#232136", bg = "#9ccfd8", bold = true } +normal_alt = { fg = "#232136", bg = "#e0def4", bold = true } + +# Select mode +select_main = { fg = "#232136", bg = "#eb6f92", bold = true } +select_alt = { fg = "#232136", bg = "#e0def4", bold = true } + +# Unset mode +unset_main = { fg = "#232136", bg = "#eb6f92", bold = true } +unset_alt = { fg = "#232136", bg = "#e0def4", bold = true } + +# : }}} + + +# : Indicator of hovered file {{{ + +[indicator] +parent = { reversed = true } +current = { reversed = true } +preview = { underline = true } +padding = { open = "", close = "" } + +# : }}} + + +# : Status bar {{{ + +[status] +overall = { bg = "#232136" } +sep_left = { open = "", close = "" } +sep_right = { open = "", close = "" } + +# Permissions +perm_sep = { fg = "#6e6a86" } +perm_type = { fg = "#c4a7e7" } +perm_read = { fg = "#f6c177" } +perm_write = { fg = "#eb6f92" } +perm_exec = { fg = "#9ccfd8" } + +# Progress +progress_label = { fg = "#e0def4", bold = true } +progress_normal = { fg = "#3e8fb0", bg = "#2a283e" } +progress_error = { fg = "#eb6f92", bg = "#2a283e" } + +# : }}} + + +# : Which {{{ + +[which] +cols = 3 +mask = { bg = "#2a273f" } +cand = { fg = "#9ccfd8" } +rest = { fg = "#6e6a86" } +desc = { fg = "#f6c177" } +separator = "  " +separator_style = { fg = "#6e6a86" } + +# : }}} + + +# : Confirmation {{{ + +[confirm] +border = { fg = "#56526e" } +title = { fg = "#eb6f92", bold = true } +body = { fg = "#e0def4" } +list = { fg = "#e0def4" } +btn_yes = { fg = "#232136", bg = "#3e8fb0", bold = true } +btn_no = { fg = "#232136", bg = "#e0def4", bold = true } +btn_labels = [ " [y]es ", " (n)o " ] + +# : }}} + + +# : Spotter {{{ + +[spot] +border = { fg = "#56526e" } +title = { fg = "#9ccfd8", bold = true } + +# Table +tbl_col = { fg = "#9ccfd8" } +tbl_cell = { fg = "#232136", bg = "#f6c177", bold = true } + +# : }}} + + +# : Notification {{{ + +[notify] +title_info = { fg = "#3e8fb0" } +title_warn = { fg = "#f6c177" } +title_error = { fg = "#eb6f92" } + +# Icons +icon_info = "" +icon_warn = "" +icon_error = "" + +# : }}} + + +# : Picker {{{ + +[pick] +border = { fg = "#3e8fb0" } +active = { fg = "#c4a7e7", bold = true } +inactive = { fg = "#908caa" } + +# : }}} + + +# : Input {{{ + +[input] +border = { fg = "#3e8fb0" } +title = { bold = true } +value = { fg = "#e0def4" } +selected = { reversed = true } + +# : }}} + + +# : Completion {{{ + +[cmp] +border = { fg = "#3e8fb0" } +active = { bg = "#e0def4", fg = "#232136", bold = true } +inactive = { fg = "#908caa" } + +# Icons +icon_file = "" +icon_folder = "" +icon_command = "" + +# : }}} + + +# : Task manager {{{ + +[tasks] +border = { fg = "#3e8fb0" } +title = { bold = true } +hovered = { fg = "#c4a7e7", bold = true, reversed = true } + +# : }}} + + +# : Help menu {{{ + +[help] +on = { fg = "#9ccfd8" } +run = { fg = "#c4a7e7" } +desc = { fg = "#f6c177" } +hovered = { reversed = true, bold = true } +footer = { fg = "#232136", bg = "#e0def4" } + +# : }}} + + +# : File-specific styles {{{ + +[filetype] +rules = [ + # Images + { mime = "image/*", fg = "#c4a7e7" }, + + # Media + { mime = "{audio,video}/*", fg = "#f6c177" }, + + # Archives + { mime = "application/{zip,rar,7z*,tar,gzip,xz,zstd,bzip*,lzma,compress,archive,cpio,arj,xar,ms-cab*}", fg = "#eb6f92" }, + + # Documents + { mime = "application/{pdf,doc,rtf}", fg = "#ea9a97" }, + + # Empty files + # { mime = "inode/empty", fg = "#eb6f92" }, + + # Special files + { url = "*", is = "orphan", fg = "#232136", bg = "#eb6f92" }, + { url = "*", is = "exec", fg = "#9ccfd8" }, + + # Dummy files + { url = "*", is = "dummy", fg = "#232136", bg = "#eb6f92" }, + { url = "*/", is = "dummy", fg = "#232136", bg = "#eb6f92" }, + + # Fallback + { url = "*", fg = "#e0def4" }, + { url = "*/", fg = "#3e8fb0" } +] + +# : }}} diff --git a/yazi/.config/yazi/flavors/rose-pine-moon.yazi/preview.png b/yazi/.config/yazi/flavors/rose-pine-moon.yazi/preview.png new file mode 100644 index 0000000..9661964 Binary files /dev/null and b/yazi/.config/yazi/flavors/rose-pine-moon.yazi/preview.png differ diff --git a/yazi/.config/yazi/flavors/rose-pine-moon.yazi/tmtheme.xml b/yazi/.config/yazi/flavors/rose-pine-moon.yazi/tmtheme.xml new file mode 100644 index 0000000..3e26d9c --- /dev/null +++ b/yazi/.config/yazi/flavors/rose-pine-moon.yazi/tmtheme.xml @@ -0,0 +1,316 @@ + + + + + name + Rosé Pine Moon + settings + + + settings + + background + #232136 + caret + #56526e + foreground + #e0def4 + invisibles + #2a273f + lineHighlight + #2a283e + selection + #6e6a86 + + + + name + Comment + scope + comment + settings + + fontStyle + italic + foreground + #908caa + + + + name + String + scope + string, punctuation.definition.string + settings + + foreground + #f6c177 + + + + name + Number + scope + constant.numeric + settings + + foreground + #f6c177 + + + + name + Built-in constant + scope + constant.language + settings + + fontStyle + bold + foreground + #f6c177 + + + + name + User-defined constant + scope + constant.character, constant.other + settings + + foreground + #f6c177 + + + + name + Variable + scope + variable + settings + + fontStyle + italic + foreground + #e0def4 + + + + name + Keyword + scope + keyword + settings + + foreground + #3e8fb0 + + + + name + Storage + scope + storage + settings + + fontStyle + + foreground + #9ccfd8 + + + + name + Storage type + scope + storage.type + settings + + fontStyle + + foreground + #9ccfd8 + + + + name + Class name + scope + entity.name.class + settings + + fontStyle + bold + foreground + #3e8fb0 + + + + name + Inherited class + scope + entity.other.inherited-class + settings + + fontStyle + italic + foreground + #3e8fb0 + + + + name + Function name + scope + entity.name.function + settings + + fontStyle + italic + foreground + #ea9a97 + + + + name + Function argument + scope + variable.parameter + settings + + fontStyle + + foreground + #c4a7e7 + + + + name + Tag name + scope + entity.name.tag + settings + + fontStyle + bold + foreground + #3e8fb0 + + + + name + Tag attribute + scope + entity.other.attribute-name + settings + + fontStyle + + foreground + #c4a7e7 + + + + name + Library function + scope + support.function + settings + + fontStyle + bold + foreground + #ea9a97 + + + + name + Library constant + scope + support.constant + settings + + fontStyle + bold + foreground + #f6c177 + + + + name + Library class/type + scope + support.type, support.class + settings + + fontStyle + bold + foreground + #9ccfd8 + + + + name + Library variable + scope + support.other.variable + settings + + fontStyle + bold + foreground + #eb6f92 + + + + name + Invalid + scope + invalid + settings + + background + #eb6f92 + fontStyle + + foreground + #e0def4 + + + + name + Invalid deprecated + scope + invalid.deprecated + settings + + background + #c4a7e7 + foreground + #e0def4 + + + + name + Punctuation, Operators + scope + punctuation, keyword.operator + settings + + foreground + #908caa + + + + colorSpaceName + sRGB + semanticClass + theme.dark.rosé-pine-moon + author + arrrgi + comment + All natural pine, faux fur and a bit of soho vibes for the classy minimalist + uuid + CC28B8FB-96BA-43EB-B71F-5AA3D3EBB0BB + + diff --git a/yazi/.config/yazi/init.lua b/yazi/.config/yazi/init.lua index 6b5b94f..64398eb 100644 --- a/yazi/.config/yazi/init.lua +++ b/yazi/.config/yazi/init.lua @@ -93,7 +93,7 @@ require("recycle-bin"):setup({ trash_dir = "~/.local/share/Trash/", }) --- require("omp"):setup({ config = "/home/liph/.config/yazi/omp/omp.toml" }) +require("omp"):setup({ config = "/home/liph/.config/yazi/omp/omp.toml" }) require("mime-ext"):setup({ -- with_files = { diff --git a/yazi/.config/yazi/omp/omp.toml b/yazi/.config/yazi/omp/omp.toml index d985a71..e11f934 100644 --- a/yazi/.config/yazi/omp/omp.toml +++ b/yazi/.config/yazi/omp/omp.toml @@ -3,12 +3,12 @@ pwd = "osc7" version = 3 [palette] -gb_bright_path = "#89b4fa" -gb_bright_git = "#f9e2af" -gb_dark0_hard = "#1d2021" +gb_bright_path = "#9ccdf8" +gb_bright_git = "#f6c177" +gb_dark0_hard = "#3e7fb0" gb_faded_green = "#79740e" -gb_faded_red = "#9d0006" -gb_text = "#ebdbb2" +gb_faded_red = "#ea9a97" +gb_text = "#c4a7e7" [var] user = "" @@ -19,12 +19,19 @@ ssh = "🌐" type = "prompt" alignment = "left" -# [[blocks.segments]] -# template = "{{ if .Root }}# {{ else }}{{ end }}{{ .UserName }}{{ if .SSHSession }} {{.Var.ssh}}{{ end }} " -# foreground = "p:gb_text" -# background = "transparent" -# type = "session" -# style = "plain" +[[blocks.segments]] +template = '{{ .HostName }} ' +foreground = 'p:gb_text' +background = 'transparent' +type = 'text' +style = 'plain' + +[[blocks.segments]] +template = '{{ .UserName }} ' +foreground = 'p:gb_text' +background = 'transparent' +type = 'text' +style = 'plain' # [blocks.segments.properties] # cache_duration = "none" @@ -41,7 +48,7 @@ style = "full" enable_hyperlink = true [[blocks.segments]] -template = "{{ .HEAD }}{{ if .Working.Changed }} {{ .Working.String }}{{ end }}{{ if .Staging.Changed }} {{ .Staging.String }}{{ end }} " +template = ' {{ .HEAD }}{{ if or (.Working.Changed) (.Staging.Changed) }}*{{ end }} {{ if gt .Behind 0 }}⇣{{ end }}{{ if gt .Ahead 0 }}⇡{{ end }}' foreground = "p:gb_bright_git" background = "transparent" type = "git" diff --git a/yazi/.config/yazi/package.toml b/yazi/.config/yazi/package.toml index a85ea63..10d1fe3 100644 --- a/yazi/.config/yazi/package.toml +++ b/yazi/.config/yazi/package.toml @@ -137,3 +137,8 @@ hash = "5cfd9b2bd3f8ec4e3245e3426a967f82" use = "yazi-rs/flavors:catppuccin-mocha" rev = "4a1802a" hash = "b951d27afe197d154f6da9683b46c5f8" + +[[flavor.deps]] +use = "Mintass/rose-pine-moon" +rev = "94385fe" +hash = "edbe0dfb5db8ff37281dba62adc7e750" diff --git a/yazi/.config/yazi/tags/home/liph/programming/webdev/html/static/tags.json b/yazi/.config/yazi/tags/home/liph/programming/webdev/html/static/tags.json new file mode 100644 index 0000000..c97a87a --- /dev/null +++ b/yazi/.config/yazi/tags/home/liph/programming/webdev/html/static/tags.json @@ -0,0 +1 @@ +{"\\x73\\x74\\x79\\x6C\\x65\\x73\\x2E\\x63\\x73\\x73":["\\x31"]} \ No newline at end of file diff --git a/yazi/.config/yazi/themes/rose.toml b/yazi/.config/yazi/themes/rose.toml index 6677c0e..4f3436f 100644 --- a/yazi/.config/yazi/themes/rose.toml +++ b/yazi/.config/yazi/themes/rose.toml @@ -1,72 +1,4 @@ -# Gruvbox Material Dark theme for Yazi -# Based on https://github.com/sainnhe/gruvbox-material - -[manager] -cwd = { fg = "#d8a657" } # yellow - -# Hovered -hovered = { fg = "#282828", bg = "#a9b665" } # green background -preview_hovered = { underline = true } - -# Find -find_keyword = { fg = "#282828", bg = "#d8a657" } # yellow -find_position = { fg = "#282828", bg = "#7daea3" } # aqua - -# Marker -marker_copied = { fg = "#a9b665", bg = "#a9b665" } # green -marker_cut = { fg = "#ea6962", bg = "#ea6962" } # red -marker_marked = { fg = "#7daea3", bg = "#7daea3" } # aqua -marker_selected = { fg = "#d8a657", bg = "#d8a657" } # yellow - -# Tab -tab_active = { fg = "#282828", bg = "#a9b665" } # green -tab_inactive = { fg = "#d4be98", bg = "#3c3836" } # fg on bg1 -tab_width = 1 - -# Count -count_copied = { fg = "#282828", bg = "#a9b665" } # green -count_cut = { fg = "#282828", bg = "#ea6962" } # red -count_selected = { fg = "#282828", bg = "#7daea3" } # aqua - -# Border -border_symbol = "│" -border_style = { fg = "#504945" } # bg2 - -# Syntect theme for preview -syntect_theme = "~/.config/yazi/Gruvbox-Material-Dark.tmTheme" - -[status] -separator_open = "" -separator_close = "" -separator_style = { fg = "#504945", bg = "#504945" } # bg2 - -# Mode -mode_normal = { fg = "#282828", bg = "#7daea3", bold = true } # aqua -mode_select = { fg = "#282828", bg = "#d8a657", bold = true } # yellow -mode_unset = { fg = "#282828", bg = "#ea6962", bold = true } # red - -# Progress -progress_label = { fg = "#d4be98", bold = true } # fg -progress_normal = { fg = "#7daea3", bg = "#3c3836" } # aqua on bg1 -progress_error = { fg = "#ea6962", bg = "#3c3836" } # red on bg1 - -# Permissions -permissions_t = { fg = "#a9b665" } # green -permissions_r = { fg = "#d8a657" } # yellow -permissions_w = { fg = "#ea6962" } # red -permissions_x = { fg = "#7daea3" } # aqua -permissions_s = { fg = "#504945" } # bg2 - -[input] -border = { fg = "#7daea3" } # aqua -title = { fg = "#d4be98" } # fg -value = { fg = "#d4be98" } # fg -selected = { reversed = true } - -[select] -border = { fg = "#7daea3" } # aqua -active = { fg = "#d8a657" } # yellow -inactive = { fg = "#7c6f64" } # bg3 - -[completion] -border = { fg = "#7daea3" } # aqua +[flavor] +dark = "rose-pine-moon" +# or "rose-pine-moon" +# or light = "rose-pine-dawn" diff --git a/zshrc/.aliases.zsh b/zshrc/.aliases.zsh index 761c265..522799d 100644 --- a/zshrc/.aliases.zsh +++ b/zshrc/.aliases.zsh @@ -108,8 +108,7 @@ alias lsm='sudo mount /dev/' alias lsu='sudo umount /mount/' # streamrip -alias ripp='cd ~/streamrip/ && rip search tidal album' -alias rip='pyenv exec rip' +alias ripp='rip search tidal album' alias ripc='nvim ~/.config/streamrip/config.toml' # paru diff --git a/zshrc/.export.zsh b/zshrc/.export.zsh index d5cbab3..c11c1b0 100644 --- a/zshrc/.export.zsh +++ b/zshrc/.export.zsh @@ -1,3 +1,5 @@ +# java jdk adaption +export JDK_TOOL_OPTIONS="-Djdk.xml.totalEntitySizeLimit=0" # FZF export FZF_CTRL_T_OPTS="--preview 'bat -n --color=always --line-range :500 {}'" export FZF_ALT_C_OPTS="--preview 'eza --tree --color=always {} | head -200'"