From 45f4c0aa3a10ef9f29a5ba71af042c54965c69a3 Mon Sep 17 00:00:00 2001 From: pika Date: Tue, 23 Jul 2024 21:37:17 +0200 Subject: [PATCH] addet progressbar to rsync --- aliases.fish | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 57 insertions(+), 1 deletion(-) diff --git a/aliases.fish b/aliases.fish index 2e5d3c2..ae5917a 100644 --- a/aliases.fish +++ b/aliases.fish @@ -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