diff --git a/.config/fish/conf.d/abbr.fish b/.config/fish/conf.d/abbr.fish new file mode 100644 index 0000000..25fa1de --- /dev/null +++ b/.config/fish/conf.d/abbr.fish @@ -0,0 +1,34 @@ +#!/usr/bin/fish + +abbr ..2 "cd ../.." +abbr ..3 "cd ../../.." +abbr ..4 "cd ../../../.." +abbr ..5 "cd ../../../../.." +abbr activate "source bin/activate.fish" +abbr bigupdate "yay -Syu --noconfirm && tldr --update && yes | sdk update && yes | sdk upgrade java" +abbr cat "bat" +abbr c "command" +abbr - "cd -" +abbr cd.. "cd .." +abbr cl "cat src/**.* | sed '/^\s*\$/d' | wc -l" +abbr cp "cp -rv" +abbr diff "delta" +abbr gc "git clone" +abbr grep "grep -Irni 'txt' ." +abbr ls "exa --git --icons -gl" +abbr mgcc "clear; gcc -Wall -Wextra -Wshadow -Wcast-align -Wstrict-prototypes -fanalyzer -fsanitize=undefined -g main.c && ./a.out; rm a.out 2> /dev/null" +abbr mg++ "clear; g++ -Wall -Wextra -Wshadow -Wnon-virtual-dtor -pedantic -g -Wold-style-cast -Wsign-conversion main.cpp && ./a.out; rm a.out 2> /dev/null" +abbr mirrors_update "curl -s 'https://archlinux.org/mirrorlist/?country=FR&country=GB&protocol=https&use_mirror_status=on' | sed -e 's/^#Server/Server/' -e '/^#/d' | sudo bash -c 'rankmirrors -n 7 - > /etc/pacman.d/mirrorlist' && sudo pacman -Syy" +abbr mmake "clear; make && ./main; make clean 2> /dev/null" +abbr nano "micro" +abbr ocamlbuild "ocamlbuild -no-hygiene" +abbr opamupdate "opam update && opam upgrade -y" +abbr pacman-clean "sudo pacman -Rsn \$(pacman -Qqtd) --noconfirm" +abbr rm "rm -rf" +abbr tgz "tar czf 'Archive.tar.gz'" +abbr untgz "tar xvzf" +abbr vgcc "clear; gcc -Wall -Wextra -Wshadow -Wcast-align -Wstrict-prototypes -fanalyzer -fsanitize=undefined -g main.c && valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes -s ./a.out; rm a.out 2> /dev/null" +abbr vg++ "clear; g++ -Wall -Wextra -Wshadow -Wnon-virtual-dtor -pedantic -g -Wold-style-cast -Wsign-conversion main.cpp && valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes -s ./a.out; rm a.out 2> /dev/null" +abbr vmake "clear; make && valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes -s ./main; make clean 2> /dev/null" +abbr yay-rebuild "checkrebuild | awk '{print \$2}' | xargs -r yay -S --rebuildtree --noconfirm" +abbr zip "zip -r 'archive.zip' dossier" diff --git a/.config/fish/conf.d/abbr_arch.fish b/.config/fish/conf.d/abbr_arch.fish index 2441749..5a6d736 100644 --- a/.config/fish/conf.d/abbr_arch.fish +++ b/.config/fish/conf.d/abbr_arch.fish @@ -1,38 +1,4 @@ -#!/usr/bin/fish - -abbr ls "exa --git --icons -gl" -abbr cp "cp -rv" -abbr rm "rm -rf" -abbr mgcc "clear; gcc -Wall -Wextra -Wshadow -Wcast-align -Wstrict-prototypes -fanalyzer -fsanitize=undefined -g main.c && ./a.out; rm a.out 2> /dev/null" -abbr vgcc "clear; gcc -Wall -Wextra -Wshadow -Wcast-align -Wstrict-prototypes -fanalyzer -fsanitize=undefined -g main.c && valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes -s ./a.out; rm a.out 2> /dev/null" -abbr mg++ "clear; g++ -Wall -Wextra -Wshadow -Wnon-virtual-dtor -pedantic -g -Wold-style-cast -Wsign-conversion main.cpp && ./a.out; rm a.out 2> /dev/null" -abbr vg++ "clear; g++ -Wall -Wextra -Wshadow -Wnon-virtual-dtor -pedantic -g -Wold-style-cast -Wsign-conversion main.cpp && valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes -s ./a.out; rm a.out 2> /dev/null" -abbr mmake "clear; make && ./main; make clean 2> /dev/null" -abbr vmake "clear; make && valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes -s ./main; make clean 2> /dev/null" -abbr activate "source bin/activate.fish" -abbr c "command" -abbr vs "codium ." abbr code "codium" -abbr untgz "tar xvzf" -abbr tgz "tar czf 'Archive.tar.gz'" -abbr - "cd -" -abbr cd.. "cd .." -abbr ..2 "cd ../.." -abbr ..3 "cd ../../.." -abbr ..4 "cd ../../../.." -abbr ..5 "cd ../../../../.." -abbr cat "bat" -abbr nano "micro" -abbr bigupdate "yay -Syu --noconfirm && tldr --update && yes | sdk update && yes | sdk upgrade java" abbr d "nautilus . -w &> /dev/null & disown" -abbr gc "git clone" -abbr cl "cat src/**.* | sed '/^\s*\$/d' | wc -l" -abbr mirrors_update "curl -s 'https://archlinux.org/mirrorlist/?country=FR&country=GB&protocol=https&use_mirror_status=on' | sed -e 's/^#Server/Server/' -e '/^#/d' | sudo bash -c 'rankmirrors -n 7 - > /etc/pacman.d/mirrorlist' && sudo pacman -Syy" -abbr ocamlbuild "ocamlbuild -no-hygiene" -abbr opamupdate "opam update && opam upgrade -y" -abbr yay-rebuild "checkrebuild | awk '{print \$2}' | xargs -r yay -S --rebuildtree --noconfirm" -abbr pacman-clean "sudo pacman -Rsn \$(pacman -Qqtd) --noconfirm" -abbr diff "delta" -abbr grep "grep -Irni 'txt' ." abbr spotify "spotify &> /dev/null & disown" -abbr zip "zip -r 'archive.zip' dossier" +abbr vs "codium ." diff --git a/.config/fish/conf.d/abbr_wsl.fish b/.config/fish/conf.d/abbr_wsl.fish index 0fb6dfb..0aefc67 100644 --- a/.config/fish/conf.d/abbr_wsl.fish +++ b/.config/fish/conf.d/abbr_wsl.fish @@ -1,49 +1,3 @@ -#!/usr/bin/fish - -abbr ls "exa --git --icons -gl" -abbr cp "cp -rv" -abbr rm "rm -rf" -abbr mgcc "clear; gcc -Wall -Wextra -Wshadow -Wcast-align -Wstrict-prototypes \ - -fanalyzer -fsanitize=undefined -g main.c && ./a.out; rm a.out 2> /dev/null" -abbr vgcc "clear; gcc -Wall -Wextra -Wshadow -Wcast-align -Wstrict-prototypes \ - -fanalyzer -fsanitize=undefined -g main.c && valgrind --leak-check=full \ - --show-leak-kinds=all --track-origins=yes -s ./a.out; rm a.out 2> /dev/null" -abbr mg++ "clear; g++ -Wall -Wextra -Wshadow -Wnon-virtual-dtor -pedantic -g \ - -Wold-style-cast -Wsign-conversion main.cpp && ./a.out; rm a.out 2> /dev/null" -abbr vg++ "clear; g++ -Wall -Wextra -Wshadow -Wnon-virtual-dtor -pedantic -g \ - -Wold-style-cast -Wsign-conversion main.cpp && valgrind --leak-check=full \ - --show-leak-kinds=all --track-origins=yes -s ./a.out; rm a.out 2> /dev/null" -abbr mmake "clear; make && ./main; make clean 2> /dev/null" -abbr vmake "clear; make && valgrind --leak-check=full --show-leak-kinds=all \ - --track-origins=yes -s ./main; make clean 2> /dev/null" -abbr activate "source bin/activate.fish" -abbr c "command" -abbr vs "code ." -abbr untgz "tar xvzf" -abbr tgz "tar czf 'Archive.tar.gz'" -abbr - "cd -" -abbr cd.. "cd .." -abbr ..2 "cd ../.." -abbr ..3 "cd ../../.." -abbr ..4 "cd ../../../.." -abbr ..5 "cd ../../../../.." -abbr cat "bat" -abbr nano "micro" -abbr bigupdate "yay -Syu --noconfirm && tldr --update && yes | sdk update && \ - yes | sdk upgrade java" abbr d "explorer.exe ." -abbr gc "git clone" -abbr cl "cat src/**.* | sed '/^\s*\$/d' | wc -l" -abbr mirrors_update "curl -s \ - 'https://archlinux.org/mirrorlist/?country=FR&country=GB&protocol=https&use_mirror_status=on' \ - | sed -e 's/^#Server/Server/' -e '/^#/d' | sudo bash -c 'rankmirrors -n 7 - > \ - /etc/pacman.d/mirrorlist' && sudo pacman -Syy" -abbr ocamlbuild "ocamlbuild -no-hygiene" -abbr opamupdate "opam update && opam upgrade -y" -abbr yay-rebuild "checkrebuild | awk '{print \$2}' | xargs -r yay -S \ - --rebuildtree --noconfirm" -abbr pacman-clean "sudo pacman -Rsn \$(pacman -Qqtd) --noconfirm" -abbr diff "delta" -abbr grep "grep -Irni 'txt' ." abbr unison "unison ~/src ~/u_dest" -abbr zip "zip -r 'archive.zip' dossier" +abbr vs "code ." diff --git a/arch.sh b/arch.sh index 87afdd6..f6ee4c5 100644 --- a/arch.sh +++ b/arch.sh @@ -78,7 +78,8 @@ main() { # EXA colors fish -c "set -Ux EXA_COLORS 'di=1;36:da=35'" # Add aliases - wget -q https://git.mylloon.fr/Anri/confOS/raw/branch/main/.config/fish/conf.d/abbr_arch.fish -O "$HOME"/.config/fish/conf.d/abbr.fish + wget -q https://git.mylloon.fr/Anri/confOS/raw/branch/main/.config/fish/conf.d/abbr.fish -O "$HOME"/.config/fish/conf.d/abbr.fish + curl -s https://git.mylloon.fr/Anri/confOS/raw/branch/main/.config/fish/conf.d/abbr_arch.fish >> "$HOME"/.config/fish/conf.d/abbr.fish # Fish by default in terminal app local profil diff --git a/arch_wsl.sh b/arch_wsl.sh index 6c987e2..b814295 100644 --- a/arch_wsl.sh +++ b/arch_wsl.sh @@ -102,7 +102,8 @@ main() { # EXA colors fish -c "set -Ux EXA_COLORS 'di=1;36:da=35'" # Add aliases - wget -q https://git.mylloon.fr/Anri/confOS/raw/branch/main/.config/fish/conf.d/abbr_wsl.fish -O "$HOME"/.config/fish/conf.d/abbr.fish + wget -q https://git.mylloon.fr/Anri/confOS/raw/branch/main/.config/fish/conf.d/abbr.fish -O "$HOME"/.config/fish/conf.d/abbr.fish + curl -s https://git.mylloon.fr/Anri/confOS/raw/branch/main/.config/fish/conf.d/abbr_wsl.fish >> "$HOME"/.config/fish/conf.d/abbr.fish # === Micro configuration == fish -c "set -Ux EDITOR micro"