Nix fmt rfc style (more or less)
This commit is contained in:
parent
e7496c447a
commit
515f098644
146 changed files with 2607 additions and 906 deletions
|
|
@ -68,55 +68,64 @@ in
|
|||
source = previewer;
|
||||
# keybinding = "i";
|
||||
};
|
||||
keybindings = { "<c-f>" = "$EDITOR $(fzf)"; };
|
||||
keybindings = {
|
||||
"<c-f>" = "$EDITOR $(fzf)";
|
||||
};
|
||||
commands = {
|
||||
mkdir = ''''${{
|
||||
printf "Directory name: "
|
||||
read ans
|
||||
mkdir $ans
|
||||
}}'';
|
||||
mkfile = ''''${{
|
||||
printf "File name: "
|
||||
read ans
|
||||
$VISUAL $ans
|
||||
}}'';
|
||||
mkdir = ''
|
||||
''${{
|
||||
printf "Directory name: "
|
||||
read ans
|
||||
mkdir $ans
|
||||
}}'';
|
||||
mkfile = ''
|
||||
''${{
|
||||
printf "File name: "
|
||||
read ans
|
||||
$VISUAL $ans
|
||||
}}'';
|
||||
|
||||
trash = ''''${{
|
||||
files=$(printf "$fx" | tr '\n' ';')
|
||||
while [ "$files" ]; do
|
||||
file=''${files%%;*}
|
||||
trash = ''
|
||||
''${{
|
||||
files=$(printf "$fx" | tr '\n' ';')
|
||||
while [ "$files" ]; do
|
||||
file=''${files%%;*}
|
||||
|
||||
${pkgs.trash-cli}/bin/trash-put "$(basename "$file")"
|
||||
if [ "$files" = "$file" ]; then
|
||||
files=""
|
||||
else
|
||||
files="''${files#*;}"
|
||||
fi
|
||||
done
|
||||
}}'';
|
||||
restore_trash = ''''${{
|
||||
trash-restore
|
||||
}}'';
|
||||
${pkgs.trash-cli}/bin/trash-put "$(basename "$file")"
|
||||
if [ "$files" = "$file" ]; then
|
||||
files=""
|
||||
else
|
||||
files="''${files#*;}"
|
||||
fi
|
||||
done
|
||||
}}'';
|
||||
restore_trash = ''
|
||||
''${{
|
||||
trash-restore
|
||||
}}'';
|
||||
|
||||
z = ''''${{
|
||||
result="$(zoxide query --exclude "$PWD" -- "$@")"
|
||||
lf -remote "send $id cd '$result'"
|
||||
}}'';
|
||||
zi = ''''${{
|
||||
result="$(zoxide query -i -- "$@")"
|
||||
lf -remote "send $id cd '$result'"
|
||||
}}'';
|
||||
extract = ''''${{
|
||||
set -f
|
||||
case $f in
|
||||
*.tar.bz|*.tar.bz2|*.tbz|*.tbz2) tar xjvf $f;;
|
||||
*.tar.gz|*.tgz) tar xzvf $f;;
|
||||
*.tar.xz|*.txz) tar xJvf $f;;
|
||||
*.zip) unzip $f;;
|
||||
*.rar) unrar x $f;;
|
||||
*.7z) 7z x $f;;
|
||||
esac
|
||||
}}'';
|
||||
z = ''
|
||||
''${{
|
||||
result="$(zoxide query --exclude "$PWD" -- "$@")"
|
||||
lf -remote "send $id cd '$result'"
|
||||
}}'';
|
||||
zi = ''
|
||||
''${{
|
||||
result="$(zoxide query -i -- "$@")"
|
||||
lf -remote "send $id cd '$result'"
|
||||
}}'';
|
||||
extract = ''
|
||||
''${{
|
||||
set -f
|
||||
case $f in
|
||||
*.tar.bz|*.tar.bz2|*.tbz|*.tbz2) tar xjvf $f;;
|
||||
*.tar.gz|*.tgz) tar xzvf $f;;
|
||||
*.tar.xz|*.txz) tar xJvf $f;;
|
||||
*.zip) unzip $f;;
|
||||
*.rar) unrar x $f;;
|
||||
*.7z) 7z x $f;;
|
||||
esac
|
||||
}}'';
|
||||
"tar" = ''
|
||||
''${{
|
||||
set -f
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue