some modifications
This commit is contained in:
parent
31e744515a
commit
51f41e6676
3 changed files with 50 additions and 76 deletions
38
.config/fish/conf.d/abbr_arch.fish
Normal file
38
.config/fish/conf.d/abbr_arch.fish
Normal file
|
@ -0,0 +1,38 @@
|
|||
#!/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"
|
|
@ -20,7 +20,7 @@ abbr activate "source bin/activate.fish"
|
|||
abbr c "command"
|
||||
abbr vs "code ."
|
||||
abbr untgz "tar xvzf"
|
||||
abbr tgz "tar czf \"Archive.tar.gz\""
|
||||
abbr tgz "tar czf 'Archive.tar.gz'"
|
||||
abbr - "cd -"
|
||||
abbr cd.. "cd .."
|
||||
abbr ..2 "cd ../.."
|
||||
|
@ -40,9 +40,9 @@ abbr mirrors_update "curl -s \
|
|||
/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 \
|
||||
abbr yay-rebuild "checkrebuild | awk '{print \$2}' | xargs -r yay -S \
|
||||
--rebuildtree --noconfirm"
|
||||
abbr pacman-clean "sudo pacman -Rsn $(pacman -Qqtd) --noconfirm"
|
||||
abbr pacman-clean "sudo pacman -Rsn \$(pacman -Qqtd) --noconfirm"
|
||||
abbr diff "delta"
|
||||
abbr grep "grep -Irni 'txt' ."
|
||||
abbr unison "unison ~/src ~/u_dest"
|
||||
|
|
82
arch.sh
82
arch.sh
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -o errexit # crash the script when a command crash
|
||||
set -o pipefail # same as above
|
||||
set -o pipefail # same as above for piped command
|
||||
set -o nounset # crash when a variable doesnt exist
|
||||
|
||||
# TRACE=1 for debug
|
||||
|
@ -14,16 +14,16 @@ cd "$(dirname "$0")" # change script directory
|
|||
main() {
|
||||
# === Remove extra packages ==
|
||||
pacman -D --asexplicit archlinux-keyring # keep this package
|
||||
pacman -Rsn --noconfirm epiphany gnome-maps cheese gnome-weather gnome-music \
|
||||
sudo pacman -Rsn --noconfirm epiphany gnome-maps cheese gnome-weather gnome-music \
|
||||
# gnome-firefox, maps, caméra, météo, musique
|
||||
gnome-books vim gnome-boxes gnome-photos malcontent \
|
||||
# liseuse, vim, machines, photos, parental control
|
||||
gnome-contacts totem gedit "$(pacman -Qqtd)"
|
||||
# contacts, vidéos, gedit dependencies
|
||||
# contacts, vidéos, gedit, dependencies
|
||||
|
||||
# === Colors package manager ==
|
||||
sed -i "s/#Color/Color/g" /etc/pacman.conf
|
||||
sed -i "s/#ParallelDownloads = 5/ParallelDownloads = 3/g" /etc/pacman.conf
|
||||
sudo sed -i "s/#Color/Color/g" /etc/pacman.conf
|
||||
sudo sed -i "s/#ParallelDownloads = 5/ParallelDownloads = 3/g" /etc/pacman.conf
|
||||
|
||||
# === Yay ==
|
||||
git clone https://aur.archlinux.org/yay.git
|
||||
|
@ -54,8 +54,8 @@ main() {
|
|||
sed -i "s/#Wayland/Wayland/g" /etc/gdm/custom.conf
|
||||
|
||||
# === Locales ==
|
||||
sed -i "s/fr_FR.UTF-8.UTF-8 UTF-8/fr_FR.UTF8 UTF-8/g" /etc/locale.gen
|
||||
locale-gen
|
||||
sudo sed -i "s/fr_FR.UTF-8.UTF-8 UTF-8/fr_FR.UTF8 UTF-8/g" /etc/locale.gen
|
||||
sudo locale-gen
|
||||
localectl set-locale fr_FR.UTF-8
|
||||
|
||||
# === Fish ==
|
||||
|
@ -66,83 +66,19 @@ main() {
|
|||
fish -c "fisher install jethrokuan/fzf"
|
||||
fish -c "fisher install jorgebucaran/autopair.fish"
|
||||
# SSH
|
||||
rm "$HOME"/.config/fish/functions/fish_ssh_agent.fish 2> /dev/null
|
||||
wget -q https://gitlab.com/kyb/fish_ssh_agent/raw/master/functions/fish_ssh_agent.fish -P "$HOME"/.config/fish/functions/
|
||||
mkdir "$HOME"/.ssh
|
||||
# Custom config.fish
|
||||
rm "$HOME"/.config/fish/config.fish 2> /dev/null
|
||||
wget -q https://git.mylloon.fr/Anri/confOS/raw/branch/main/.config/fish/config_arch.fish -O "$HOME"/.config/fish/config.fish
|
||||
# Custom prompt shell (based on https://github.com/fish-shell/fish-shell/blob/master/share/tools/web_config/themes/Base16%20Eighties.theme)
|
||||
# Modifications: Changed comment color
|
||||
rm "$HOME"/.config/fish/functions/fish_prompt.fish 2> /dev/null
|
||||
wget -q https://git.mylloon.fr/Anri/confOS/raw/branch/main/.config/fish/functions/fish_prompt.fish -P "$HOME"/.config/fish/functions/
|
||||
fish -c "set -U fish_color_normal normal"
|
||||
fish -c "set -U fish_color_command 99cc99"
|
||||
fish -c "set -U fish_color_quote ffcc66"
|
||||
fish -c "set -U fish_color_redirection d3d0c8"
|
||||
fish -c "set -U fish_color_end cc99cc"
|
||||
fish -c "set -U fish_color_error f2777a"
|
||||
fish -c "set -U fish_color_param d3d0c8"
|
||||
fish -c "set -U fish_color_comment 5c6773"
|
||||
fish -c "set -U fish_color_match 6699cc"
|
||||
fish -c "set -U fish_color_selection white --bold --background=brblack"
|
||||
fish -c "set -U fish_color_search_match bryellow --background=brblack"
|
||||
fish -c "set -U fish_color_history_current --bold"
|
||||
fish -c "set -U fish_color_operator 6699cc"
|
||||
fish -c "set -U fish_color_escape 66cccc"
|
||||
fish -c "set -U fish_color_cwd green"
|
||||
fish -c "set -U fish_color_cwd_root red"
|
||||
fish -c "set -U fish_color_valid_path --underline"
|
||||
fish -c "set -U fish_color_autosuggestion 747369"
|
||||
fish -c "set -U fish_color_user brgreen"
|
||||
fish -c "set -U fish_color_host normal"
|
||||
fish -c "set -U fish_color_cancel -r"
|
||||
fish -c "set -U fish_pager_color_completion normal"
|
||||
fish -c "set -U fish_pager_color_description B3A06D yellow"
|
||||
fish -c "set -U fish_pager_color_prefix normal --bold --underline"
|
||||
fish -c "set -U fish_pager_color_progress brwhite --background=cyan"
|
||||
fish -c "set -U fish_pager_color_selected_background --background=brblack"
|
||||
fish -c "set -U fish_color_option d3d0c8"
|
||||
fish -c "set -U fish_color_keyword 99cc99"
|
||||
wget -q https://git.mylloon.fr/Anri/confOS/raw/branch/main/.config/fish/conf.d/promp_color.fish -O "$HOME"/.config/fish/conf.d/promp_color.fish
|
||||
# EXA colors
|
||||
fish -c "set -Ux EXA_COLORS 'di=1;36:da=35'"
|
||||
# Add aliases
|
||||
fish -c "abbr ls 'exa --git --icons -gl'"
|
||||
fish -c "abbr cp 'cp -rv'"
|
||||
fish -c "abbr rm 'rm -rf'"
|
||||
fish -c "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'"
|
||||
fish -c "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'"
|
||||
fish -c "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'"
|
||||
fish -c "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'"
|
||||
fish -c "abbr mmake 'clear; make && ./main; make clean 2> /dev/null'"
|
||||
fish -c "abbr vmake 'clear; make && valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes -s ./main; make clean 2> /dev/null'"
|
||||
fish -c "abbr activate 'source bin/activate.fish'"
|
||||
fish -c "abbr c 'command'"
|
||||
fish -c "abbr vs 'codium .'"
|
||||
fish -c "abbr code 'codium'"
|
||||
fish -c "abbr untgz 'tar xvzf'"
|
||||
fish -c "abbr tgz 'tar czf \"Archive.tar.gz\"'"
|
||||
fish -c "abbr - 'cd -'"
|
||||
fish -c "abbr cd.. 'cd ..'"
|
||||
fish -c "abbr ..2 'cd ../..'"
|
||||
fish -c "abbr ..3 'cd ../../..'"
|
||||
fish -c "abbr ..4 'cd ../../../..'"
|
||||
fish -c "abbr ..5 'cd ../../../../..'"
|
||||
fish -c "abbr cat 'bat'"
|
||||
fish -c "abbr nano 'micro'"
|
||||
fish -c "abbr bigupdate 'yay -Syu --noconfirm && tldr --update && yes | sdk update && yes | sdk upgrade java'"
|
||||
fish -c "abbr d 'nautilus . -w &> /dev/null & disown'"
|
||||
fish -c "abbr gc 'git clone'"
|
||||
fish -c "abbr cl 'cat src/**.* | sed \'/^\s*$/d\' | wc -l'"
|
||||
fish -c "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\""
|
||||
fish -c "abbr ocamlbuild 'ocamlbuild -no-hygiene'"
|
||||
fish -c "abbr opamupdate 'opam update && opam upgrade -y'"
|
||||
fish -c "abbr yay-rebuild 'checkrebuild | awk \'{print \$2}\' | xargs -r yay -S --rebuildtree --noconfirm'"
|
||||
fish -c "abbr pacman-clean 'sudo pacman -Rsn \$(pacman -Qqtd) --noconfirm'"
|
||||
fish -c "abbr diff 'delta'"
|
||||
fish -c "abbr grep 'grep -Irni \'txt\' .'"
|
||||
fish -c "abbr spotify 'spotify &> /dev/null & disown'"
|
||||
fish -c "abbr zip 'zip -r \"archive.zip\" dossier'"
|
||||
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
|
||||
|
||||
# Fish by default in terminal app
|
||||
local profil
|
||||
|
|
Loading…
Reference in a new issue