diff --git a/.github/workflows/scaner.yml b/.github/workflows/scaner.yml index b91b3e3..3fe50e5 100644 --- a/.github/workflows/scaner.yml +++ b/.github/workflows/scaner.yml @@ -1,3 +1,5 @@ +name: TruffleHog OSS + on: push: branches: diff --git a/.p10k.zsh b/.p10k.zsh index 77d1313..9839390 100644 --- a/.p10k.zsh +++ b/.p10k.zsh @@ -50,7 +50,7 @@ # direnv # direnv status (https://direnv.net/) # asdf # asdf version manager (https://github.com/asdf-vm/asdf) virtualenv # python virtual environment (https://docs.python.org/3/library/venv.html) - anaconda # conda environment (https://conda.io/) +# anaconda # conda environment (https://conda.io/) pyenv # python environment (https://github.com/pyenv/pyenv) # goenv # go environment (https://github.com/syndbg/goenv) # nodenv # node.js version from nodenv (https://github.com/nodenv/nodenv) diff --git a/.zshrc b/.zshrc index 8995a1b..bc6995a 100644 --- a/.zshrc +++ b/.zshrc @@ -34,6 +34,7 @@ alias zz='bash $HOME/scripts/virtuals.sh' alias docker-compose='docker compose' alias ranger='source ranger' alias dps='docker container ls --format "table {{.ID}}\t{{.Names}}\t{{.Ports}}" -a' +alias sr='source .venv/bin/activate' ### Plugins ### plugins=(git zsh-autosuggestions python virtualenv fzf) diff --git a/hypr/hyprland.conf b/hypr/hyprland.conf index 3dce2fc..06aaff1 100644 --- a/hypr/hyprland.conf +++ b/hypr/hyprland.conf @@ -223,6 +223,7 @@ windowrulev2 = workspace 3,class:^(nemo)$ windowrulev2 = workspace 7,class:^(net.thunderbird.Thunderbird)$ windowrulev2 = workspace 5,class:^(obsidian)$ windowrulev2 = workspace 5,class:^(discord)$ +windowrulev2 = workspace 6,class:^(Agemo)$ windowrulev2 = workspace 4,title:^(VSCodium)$ windowrulev2 = workspace 4,class:^(jetbrains-idea-ce)$ windowrulev2 = workspace 8,title:^(Jellyfin Media Player)$ diff --git a/nvim/init.lua b/nvim/init.lua index d77120b..29cce93 100644 --- a/nvim/init.lua +++ b/nvim/init.lua @@ -14,6 +14,7 @@ require('coderun') require('pluginSettings') require('lspConfig') + --############ -- # Autorun # -- ########### @@ -26,7 +27,29 @@ vim.api.nvim_create_autocmd("BufWritePre", { end, }) +-- treat qss as css +-- +vim.api.nvim_create_autocmd({"BufNewFile", "BufRead"}, { + pattern = "*.qss", + command = "set filetype=css" +}) +--############ +--# setup # +--########### + + +-- telescope +require("telescope").setup { + extensions = { + ["ui-select"] = { + require("telescope.themes").get_dropdown { + }, + }, + }, +} + +require("telescope").load_extension("ui-select") -- ''''''''''Splash'''''''''''''''''''''''''''''''''''''''''''''''''''' @@ -41,12 +64,12 @@ require'colorizer'.setup() vim.api.nvim_exec([[ augroup ColorizerAttach autocmd! -autocmd BufRead,BufNewFile *.config,*.rasi,*.conf :ColorizerAttachToBuffer +autocmd BufRead,BufNewFile *.config,*.rasi,*.conf,*.qss,*.css :ColorizerAttachToBuffer augroup END ]], false) --'''''''''''''' Theme '''''''''''''''''''''''''''''''''''''''''''''''' -function force_backgraund(color) +local function force_backgraund(color) color = color or "catppuccin-mocha" vim.cmd.colorscheme(color) diff --git a/nvim/lazy-lock.json b/nvim/lazy-lock.json index a0ed9cd..de38baa 100644 --- a/nvim/lazy-lock.json +++ b/nvim/lazy-lock.json @@ -1,8 +1,8 @@ { - "LuaSnip": { "branch": "master", "commit": "5271933f7cea9f6b1c7de953379469010ed4553a" }, + "LuaSnip": { "branch": "master", "commit": "fb525166ccc30296fb3457441eb979113de46b00" }, "barbar.nvim": { "branch": "master", "commit": "3a74402bdf04745a762de83d5c5e88e3e9b0e2e0" }, "buffer-vacuum": { "branch": "main", "commit": "9ec0ea4ee93bb1faa0419d6890daf9e45c436ea6" }, - "catppuccin": { "branch": "main", "commit": "a0c769bc7cd04bbbf258b3d5f01e2bdce744108d" }, + "catppuccin": { "branch": "main", "commit": "fa42eb5e26819ef58884257d5ae95dd0552b9a66" }, "cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" }, "cmp-nvim-lsp": { "branch": "main", "commit": "a8912b88ce488f411177fc8aed358b04dc246d7b" }, "cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" }, @@ -12,7 +12,7 @@ "indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" }, "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, "local-highlight.nvim": { "branch": "master", "commit": "272f36f412c0a82c785c01256abf4eda4c1cb11d" }, - "lualine.nvim": { "branch": "master", "commit": "0c6cca9f2c63dadeb9225c45bc92bb95a151d4af" }, + "lualine.nvim": { "branch": "master", "commit": "a94fc68960665e54408fe37dcf573193c4ce82c9" }, "markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "bef29b653ba71d442816bf56286c2a686210be04" }, "mason.nvim": { "branch": "main", "commit": "8024d64e1330b86044fed4c8494ef3dcd483a67c" }, @@ -20,11 +20,11 @@ "neo-tree.nvim": { "branch": "v3.x", "commit": "f481de16a0eb59c985abac8985e3f2e2f75b4875" }, "none-ls-extras.nvim": { "branch": "main", "commit": "924fe88a9983c7d90dbb31fc4e3129a583ea0a90" }, "none-ls.nvim": { "branch": "main", "commit": "db2a48b79cfcdab8baa5d3f37f21c78b6705c62e" }, - "nui.nvim": { "branch": "main", "commit": "7cd18e73cfbd70e1546931b7268b3eebaeff9391" }, + "nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" }, "nvim-autopairs": { "branch": "master", "commit": "4d74e75913832866aa7de35e4202463ddf6efd1b" }, "nvim-cmp": { "branch": "main", "commit": "b5311ab3ed9c846b585c0c15b7559be131ec4be9" }, "nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" }, - "nvim-lspconfig": { "branch": "master", "commit": "036885e8e5456d3907626b634693234f628afef6" }, + "nvim-lspconfig": { "branch": "master", "commit": "f6d31b1c17f1a338ddcf56aaa930a8c88e904662" }, "nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" }, "nvim-treesitter-textobjects": { "branch": "master", "commit": "0f051e9813a36481f48ca1f833897210dbcfffde" }, "nvim-ts-autotag": { "branch": "main", "commit": "a1d526af391f6aebb25a8795cbc05351ed3620b5" }, @@ -32,11 +32,13 @@ "oil.nvim": { "branch": "master", "commit": "08c2bce8b00fd780fb7999dbffdf7cd174e896fb" }, "plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" }, "rainbow-delimiters.nvim": { "branch": "master", "commit": "55ad4fb76ab68460f700599b7449385f0c4e858e" }, + "ruffer": { "branch": "plugin", "commit": "7fdf14e2f600ce92f341d2dc594cee6e474912e8" }, + "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, "telescope.nvim": { "branch": "master", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" }, "undotree": { "branch": "master", "commit": "b951b87b46c34356d44aa71886aecf9dd7f5788a" }, "vim-commentary": { "branch": "master", "commit": "64a654ef4a20db1727938338310209b6a63f60c9" }, "vim-devicons": { "branch": "master", "commit": "71f239af28b7214eebb60d4ea5bd040291fb7e33" }, - "vim-floaterm": { "branch": "master", "commit": "b02d1f4a87ad6f5b300d225e5ac62bde9d86086b" }, + "vim-floaterm": { "branch": "master", "commit": "b18b41d15d2492f74f01ecac12f786b81f38262e" }, "vim-fugitive": { "branch": "master", "commit": "4a745ea72fa93bb15dd077109afbb3d1809383f2" }, "vim-signature": { "branch": "master", "commit": "6bc3dd1294a22e897f0dcf8dd72b85f350e306bc" }, "vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" } diff --git a/nvim/lua/customSplash.lua b/nvim/lua/customSplash.lua index 91035a5..7068306 100644 --- a/nvim/lua/customSplash.lua +++ b/nvim/lua/customSplash.lua @@ -1,7 +1,5 @@ --- 1) Create (or clear) an augroup for splash‐related autocommands: vim.api.nvim_create_augroup("CustomSplash", { clear = true }) --- 2) On VimEnter, if no file arguments, set up the splash: vim.api.nvim_create_autocmd("VimEnter", { group = "CustomSplash", callback = function() @@ -9,28 +7,23 @@ vim.api.nvim_create_autocmd("VimEnter", { return end - -- (A) Grab the current window ID and its original number settings: local splash_win = vim.api.nvim_get_current_win() local orig_number = vim.api.nvim_win_get_option(splash_win, "number") local orig_relativenumber = vim.api.nvim_win_get_option(splash_win, "relativenumber") - -- Store them as buffer‐local variables so callbacks can see them: local bufnr = vim.api.nvim_get_current_buf() vim.b[bufnr].splash_winid = splash_win vim.b[bufnr].splash_orig_number = orig_number vim.b[bufnr].splash_orig_relativenumber = orig_relativenumber - -- (B) Turn off line numbers in that window: vim.api.nvim_win_set_option(splash_win, "number", false) vim.api.nvim_win_set_option(splash_win, "relativenumber", false) - -- (C) Make this buffer “scratchy”: vim.opt_local.buftype = "nofile" vim.opt_local.bufhidden = "hide" vim.opt_local.swapfile = false vim.opt_local.buflisted = false - -- (D) Load or fallback ASCII lines: local splash_path = vim.fn.expand("$HOME/.config/nvim/splash.txt") local ascii_lines = {} if vim.fn.filereadable(splash_path) == 1 then @@ -48,7 +41,6 @@ vim.api.nvim_create_autocmd("VimEnter", { } end - -- (E) Horizontally center each line: local width = vim.api.nvim_win_get_width(splash_win) local padded = {} for _, line in ipairs(ascii_lines) do @@ -58,41 +50,32 @@ vim.api.nvim_create_autocmd("VimEnter", { table.insert(padded, string.rep(" ", left_pad) .. line) end - -- Insert those padded lines at the very top of the buffer: vim.api.nvim_buf_set_lines(bufnr, 0, 0, false, padded) - -- (F) Create a buffer‐local augroup for “clear & restore” autocmds: local clear_grp = vim.api.nvim_create_augroup("SplashClear" .. bufnr, { clear = true }) - -- (F1) When you ENTER Insert in the splash buffer: vim.api.nvim_create_autocmd("InsertEnter", { group = clear_grp, buffer = bufnr, once = true, callback = function() - -- 1) Wipe away all ASCII lines, leave exactly one empty line: vim.api.nvim_buf_set_lines(bufnr, 0, -1, false, { "" }) - -- 2) Move cursor to first line, col 0: vim.api.nvim_win_set_cursor(splash_win, {1, 0}) - -- 3) Restore original line‐number settings on the splash window: vim.api.nvim_win_set_option(splash_win, "number", vim.b[bufnr].splash_orig_number) vim.api.nvim_win_set_option(splash_win, "relativenumber", vim.b[bufnr].splash_orig_relativenumber) end, }) - -- (F2) When you LEAVE the splash buffer (e.g. open Neo-tree, switch to file): vim.api.nvim_create_autocmd("BufLeave", { group = clear_grp, buffer = bufnr, once = true, callback = function() - -- Restore the original gutter on that splash window: vim.api.nvim_win_set_option(splash_win, "number", vim.b[bufnr].splash_orig_number) vim.api.nvim_win_set_option(splash_win, "relativenumber", vim.b[bufnr].splash_orig_relativenumber) end, }) - -- Place the cursor at the top so you immediately see the ASCII: vim.api.nvim_win_set_cursor(splash_win, {1, 0}) end, }) diff --git a/nvim/lua/keymaps.lua b/nvim/lua/keymaps.lua index 957fd07..97ec72e 100644 --- a/nvim/lua/keymaps.lua +++ b/nvim/lua/keymaps.lua @@ -21,7 +21,7 @@ vim.keymap.set('n', 'b', functions.bufonly, opts) -- ############################ --- Default behabior overrides # +-- Default behavior overrides # -- ############################ vim.keymap.set("n", "x", [["_x]]) --void x @@ -36,7 +36,7 @@ vim.keymap.set('n', 'd', 'daw', opts) vim.keymap.set('n', 'cw', 'ciw', { noremap = true, nowait = true, silent = true }) -- cw = ciw ---use Tab to navigate menu snipets menu +--use Tab to navigate menu snippets menu vim.keymap.set('i', '', function() if vim.fn.pumvisible() == 1 then return '' @@ -52,7 +52,7 @@ vim.keymap.set('n', 'S', '', opts) vim.keymap.set('n', 'q', '', opts) -- ############################ --- Pluggins keymaps # +-- Plugins keymaps # -- ############################ vim.cmd([[nnoremap \ :Neotree toggle]]) diff --git a/nvim/lua/lspConfig.lua b/nvim/lua/lspConfig.lua index ff9f7a2..52f8098 100644 --- a/nvim/lua/lspConfig.lua +++ b/nvim/lua/lspConfig.lua @@ -24,7 +24,7 @@ local capabilities = vim.lsp.protocol.make_client_capabilities() capabilities.textDocument.completion.completionItem.snippetSupport = true -- LSP attach callback -local on_attach = function(client, bufnr) +local lsp_attach = function(client, bufnr) -- Helper function to set buffer-local keymaps local bufmap = function(mode, lhs, rhs, desc) vim.keymap.set(mode, lhs, rhs, { buffer = bufnr, desc = desc }) @@ -49,7 +49,7 @@ local servers = { "clangd", "ts_ls", "pyright", "tailwindcss", "html", "stimulus ---Uncoment on first run +------Uncoment on first run -- require("mason-lspconfig").setup({ -- ensure_installed = servers, -- }) @@ -60,7 +60,7 @@ local lspconfig = require("lspconfig") for _, server in ipairs(servers) do lspconfig[server].setup({ capabilities = capabilities, - on_attach = on_attach, + on_attach = lsp_attach }) end @@ -69,22 +69,23 @@ for _, server in ipairs(servers) do local null_ls = require("null-ls") null_ls.setup({ - sources = { - null_ls.builtins.diagnostics.cppcheck, - null_ls.builtins.formatting.prettierd.with({ - extra_args = { "--single-quote" }, - }), - }, - on_attach = function(client, bufnr) - if client.supports_method("textDocument/formatting") then - vim.api.nvim_create_autocmd("BufWritePre", { - buffer = bufnr, - callback = function() - vim.lsp.buf.format({ bufnr = bufnr }) - end, - }) - end - end, + sources = { + null_ls.builtins.diagnostics.cppcheck, + null_ls.builtins.diagnostics.codespell, + null_ls.builtins.formatting.prettierd.with({ + extra_args = { "--single-quote" }, + }), + }, + on_attach = function(client, bufnr) + if client.supports_method("textDocument/formatting") then + vim.api.nvim_create_autocmd("BufWritePre", { + buffer = bufnr, + callback = function() + vim.lsp.buf.format({ bufnr = bufnr }) + end, + }) + end + end, }) --"'''''''''''''''''''Tree sitter highlight'''''''''''''''''''''''''''''' diff --git a/nvim/lua/plugins.lua b/nvim/lua/plugins.lua index b1a727e..8ad1b49 100644 --- a/nvim/lua/plugins.lua +++ b/nvim/lua/plugins.lua @@ -2,21 +2,28 @@ -- Bootstrap lazy.nvim local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" if not (vim.uv or vim.loop).fs_stat(lazypath) then - local lazyrepo = "https://github.com/folke/lazy.nvim.git" - local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) - if vim.v.shell_error ~= 0 then - vim.api.nvim_echo({ - { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, - { out, "WarningMsg" }, - { "\nPress any key to exit..." }, - }, true, {}) - vim.fn.getchar() - os.exit(1) - end + local lazyrepo = "https://github.com/folke/lazy.nvim.git" + local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) + if vim.v.shell_error ~= 0 then + vim.api.nvim_echo({ + { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, + { out, "WarningMsg" }, + { "\nPress any key to exit..." }, + }, true, {}) + vim.fn.getchar() + os.exit(1) + end end vim.opt.rtp:prepend(lazypath) local plugins = { + -- mine + { + 'acidburnmonkey/ruffer', + config = function() + require('ruffer').setup() + end, + }, -- Terminal floating window { "voldikss/vim-floaterm" }, @@ -112,7 +119,7 @@ local plugins = { -- Formatter/Linter integration { "nvimtools/none-ls.nvim" , - dependencies = { + dependencies = { "nvimtools/none-ls-extras.nvim",}, } , @@ -145,7 +152,7 @@ local plugins = { -- Lualine { 'nvim-lualine/lualine.nvim', - dependencies = { 'nvim-tree/nvim-web-devicons' } }, + dependencies = { 'nvim-tree/nvim-web-devicons' } }, -- File icons { "ryanoasis/vim-devicons" }, @@ -161,20 +168,25 @@ local plugins = { end, opts = {}, }, --- highlight - { - 'tzachar/local-highlight.nvim', - }, - - -{ - 'ChuufMaster/buffer-vacuum', - opts = { - max_buffers = 2, - count_pinned_buffers = false, - enable_messages = false, + -- highlight + { + 'tzachar/local-highlight.nvim', }, - }, + + -- buffer vacuum + { + 'ChuufMaster/buffer-vacuum', + opts = { + max_buffers = 2, + count_pinned_buffers = false, + enable_messages = false, + }, + }, + + -- telescope pluggin + {'nvim-telescope/telescope-ui-select.nvim' }, + + } local opts = {} diff --git a/wezterm/wezterm.lua b/wezterm/wezterm.lua index 8685477..a80effc 100644 --- a/wezterm/wezterm.lua +++ b/wezterm/wezterm.lua @@ -1,12 +1,15 @@ local wezterm = require 'wezterm' local config = wezterm.config_builder() + +config.enable_wayland = false + -- Font config config.font = wezterm.font_with_fallback { { family = "Fira Code", weight = "Regular" }, "Symbols Nerd Font", } -config.font_size = 12.0 +config.font_size = 22.0 config.line_height = 1.0 @@ -40,6 +43,8 @@ config.keys = { { key = "RightArrow", mods = "CTRL", action = wezterm.action.ActivateTabRelative(1) }, { key = "t", mods = "ALT", action = wezterm.action.SpawnTab "CurrentPaneDomain" }, { key = "q", mods = "ALT", action = wezterm.action.CloseCurrentPane { confirm = false } }, + { key = 'U', mods = 'CTRL|SHIFT', action = wezterm.action.AttachDomain 'unix', + }, } -- Theme config.color_scheme = "Catppuccin Mocha" @@ -84,7 +89,17 @@ tabline.setup({ extensions = {}, }) +config.unix_domains = { + { + name = 'unix', + } +} +local mux = wezterm.mux +wezterm.on('gui-startup', function(cmd) + local tab, pane, window = mux.spawn_window(cmd or {}) + window:gui_window():maximize() +end) return config