updates script
This commit is contained in:
parent
e56a6ed33f
commit
a7fd3d9429
1 changed files with 15 additions and 11 deletions
|
|
@ -4,15 +4,19 @@
|
||||||
|
|
||||||
functions = {
|
functions = {
|
||||||
ff = ''
|
ff = ''
|
||||||
set RG_PREFIX "rg --column --line-number --no-heading --color=always --smart-case "
|
set rg_cmd "rg --column --line-number --no-heading --color=always --smart-case"
|
||||||
set INITIAL_QUERY "$argv"
|
set initial_query (string join " " $argv)
|
||||||
fzf --ansi --disabled --query "$INITIAL_QUERY" \
|
|
||||||
--bind "start:reload:$RG_PREFIX {q}" \
|
fzf --ansi --disabled --query "$initial_query" \
|
||||||
--bind "change:reload:sleep 0.1; $RG_PREFIX {q} || true" \
|
--bind "start:reload:$rg_cmd {q}" \
|
||||||
--delimiter : \
|
--bind "change:reload:sleep 0.1; $rg_cmd {q} || true" \
|
||||||
--preview 'bat --color=always {1} --highlight-line {2}' \
|
--bind "alt-enter:unbind(change,alt-enter)+change-prompt(2. fzf> )+enable-search+clear-query" \
|
||||||
--preview-window 'up,60%,border-bottom,+{2}+3/3,~3' \
|
--color "hl:-1:underline,hl+:-1:underline:reverse" \
|
||||||
--bind 'enter:become(nvim {1} +{2})'
|
--prompt '1. ripgrep> ' \
|
||||||
|
--delimiter : \
|
||||||
|
--preview 'bat --color=always {1} --highlight-line {2}' \
|
||||||
|
--preview-window 'up,60%,border-bottom,+{2}+3/3,~3' \
|
||||||
|
--bind 'enter:become(nvim {1} +{2})'
|
||||||
'';
|
'';
|
||||||
envsource = ''
|
envsource = ''
|
||||||
for line in (cat $argv | grep -v '^#')
|
for line in (cat $argv | grep -v '^#')
|
||||||
|
|
@ -26,12 +30,12 @@
|
||||||
# Usage: resize_images [percentage]
|
# Usage: resize_images [percentage]
|
||||||
# Example: resize_images 20 - resizes all images to 20% of original size
|
# Example: resize_images 20 - resizes all images to 20% of original size
|
||||||
# If no percentage is provided, defaults to 40%
|
# If no percentage is provided, defaults to 40%
|
||||||
|
|
||||||
set -l percentage $argv[1]
|
set -l percentage $argv[1]
|
||||||
if test -z "$percentage"
|
if test -z "$percentage"
|
||||||
set percentage 40
|
set percentage 40
|
||||||
end
|
end
|
||||||
|
|
||||||
for img in (find . -type f -name "*.JPG")
|
for img in (find . -type f -name "*.JPG")
|
||||||
set original_size (stat -f %z "$img")
|
set original_size (stat -f %z "$img")
|
||||||
magick convert "$img" -resize "$percentage%" "$img"
|
magick convert "$img" -resize "$percentage%" "$img"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue