diff options
| -rw-r--r-- | mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/markdown.lua | 9 | ||||
| -rw-r--r-- | mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/telescope.lua | 25 | ||||
| -rw-r--r-- | mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/urlview.lua | 9 | ||||
| -rw-r--r-- | mac/.config/aerospace/aerospace.toml | 15 | ||||
| -rwxr-xr-x | mac/.config/borders/bordersrc | 2 | ||||
| -rw-r--r-- | mac/.config/kitty/kitty.conf | 4 | ||||
| -rw-r--r-- | mac/.config/tmux/tmux.conf | 6 |
7 files changed, 51 insertions, 19 deletions
diff --git a/mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/markdown.lua b/mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/markdown.lua index 3b5c618..a042fc8 100644 --- a/mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/markdown.lua +++ b/mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/markdown.lua @@ -223,8 +223,13 @@ return { "iamcco/markdown-preview.nvim", cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" }, ft = { "markdown" }, - build = function() - vim.fn["mkdp#util#install"]() + build = function(plugin) + if vim.fn.executable("npx") then + vim.cmd("!cd " .. plugin.dir .. " && cd app && npx install") + else + vim.cmd([[Lazy load markdown-preview.nvim]]) + vim.fn["mkdp#util#install"]() + end end, init = function() if vim.fn.executable("npx") then diff --git a/mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/telescope.lua b/mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/telescope.lua index 1c0fae0..9e60e98 100644 --- a/mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/telescope.lua +++ b/mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/telescope.lua @@ -31,6 +31,30 @@ local function find_nvim_plugin_files(prompt_bufnr) end end +local function telescope_open_single_or_multi(bufnr) + local actions = require("telescope.actions") + local actions_state = require("telescope.actions.state") + + local picker = actions_state.get_current_picker(bufnr) + local multi_selection = picker:get_multi_selection() + + if not vim.tbl_isempty(multi_selection) then + actions.close(bufnr) + for _, entry in ipairs(multi_selection) do + if entry.path then + vim.cmd(string.format("edit %s", entry.path)) + end + end + else + -- Only open the file under the cursor if nothing is selected + local entry = actions_state.get_selected_entry() + if entry and entry.path then + actions.close(bufnr) + vim.cmd(string.format("edit %s", entry.path)) + end + end +end + return { { "nvim-telescope/telescope-file-browser.nvim", @@ -549,6 +573,7 @@ return { ["<C-o><C-l>"] = actions.insert_original_cline, ["<M-f>"] = actions.nop, ["<M-k>"] = actions.nop, + ["<CR>"] = telescope_open_single_or_multi, }, n = { ["q"] = actions.close, diff --git a/mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/urlview.lua b/mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/urlview.lua index b1c72f4..69e7762 100644 --- a/mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/urlview.lua +++ b/mac/.config/TheSiahxyz/lua/TheSiahxyz/plugins/urlview.lua @@ -1,6 +1,7 @@ return { "axieax/urlview.nvim", dependencies = "nvim-telescope/telescope.nvim", + event = "VeryLazy", init = function() local wk = require("which-key") wk.add({ @@ -89,12 +90,12 @@ return { -- Command or method to open links with -- Options: "netrw", "system" (default OS browser), "clipboard"; or "firefox", "chromium" etc. -- By default, this is "netrw", or "system" if netrw is disabled - default_action = "netrw", + default_action = "system", -- Set the register to use when yanking -- Default: + (system clipboard) default_register = "+", -- Whether plugin URLs should link to the branch used by your package manager - default_include_branch = false, + default_include_branch = true, -- Ensure links shown in the picker are unique (no duplicates) unique = true, -- Ensure links shown in the picker are sorted alphabetically @@ -109,9 +110,9 @@ return { }) -- Add a keymap for the Tmux plugins search context - vim.keymap.set("n", "<leader>ub", "<Cmd>UrlView thesiah_urls<cr>", { desc = "Bookmarks URLs" }) + vim.keymap.set("n", "<leader>ub", "<Cmd>UrlView<cr>", { desc = "Buffer URLs" }) vim.keymap.set("n", "<leader>ul", "<Cmd>UrlView lazy<cr>", { desc = "Lazy plugin URLs" }) - vim.keymap.set("n", "<leader>ur", "<Cmd>UrlView<cr>", { desc = "Buffer URLs" }) + vim.keymap.set("n", "<leader>us", "<Cmd>UrlView thesiah_urls<cr>", { desc = "Bookmarks URLs" }) vim.keymap.set("n", "<leader>ut", "<Cmd>UrlView tmux_plugins<cr>", { desc = "Tmux plugin URLs" }) vim.keymap.set( "n", diff --git a/mac/.config/aerospace/aerospace.toml b/mac/.config/aerospace/aerospace.toml index cca8547..d34898f 100644 --- a/mac/.config/aerospace/aerospace.toml +++ b/mac/.config/aerospace/aerospace.toml @@ -73,9 +73,9 @@ on-focus-changed = ['move-mouse window-lazy-center'] inner.horizontal = 15 inner.vertical = 15 outer.top = [{ monitor."main" = 12 }, {monitor."secondary" = 40}, 10] - outer.left = 8 - outer.bottom = 8 - outer.right = 8 + outer.left = 10 + outer.bottom = 10 + outer.right = 10 # See https://nikitabobko.github.io/AeroSpace/guide#exec-env-vars [exec] # Again, you don't need to copy all config sections to your config. @@ -109,13 +109,14 @@ on-focus-changed = ['move-mouse window-lazy-center'] alt-enter = 'exec-and-forget open -na Kitty' alt-shift-enter = 'exec-and-forget open -na Cursor' alt-ctrl-enter = 'exec-and-forget open -na "Visual Studio Code"' - alt-c = 'exec-and-forget kitty --title -o close_on_child_death=yes -o confirm_os_window_close=0 "calcurse" -e calcurse' + alt-a = 'exec-and-forget open -na KakaoTalk' + alt-c = 'exec-and-forget kitty -o close_on_child_death=yes -o confirm_os_window_close=0 --title "calcurse" -e calcurse' alt-d = 'exec-and-forget open -na Dbeaver' - alt-e = 'exec-and-forget kitty --title -o close_on_child_death=yes -o confirm_os_window_close=0 "neomutt" -e env EDITOR="nvim -u ~/.config/nvim/init.lua" neomutt' + alt-e = 'exec-and-forget kitty -o close_on_child_death=yes -o confirm_os_window_close=0 --title "neomutt" -e env EDITOR="nvim -u ~/.config/nvim/init.lua" neomutt' alt-shift-e = 'exec-and-forget open -na "Microsoft Outlook"' alt-o = 'exec-and-forget open -na Docker' - alt-r = 'exec-and-forget kitty --title -o close_on_child_death=yes -o confirm_os_window_close=0 "htop" -e htop' - alt-s = 'exec-and-forget kitty --title -o close_on_child_death=yes -o confirm_os_window_close=0 "newsboat" -e newsboat' + alt-r = 'exec-and-forget kitty -o close_on_child_death=yes -o confirm_os_window_close=0 --title "htop" -e htop' + alt-s = 'exec-and-forget kitty -o close_on_child_death=yes -o confirm_os_window_close=0 --title "newsboat" -e newsboat' alt-t = 'exec-and-forget open -na "Microsoft Teams"' alt-w = 'exec-and-forget open -na Firefox' diff --git a/mac/.config/borders/bordersrc b/mac/.config/borders/bordersrc index f73156d..a8e75f2 100755 --- a/mac/.config/borders/bordersrc +++ b/mac/.config/borders/bordersrc @@ -2,7 +2,7 @@ options=( style=square - width=6.0 + width=8.0 hidpi=on active_color=0xff770000 # active_color="gradient(top_left=0xffebeb99,bottom_right=0xfff57f17)" diff --git a/mac/.config/kitty/kitty.conf b/mac/.config/kitty/kitty.conf index d77c33b..fac38cc 100644 --- a/mac/.config/kitty/kitty.conf +++ b/mac/.config/kitty/kitty.conf @@ -1171,7 +1171,7 @@ background_image_layout cscaled #: When background image is scaled, whether linear interpolation #: should be used. -dynamic_background_opacity yes +# dynamic_background_opacity no #: Allow changing of the background_opacity dynamically, using either #: keyboard shortcuts (increase_background_opacity and @@ -1306,7 +1306,7 @@ dynamic_background_opacity yes #: kitty will cycle through various known editors (vim, emacs, etc.) #: and take the first one that exists on your system. -# close_on_child_death no +close_on_child_death yes #: Close the window when the child process (shell) exits. With the #: default value no, the terminal will remain open when the child diff --git a/mac/.config/tmux/tmux.conf b/mac/.config/tmux/tmux.conf index b2f7357..61073e5 100644 --- a/mac/.config/tmux/tmux.conf +++ b/mac/.config/tmux/tmux.conf @@ -149,9 +149,9 @@ set -g @cmdpalette-cmdlists 'commands' set -g @cmdpalette-cmd-commands 'prefix C-c' # continuum -# set -g @continuum-boot 'on' -# set -g @continuum-boot-options 'kitty' -# set -g @continuum-restore 'on' +set -g @continuum-boot 'on' +set -g @continuum-boot-options 'kitty' +set -g @continuum-restore 'on' set -g @continuum-save-interval '1' # min, 0 for disable # copycat |
