diff --git a/home/user/.config/git/config b/home/user/.config/git/config index 1f08658..ecc9775 100644 --- a/home/user/.config/git/config +++ b/home/user/.config/git/config @@ -26,7 +26,7 @@ addEmptyPathspec = false [alias] - a = "!git ls-files --exclude-standard -m --others -t | fzf | cut -d' ' -f2 | xargs git add" + a = "!git ls-files --exclude-standard -m --others -t | fzf -m --bind ctrl-a:toggle-all | cut -d' ' -f2 | xargs git add" d = diff ds = diff --staged dno = diff --name-only diff --git a/home/user/.config/nvim/lua/base/options.lua b/home/user/.config/nvim/lua/base/options.lua index 6cdfee0..fefdc48 100644 --- a/home/user/.config/nvim/lua/base/options.lua +++ b/home/user/.config/nvim/lua/base/options.lua @@ -13,7 +13,7 @@ opt.relativenumber = true opt.clipboard:append { 'unnamed' } opt.clipboard:append { 'unnamedplus' } -opt.shortmess:append { s = true, I = true} -- disable startup message +opt.shortmess:append { s = true, I = true } -- disable startup message opt.shell = 'zsh' diff --git a/home/user/.config/nvim/lua/base/plugins/peek.lua b/home/user/.config/nvim/lua/base/plugins/peek.lua index 7905682..48ad67f 100644 --- a/home/user/.config/nvim/lua/base/plugins/peek.lua +++ b/home/user/.config/nvim/lua/base/plugins/peek.lua @@ -1,13 +1,16 @@ return { 'toppair/peek.nvim', - enabled = vim.fn.executable "deno" == 1, + event = { "VeryLazy" }, + enabled = vim.fn.executable("deno") == 1, ft = {'markdown'}, keys = { - { 'rr', "lua require('peek').open()" } + { 'rr', "PeekOpen" } }, build = 'deno task --quiet build:fast', config = function() - require('peek').setup({ + local peek = require('peek') + + peek.setup({ auto_load = true, close_on_bdelete = true, syntax = true, @@ -18,5 +21,24 @@ return { throttle_at = 200000, throttle_time = 'auto', }) + + if vim.fn.executable("i3-msg") then + vim.api.nvim_create_user_command('PeekOpen', function() + if not peek.is_open() and vim.bo[vim.api.nvim_get_current_buf()].filetype == 'markdown' then + vim.fn.system('i3-msg split horizontal') + peek.open() + end + end, {}) + + vim.api.nvim_create_user_command('PeekClose', function() + if peek.is_open() then + peek.close() + vim.fn.system('i3-msg move left') + end + end, {}) + else + vim.api.nvim_create_user_command("PeekOpen", require("peek").open, {}) + vim.api.nvim_create_user_command("PeekClose", require("peek").close, {}) + end end, } diff --git a/home/user/.config/picom/picom.conf b/home/user/.config/picom/picom.conf index 576981b..50a9681 100644 --- a/home/user/.config/picom/picom.conf +++ b/home/user/.config/picom/picom.conf @@ -124,6 +124,7 @@ inactive-dim = 0.15 # focus-exclude = [] focus-exclude = [ "class_g = 'firefox'", + "class_g = 'webview'", "class_g = 'Cairo-clock'", "class_g = 'Conky'" ];