addet progressbar to rsync

This commit is contained in:
pika 2024-07-23 21:37:17 +02:00
parent 15430a631d
commit 45f4c0aa3a

View file

@ -1,4 +1,58 @@
#!/bin/fish
# ─< Function to echo text with bold black color >────────────────────────────────────────
function black
echo -ne (set_color --bold black)"$argv"(set_color normal)"\n"
end
# ─< Function to echo text with bold red color >──────────────────────────────────────────
function red
echo -ne (set_color --bold red)"$argv"(set_color normal)"\n"
end
# ─< Function to echo text with bold green color >────────────────────────────────────────
function green
echo -ne (set_color --bold green)"$argv"(set_color normal)"\n"
end
# ─< Function to echo text with bold yellow color >───────────────────────────────────────
function yellow
echo -ne (set_color --bold yellow)"$argv"(set_color normal)"\n"
end
# ─< Function to echo text with bold blue color >─────────────────────────────────────────
function blue
echo -ne (set_color --bold blue)"$argv"(set_color normal)"\n"
end
# ─< Function to echo text with bold magenta color >──────────────────────────────────────
function magenta
echo -ne (set_color --bold magenta)"$argv"(set_color normal)"\n"
end
# ─< Function to echo text with bold cyan color >─────────────────────────────────────────
function cyan
echo -ne (set_color --bold cyan)"$argv"(set_color normal)"\n"
end
# ─< Function to echo text with bold white color >────────────────────────────────────────
function white
echo -ne (set_color --bold white)"$argv"(set_color normal)"\n"
end
# ─< t stands for trash(-cli) >───────────────────────────────────────────────────────────
function _trash
if command -v trash >/dev/null 2>&1
alias rm="trash"
else
if command -v trash-cli >/dev/null 2>&1
alias rm="trash-cli"
else
red "You do not have trash or trash-cli installed! Your 'rm' will be permanent!"
end
end
end
# ─< colorized ls >─────────────────────────────────────────────────────────────────────────
# ─< lsd >──────────────────────────────────────────────────────────────────────────────────
if command -v lsd >/dev/null 2>&1
@ -55,7 +109,7 @@ end
# ─< rsync >────────────────────────────────────────────────────────────────────────────────
if command -v rsync >/dev/null 2>&1
alias cp="rsync -avP"
alias cp="rsync -avP --info=progress2"
alias scp="rsync -avP"
end
@ -92,6 +146,8 @@ if command -v fastfetch >/dev/null 2>&1
clear & f
alias clear="clear & f"
end
# ─< calling the trash function, which will warn you if you don't have trash installed >──
_trash
# ─< set nmap-alias >───────────────────────────────────────────────────────────────────────
if command -v nmap >/dev/null 2>&1