From a48233b2ab1ee952e9f678e5c08bc25cf3672021 Mon Sep 17 00:00:00 2001 From: punkfairie <23287005+punkfairie@users.noreply.github.com> Date: Wed, 21 Feb 2024 20:35:47 -0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat:=20Small=20fish=20improvements?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .config/fish/conf.d/30-bat.fish | 5 +++++ .config/fish/conf.d/30-fzf.fish | 15 +++++++++++++++ .config/fish/functions/$.fish | 3 +++ .config/fish/functions/fm.fish | 5 +++++ 4 files changed, 28 insertions(+) create mode 100644 .config/fish/conf.d/30-bat.fish create mode 100644 .config/fish/conf.d/30-fzf.fish create mode 100644 .config/fish/functions/$.fish create mode 100644 .config/fish/functions/fm.fish diff --git a/.config/fish/conf.d/30-bat.fish b/.config/fish/conf.d/30-bat.fish new file mode 100644 index 0000000..dca5424 --- /dev/null +++ b/.config/fish/conf.d/30-bat.fish @@ -0,0 +1,5 @@ +#!/usr/bin/env fish + +function cat --wraps cat + bat $argv +end diff --git a/.config/fish/conf.d/30-fzf.fish b/.config/fish/conf.d/30-fzf.fish new file mode 100644 index 0000000..3c80fb1 --- /dev/null +++ b/.config/fish/conf.d/30-fzf.fish @@ -0,0 +1,15 @@ +#!/usr/bin/env fish + +set -gx FZF_DEFAULT_CMD 'rg --files --hidden --glob "!.git"' + +set -gx FZF_DEFAULT_OPTS "\ +--margin=10%,5% \ +--border=sharp \ +--pointer=' ' \ +--marker=' ' \ +--prompt=' ' \ +--preview-label-pos='bottom' \ +--preview-window='border-sharp' \ +--color=bg+:#313244,bg:#1e1e2e,spinner:#f5e0dc,hl:#f38ba8 \ +--color=fg:#cdd6f4,header:#f38ba8,info:#cba6f7,pointer:#f5e0dc \ +--color=marker:#f5e0dc,fg+:#cdd6f4,prompt:#cba6f7,hl+:#f38ba8" diff --git a/.config/fish/functions/$.fish b/.config/fish/functions/$.fish new file mode 100644 index 0000000..c5e3a14 --- /dev/null +++ b/.config/fish/functions/$.fish @@ -0,0 +1,3 @@ +#!/usr/bin/env fish + +$argv diff --git a/.config/fish/functions/fm.fish b/.config/fish/functions/fm.fish new file mode 100644 index 0000000..5708167 --- /dev/null +++ b/.config/fish/functions/fm.fish @@ -0,0 +1,5 @@ +#!/usr/bin/env fish + +function fm --wraps=fzf -d "Use fzf as a simple file viewer" + find . -type d | fzf --preview='eza --color=always -T {} | head -n 50' +end