From 9e801ee1bc8ef6d3caf59256ab9b41ff3b6a7959 Mon Sep 17 00:00:00 2001 From: andrzej Date: Mon, 14 Oct 2024 21:40:08 +0200 Subject: [PATCH 1/4] fzf image previews --- zsh/.zsh_aliases | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/zsh/.zsh_aliases b/zsh/.zsh_aliases index 27d33b2..d8b2906 100644 --- a/zsh/.zsh_aliases +++ b/zsh/.zsh_aliases @@ -4,6 +4,15 @@ alias devsesh="$HOME/scripts/tmux-dev-session.sh" alias slides="nohup ${HOME}/scripts/hyprland-slideshow.sh" alias ls="ls --color=auto" +alias fzf='fzf --preview='\'' + if file --mime-type {} | grep -qF '\''image/'\''; then + kitty icat --clear --transfer-mode=memory --stdin=no --place=${FZF_PREVIEW_COLUMNS}x${FZF_PREVIEW_LINES}@0x0 {} + else + batcat --color=always {} + fi + '\''' + + export SUDO_EDITOR="nvim" ##suffix aliases From ecf3adaf371b2b5e7e22e4973a342a48ce767b01 Mon Sep 17 00:00:00 2001 From: andrzej Date: Mon, 14 Oct 2024 21:40:33 +0200 Subject: [PATCH 2/4] setup fzf for latest version on Mint --- zsh/.zshrc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/zsh/.zshrc b/zsh/.zshrc index b7002b7..5a63509 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -29,7 +29,7 @@ eval "$(luarocks path --bin)" [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion #fzf -source <(fzf --zsh) +# source <(fzf --zsh) #starship eval "$(starship init zsh)" @@ -41,3 +41,5 @@ HISTSIZE=10000 SAVEHIST=10000 # Share history in every terminal session setopt SHARE_HISTORY + +[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh From 06b4f0ee398c65100ccb57d9b227a76bedecd516 Mon Sep 17 00:00:00 2001 From: andrzej Date: Mon, 14 Oct 2024 21:40:59 +0200 Subject: [PATCH 3/4] no more jk escape in visual mode --- nvim/.config/nvim/lua/keymaps.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nvim/.config/nvim/lua/keymaps.lua b/nvim/.config/nvim/lua/keymaps.lua index 505112c..e77b23c 100644 --- a/nvim/.config/nvim/lua/keymaps.lua +++ b/nvim/.config/nvim/lua/keymaps.lua @@ -6,8 +6,8 @@ local function map(mode, lhs, rhs, opts) vim.keymap.set(mode, lhs, rhs, options) end -map({ "i", "v", "t" }, "jk", "") -- remap escape -map({ "i", "v", "t" }, "JK", "") -- remap escape +map({ "i", "t" }, "jk", "") -- remap escape +map({ "i", "t" }, "JK", "") -- remap escape map("n", "o", "o") map("n", "", 'echo "Use h to move!!"') From fd716ae8a2b2eab8efe1b03921086d0c6620f79e Mon Sep 17 00:00:00 2001 From: andrzej Date: Mon, 14 Oct 2024 21:41:11 +0200 Subject: [PATCH 4/4] setup fzf --- bash/.bashrc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bash/.bashrc b/bash/.bashrc index 73ea499..1345eb8 100644 --- a/bash/.bashrc +++ b/bash/.bashrc @@ -127,3 +127,5 @@ export PATH="$DENO_INSTALL/bin:$PATH" . "$HOME/.cargo/env" + +[ -f ~/.fzf.bash ] && source ~/.fzf.bash