Updates fish functions
This commit is contained in:
parent
a83f94a1b7
commit
870b25d643
1 changed files with 75 additions and 87 deletions
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
functions = {
|
||||
cdr = ''
|
||||
function cdr
|
||||
set folder (begin
|
||||
fd . ~/dev/ride/apps/backend/edge-services -t d -d 1;
|
||||
fd . ~/dev/ride/apps/backend/backend-services -t d -d 1;
|
||||
|
|
@ -17,10 +16,8 @@
|
|||
set service (basename $folder)
|
||||
|
||||
cd $folder
|
||||
end
|
||||
'';
|
||||
rr = ''
|
||||
function rr
|
||||
set folder (begin
|
||||
fd . ~/dev/ride/apps/backend/edge-services -t d -d 1;
|
||||
fd . ~/dev/ride/apps/backend/backend-services -t d -d 1;
|
||||
|
|
@ -50,10 +47,8 @@
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
'';
|
||||
ff = ''
|
||||
function ff
|
||||
set RG_PREFIX "rg --column --line-number --no-heading --color=always --smart-case "
|
||||
set INITIAL_QUERY "$argv"
|
||||
fzf --ansi --disabled --query "$INITIAL_QUERY" \
|
||||
|
|
@ -63,19 +58,15 @@
|
|||
--preview 'bat --color=always {1} --highlight-line {2}' \
|
||||
--preview-window 'up,60%,border-bottom,+{2}+3/3,~3' \
|
||||
--bind 'enter:become(nvim {1} +{2})'
|
||||
end
|
||||
'';
|
||||
envsource = ''
|
||||
function envsource
|
||||
for line in (cat $argv | grep -v '^#')
|
||||
set item (string split -m 1 '=' $line)
|
||||
set -gx $item[1] $item[2]
|
||||
end
|
||||
end
|
||||
'';
|
||||
fish_greeting = "fortune -a";
|
||||
resize_images = ''
|
||||
function resize_images
|
||||
# Resize all JPG images in the current directory and its subdirectories
|
||||
# Usage: resize_images [percentage]
|
||||
# Example: resize_images 20 - resizes all images to 20% of original size
|
||||
|
|
@ -95,12 +86,10 @@
|
|||
echo "New size: $new_size bytes"
|
||||
echo "---"
|
||||
end
|
||||
end
|
||||
'';
|
||||
localip = "ifconfig | grep \"inet \" | grep -v 127.0.0.1 | awk '{print $2}' | head -n 1";
|
||||
publicip = "curl -4 ifconfig.me";
|
||||
fzf = ''
|
||||
function fzf --wraps="fzf"
|
||||
set -Ux FZF_DEFAULT_OPTS "
|
||||
--color=fg:#908caa,bg:#191724,hl:#ebbcba
|
||||
--color=fg+:#e0def4,bg+:#26233a,hl+:#ebbcba
|
||||
|
|
@ -109,7 +98,6 @@
|
|||
--color=pointer:#c4a7e7,marker:#eb6f92,prompt:#908caa"
|
||||
|
||||
command fzf
|
||||
end
|
||||
'';
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue