From 2c30426b60a9c697c151a094cedef1a102317f85 Mon Sep 17 00:00:00 2001 From: BarbUk Date: Fri, 18 Jun 2021 13:46:14 +0400 Subject: [PATCH] Use xdg dir and default sort fzf --- snippy | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/snippy b/snippy index 9a98329..a770323 100755 --- a/snippy +++ b/snippy @@ -50,8 +50,8 @@ # set -o errexit -o pipefail -o nounset -readonly snippets_directory=$XDG_CONFIG_HOME/snippy -readonly rofi_args=(-dmenu -i -sort -async-pre-read 20 -theme-str 'element-icon { size: 2.35ch;}' -kb-accept-custom "" -kb-custom-1 "Ctrl+Return") +readonly snippets_directory=${XDG_CONFIG_HOME:-$HOME/.config}/snippy +readonly rofi_args=(-no-lazy-grab -dmenu -i -sort -sorting-method fzf -async-pre-read 20 -theme-str 'element-icon { size: 2.35ch;}' -kb-accept-custom "" -kb-custom-1 "Ctrl+Return") readonly fzf_args=(--select-1 --reverse --inline-info --multi --preview '( bat --style auto --color always --language bash {} || highlight --force -O ansi -l {} 2> /dev/null ) | head -200' -1) # Placeholders