2022-06-04 02:14:25 +02:00
#!/usr/bin/env bash
if grep "archlinux" /proc/version > /dev/null;
then
2022-06-06 15:37:15 +02:00
# === Remove extra packages ==
2022-07-31 22:08:11 +02:00
pacman -D --asexplicit archlinux-keyring # Keep this package
2022-07-28 23:11:44 +02:00
pacman -Rsn epiphany gnome-maps cheese gnome-weather gnome-music gnome-books vim gnome-boxes gnome-photos malcontent gnome-contacts totem " $( pacman -Qqtd) " --noconfirm
# gnome-firefox, maps, caméra, météo, musique, liseuse, vim, machines, photos, parental control, contacts, vidéos, dependencies
2022-06-06 15:37:15 +02:00
2022-06-04 02:14:25 +02:00
# === Colors package manager ==
2022-06-06 18:06:40 +02:00
sed -i 's/#Color/Color/g' /etc/pacman.conf
2022-06-04 02:14:25 +02:00
# === Yay ==
git clone https://aur.archlinux.org/yay.git
cd yay || exit
makepkg -si --noconfirm
# Remove folder
cd ..
rm -rf yay
2022-08-04 19:12:57 +02:00
# Enable *-git package updates
yay -Y --devel --save
2022-06-04 02:14:25 +02:00
2022-06-06 15:37:15 +02:00
# === AUR packages ==
2022-08-03 10:16:40 +02:00
yay -S --noconfirm spotify obsidian parsec-bin onlyoffice-bin x11-emoji-picker-git gnome-shell-extension-dash-to-dock gnome-shell-extension-desktop-icons-ng dracula-gtk-theme dracula-icons-git vscodium-bin ttf-symbola gnome-shell-extension-appindicator-git touchegg gnome-shell-extension-x11gestures gnome-shell-extension-no-overview nerd-fonts-meslo webcord-git
2022-06-06 15:37:15 +02:00
2022-06-04 02:14:25 +02:00
# === Disable wayland ==
2022-06-06 18:06:40 +02:00
sed -i 's/#Wayland/Wayland/g' /etc/gdm/custom.conf
2022-06-04 02:14:25 +02:00
2022-06-06 16:44:10 +02:00
# === Locales ==
2022-06-06 18:06:40 +02:00
sed -i 's/fr_FR.UTF-8.UTF-8 UTF-8/fr_FR.UTF8 UTF-8/g' /etc/locale.gen
locale-gen
2022-06-06 17:36:19 +02:00
localectl set-locale fr_FR.UTF-8
2022-06-06 16:44:10 +02:00
2022-06-04 02:14:25 +02:00
# === Fish ==
# Remove motd
fish -c "set -U fish_greeting"
# Reversed search
curl -sL https://git.io/fisher | fish -c "source && fisher install jorgebucaran/fisher"
fish -c "fisher install jethrokuan/fzf"
# 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
2022-06-05 20:29:35 +02:00
wget -q https://git.kennel.ml/Anri/confOS/raw/branch/main/.config/fish/config_arch.fish -O " $HOME " /.config/fish/config.fish
2022-07-19 01:00:02 +02:00
# 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
2022-06-04 02:14:25 +02:00
rm " $HOME " /.config/fish/functions/fish_prompt.fish 2> /dev/null
wget -q https://git.kennel.ml/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"
2022-07-19 01:00:02 +02:00
fish -c "set -U fish_color_comment 5c6773"
2022-06-04 02:14:25 +02:00
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"
2022-07-19 01:00:02 +02:00
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"
2022-07-21 12:52:30 +02:00
# EXA colors
fish -c "set -Ux EXA_COLORS 'di=1;36:da=35'"
2022-06-04 02:14:25 +02:00
# Add aliases
2022-08-12 18:26:03 +02:00
fish -c "abbr ls 'exa --git --icons -gl'"
2022-06-04 02:14:25 +02:00
fish -c "abbr cp 'cp -rv'"
fish -c "abbr rm 'rm -rf'"
fish -c "abbr gcc 'clear; gcc -Wall -Wextra -Wshadow -Wcast-align -Wstrict-prototypes -fanalyzer -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 -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 g++ '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 make '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'"
2022-07-30 01:24:17 +02:00
fish -c "abbr vs 'codium .'"
fish -c "abbr code 'codium'"
2022-06-04 02:14:25 +02:00
fish -c "abbr untgz 'tar -xvzf'"
fish -c "abbr - 'cd -'"
fish -c "abbr cat 'bat'"
fish -c "abbr nano 'micro'"
2022-08-09 22:07:01 +02:00
fish -c "abbr bigupdate 'yay -Syu --noconfirm && tldr --update && yes | sdk update && yes | sdk upgrade java'"
2022-06-04 02:14:25 +02:00
fish -c "abbr d 'nautilus . -w &> /dev/null & disown'"
fish -c "abbr spotify 'LD_PRELOAD=/usr/local/lib/spotify-adblock.so spotify &> /dev/null & disown'"
2022-07-24 10:26:29 +02:00
fish -c "abbr gc 'git clone'"
2022-06-04 02:14:25 +02:00
# Fish by default in terminal app
profil = $( gsettings get org.gnome.Terminal.ProfilesList list)
2022-06-04 11:21:36 +02:00
gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:" ${ profil : 2 :- 2 } " / use-custom-command true
gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:" ${ profil : 2 :- 2 } " / custom-command "fish"
2022-06-04 02:14:25 +02:00
# Default colors
2022-06-04 11:21:36 +02:00
gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:" ${ profil : 2 :- 2 } " / use-theme-colors "false"
gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:" ${ profil : 2 :- 2 } " / foreground-color "rgb(211,208,200)"
gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:" ${ profil : 2 :- 2 } " / background-color "rgb(45,45,45)"
2022-08-03 10:16:40 +02:00
# Size and font
2022-06-05 03:41:36 +02:00
gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:" ${ profil : 2 :- 2 } " / use-system-font false
gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:" ${ profil : 2 :- 2 } " / default-size-columns 100
2022-08-03 10:16:40 +02:00
gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:" ${ profil : 2 :- 2 } " / default-size-rows 25
gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:" ${ profil : 2 :- 2 } " / font "MesloLGM Nerd Font 12"
gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:" ${ profil : 2 :- 2 } " / use-system-font false
2022-06-18 17:51:33 +02:00
# Keybinds
gsettings set org.gnome.Terminal.Legacy.Keybindings:/org/gnome/terminal/legacy/keybindings/ close-tab '<Control>w'
gsettings set org.gnome.Terminal.Legacy.Keybindings:/org/gnome/terminal/legacy/keybindings/ new-tab '<Control>t'
gsettings set org.gnome.Terminal.Legacy.Keybindings:/org/gnome/terminal/legacy/keybindings/ zoom-in '<Control>equal' # ctrl++
gsettings set org.gnome.Terminal.Legacy.Keybindings:/org/gnome/terminal/legacy/keybindings/ zoom-normal '<Control>agrave' # ctrl+0
2022-06-04 02:14:25 +02:00
2022-07-24 22:28:44 +02:00
# === Micro configuration ==
git config --global core.editor "micro"
2022-08-04 19:18:43 +02:00
set -Ux EDITOR micro
2022-07-24 22:31:46 +02:00
wget -q --show-progress https://git.kennel.ml/Anri/confOS/raw/branch/main/.config/micro/settings.json -O " $HOME " /.config/micro/settings.json
2022-07-24 22:37:38 +02:00
micro -plugin install detectindent
2022-07-24 22:28:44 +02:00
2022-06-04 02:14:25 +02:00
# === GL4D ==
2022-08-04 01:17:56 +02:00
# Download, build and installation
2022-06-04 02:14:25 +02:00
git clone https://github.com/noalien/GL4Dummies.git
cd GL4Dummies || exit
make -f Makefile.autotools
./configure
make
2022-06-06 18:06:40 +02:00
make install
2022-06-04 02:14:25 +02:00
cd ..
rm -rf GL4Dummies
# Fix for shared libraries (https://stackoverflow.com/a/9395355)
2022-06-06 18:06:40 +02:00
ldconfig
2022-06-04 02:14:25 +02:00
# Add to path
2022-08-04 01:17:56 +02:00
fish -c "set -Ua LD_LIBRARY_PATH /usr/local/lib"
2022-06-04 02:14:25 +02:00
# === Sign commits ==
git config --global commit.gpgsign true
# === Rust ==
2022-08-04 01:17:56 +02:00
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
2022-06-04 02:14:25 +02:00
source " $HOME " /.cargo/env
# Dev tools
rustup component add rust-analysis
rustup component add rls
# === tldr ==
cargo install tealdeer
tldr --update
# Fish completion
latest = $( wget -qO- https://api.github.com/repos/dbrgn/tealdeer/releases/latest)
url = $( grep 'browser_download_url": ".*/completions_fish"' <<< " $latest " | awk '{ print substr ($0, 32 ) }' | awk '{ print substr( $0, 1, length($0)-1 ) }' )
wget -q --show-progress " $url " -O completions_fish
mv completions_fish ~/.config/fish/completions/tldr.fish
2022-06-06 15:37:15 +02:00
# === Spotify no-ads mod ==
2022-06-04 02:14:25 +02:00
git clone https://github.com/abba23/spotify-adblock.git
cd spotify-adblock || exit
make
2022-06-06 18:06:40 +02:00
make install
2022-06-04 02:14:25 +02:00
cd ..
rm -rf spotify-adblock
2022-07-14 01:45:36 +02:00
# Remove banner and upgrade button
cd " $( dirname " $( realpath -L " $( which spotify) " ) " ) " /Apps || exit # absolute path to Spotify
unzip xpui.spa xpui.js -d .
sed -i 's/adsEnabled:!0/adsEnabled:!1/' xpui.js # disable empty ad block (banner)
sed -i 's/.\>\=1024/ 1!=1 /' xpui.js # disable Upgrade Buton
sed -i "s/((?:\"a\"))\S+noopener nofollow.+?,.)/\$1/" xpui.js # disable Premium NavLink button
2022-06-06 18:06:40 +02:00
zip --update xpui.spa xpui.js
rm xpui.js
2022-07-14 01:45:36 +02:00
cd - > /dev/null || exit
# Add desktop shortcut
2022-07-14 01:46:58 +02:00
wget -q --show-progress https://git.kennel.ml/Anri/confOS/raw/branch/main/.local/share/applications/spotify.desktop -P " $HOME " /.local/share/applications/
2022-06-04 02:14:25 +02:00
# === Syncthing ==
2022-06-06 18:06:40 +02:00
systemctl enable syncthing@" $USER " .service
systemctl start syncthing@" $USER " .service
2022-06-04 02:14:25 +02:00
# === Flameshot ==
# Custom configuration
rm " $HOME " /.config/flameshot/flameshot.ini 2> /dev/null
wget -q --show-progress https://git.kennel.ml/Anri/confOS/raw/branch/main/.config/flameshot/flameshot.ini -P " $HOME " /.config/flameshot/
# Change keybindings
2022-06-04 02:58:45 +02:00
gsettings set org.gnome.shell.keybindings show-screenshot-ui "[]"
2022-06-04 02:14:25 +02:00
CUSTOM_KEYBINDINGS_LIST = $( gsettings get org.gnome.settings-daemon.plugins.media-keys custom-keybindings)
if [ [ $CUSTOM_KEYBINDINGS_LIST = = "@as []" ] ] # creating new list if not exists
then
CUSTOM_KEYBINDINGS_LIST = "['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/flameshot-shortcut/']"
else # if already existing, adding our new element
CUSTOM_KEYBINDINGS_LIST = " ${ CUSTOM_KEYBINDINGS_LIST : :- 1 } , '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/flameshot-shortcut/'] "
fi
gsettings set org.gnome.settings-daemon.plugins.media-keys custom-keybindings " $CUSTOM_KEYBINDINGS_LIST "
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/flameshot-shortcut/ name "Flameshot" # set name
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/flameshot-shortcut/ command "flameshot gui" # set command
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/flameshot-shortcut/ binding "Print" # set key
# === Emoji picker ==
# Custom configuration
rm " $HOME " /.config/gazatu.xyz/emoji-picker.ini 2>/dev/null
wget -q --show-progress https://git.kennel.ml/Anri/confOS/raw/branch/main/.config/gazatu.xyz/emoji-picker.ini -P " $HOME " /.config/gazatu.xyz/
# Add keybinding
CUSTOM_KEYBINDINGS_LIST = $( gsettings get org.gnome.settings-daemon.plugins.media-keys custom-keybindings)
if ! echo " $CUSTOM_KEYBINDINGS_LIST " | grep -q "x11-emoji-picker"
then
if [ " $CUSTOM_KEYBINDINGS_LIST " = "@as []" ] # creating new list if not exists
then
CUSTOM_KEYBINDINGS_LIST = "['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/x11-emoji-picker/']"
else # if already existing, adding our new element
CUSTOM_KEYBINDINGS_LIST = $( echo " $CUSTOM_KEYBINDINGS_LIST " | sed 's/\[//' | sed 's/\]//' )
CUSTOM_KEYBINDINGS_LIST = " [ $CUSTOM_KEYBINDINGS_LIST , '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/x11-emoji-picker/'] "
fi
gsettings set org.gnome.settings-daemon.plugins.media-keys custom-keybindings " $CUSTOM_KEYBINDINGS_LIST " # update the list
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/x11-emoji-picker/ name "Emoji-Picker" # set name
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/x11-emoji-picker/ command "emoji-picker" # set command
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/x11-emoji-picker/ binding "<Super>period" # set shortcut
fi
# === Gnome configuration ==
# Nautilus keybinding
CUSTOM_KEYBINDINGS_LIST = $( gsettings get org.gnome.settings-daemon.plugins.media-keys custom-keybindings)
if [ [ $CUSTOM_KEYBINDINGS_LIST = = "@as []" ] ] # creating new list if not exists
then
CUSTOM_KEYBINDINGS_LIST = "['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/nautilus-shortcut/']"
else # if already existing, adding our new element
CUSTOM_KEYBINDINGS_LIST = " ${ CUSTOM_KEYBINDINGS_LIST : :- 1 } , '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/nautilus-shortcut/'] "
fi
gsettings set org.gnome.settings-daemon.plugins.media-keys custom-keybindings " $CUSTOM_KEYBINDINGS_LIST " # updating the list
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/nautilus-shortcut/ name "Nautilus" # set name
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/nautilus-shortcut/ command "nautilus -w" # set command
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/nautilus-shortcut/ binding "<Super>E" # set shortcut
gsettings set org.gnome.shell.extensions.dash-to-dock click-action minimize # add minimized window on dock click
2022-06-04 02:58:45 +02:00
gsettings set org.gnome.shell.extensions.dash-to-dock show-trash false # add Dash to Dock
gsettings set org.gnome.desktop.wm.preferences button-layout ":minimize,maximize,close" # affiche les boutons maximisé et minimisé
gsettings set org.gnome.desktop.wm.preferences audible-bell false # remove sound of notification when going too far away in a window
gsettings set org.gnome.desktop.wm.keybindings close "['<Super>Q', '<Alt>F4']" # Alt-F4 keybinding
2022-06-04 02:14:25 +02:00
gsettings set org.gnome.desktop.wm.keybindings switch-windows "['<Alt>Tab', '<Super>Tab']" # new behaviour
gsettings set org.gnome.desktop.wm.keybindings switch-applications "[]" # old behaviour
2022-06-06 18:24:05 +02:00
gsettings set org.gnome.desktop.interface clock-show-seconds true # affiche les secondes dans l'horloge
2022-06-04 02:58:45 +02:00
gsettings set org.gnome.desktop.interface show-battery-percentage true # show battery poucentage
2022-06-18 18:55:00 +02:00
gsettings set org.gnome.desktop.interface enable-hot-corners false # disable top-right corner "activities"
2022-06-04 02:14:25 +02:00
gsettings set org.gnome.desktop.background show-desktop-icons true # show icons on desktop
gsettings set org.gnome.nautilus.preferences show-image-thumbnails 'always' # thumbnails nautilus
2022-07-08 23:30:39 +02:00
gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-type 'nothing' # no sleep on AC
2022-06-04 02:58:45 +02:00
gsettings set org.gnome.settings-daemon.plugins.color night-light-enabled true # mode "nuit" (lumière bleue)
2022-06-04 16:10:37 +02:00
gsettings set org.gnome.desktop.peripherals.touchpad click-method areas # right click on laptop
2022-06-18 17:16:57 +02:00
gsettings set org.gnome.desktop.peripherals.mouse speed -0.6 # mouse speed
2022-06-04 02:58:45 +02:00
2022-06-04 16:03:51 +02:00
# Theme
2022-06-05 03:28:54 +02:00
gsettings set org.gnome.desktop.interface color-scheme prefer-dark
2022-06-05 03:34:54 +02:00
gsettings set org.gnome.desktop.interface gtk-theme Dracula
2022-06-04 16:03:51 +02:00
gsettings set org.gnome.desktop.wm.preferences theme Dracula
2022-06-05 03:38:42 +02:00
gsettings set org.gnome.desktop.interface icon-theme "Dracula"
2022-07-24 12:14:13 +02:00
gsettings set org.gnome.gedit.preferences.editor scheme "oblivion"
2022-06-04 16:03:51 +02:00
2022-06-04 02:58:45 +02:00
# Add gesture
2022-06-06 18:06:40 +02:00
systemctl enable touchegg.service
systemctl start touchegg
2022-06-04 02:14:25 +02:00
2022-06-08 22:06:48 +02:00
# Extensions (currently not working ... need to enable them manually after the reboot)
gnome-extensions enable dash-to-dock@micxgx.gmail.com
gnome-extensions enable ding@rastersoft.com
gnome-extensions enable x11gestures@joseexposito.github.io
2022-06-06 02:41:29 +02:00
gnome-extensions enable appindicatorsupport@rgcjonas.gmail.com
2022-06-08 22:06:48 +02:00
gnome-extensions enable no-overview@fthx
2022-06-04 15:46:58 +02:00
2022-06-06 15:37:15 +02:00
# === Clipboard manager ==
2022-06-05 03:48:12 +02:00
gsettings set org.gnome.shell.keybindings toggle-message-tray "[]"
2022-06-04 15:46:58 +02:00
CUSTOM_KEYBINDINGS_LIST = $( gsettings get org.gnome.settings-daemon.plugins.media-keys custom-keybindings)
if [ [ $CUSTOM_KEYBINDINGS_LIST = = "@as []" ] ] # creating new list if not exists
then
CUSTOM_KEYBINDINGS_LIST = "['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/clipboard-shortcut/']"
else # if already existing, adding our new element
CUSTOM_KEYBINDINGS_LIST = " ${ CUSTOM_KEYBINDINGS_LIST : :- 1 } , '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/clipboard-shortcut/'] "
fi
gsettings set org.gnome.settings-daemon.plugins.media-keys custom-keybindings " $CUSTOM_KEYBINDINGS_LIST " # updating the list
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/clipboard-shortcut/ name "Copyq" # set name
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/clipboard-shortcut/ command "copyq show" # set command
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/clipboard-shortcut/ binding "<Super>V" # set shortcut
2022-06-04 02:14:25 +02:00
copyq > /dev/null & disown
copyq config autostart true
2022-07-24 10:59:25 +02:00
echo 'style_main_window=true' >> /usr/share/copyq/themes/dark.ini
2022-07-24 10:37:59 +02:00
copyq loadTheme /usr/share/copyq/themes/dark.ini
2022-06-04 02:14:25 +02:00
# === Power plan ==
2022-06-06 18:06:40 +02:00
systemctl enable tlp.service
systemctl mask systemd-rfkill.service
systemctl mask systemd-rfkill.socket
2022-06-04 02:14:25 +02:00
# === Java ==
curl -s "https://get.sdkman.io" | bash
source " $HOME /.sdkman/bin/sdkman-init.sh "
if [ -x " $HOME " /.config/fish ] ; then
if [ ! -f " $HOME " /.config/fish/functions/fisher.fish ] ; then # install fisher if not already installed
curl -sL https://git.io/fisher | fish -c 'source && fisher install jorgebucaran/fisher'
fi
fish -c 'fisher install reitzig/sdkman-for-fish'
fi
2022-08-04 19:29:05 +02:00
sdk install java 17.0.4-tem # https://whichjdk.com/#adoptium-eclipse-temurin
2022-08-03 10:31:31 +02:00
yes | sdk upgrade java
2022-06-04 02:14:25 +02:00
# === UBW (pare-feu) ==
2022-06-06 18:06:40 +02:00
ufw enable
2022-06-04 02:14:25 +02:00
2022-06-05 19:20:22 +02:00
# === Firefox ==
2022-06-06 18:48:38 +02:00
firefox &
sleep 2
pkill firefox
2022-06-05 19:20:22 +02:00
wget -q --show-progress https://git.kennel.ml/Anri/confOS/raw/branch/main/.mozilla/firefox/user.js -P " $HOME " /.mozilla/firefox/*.default-release
2022-06-05 21:48:49 +02:00
# === Manual color ==
2022-06-06 16:16:11 +02:00
fish -c "set -Ux MANPAGER \"sh -c 'col -bx | bat -l man -p'\""
2022-06-05 21:48:49 +02:00
2022-06-06 21:47:39 +02:00
# === Docker ==
systemctl enable docker.service
systemctl start docker.service
usermod -aG docker " $USER "
2022-06-06 17:36:19 +02:00
# === Unused icons ==
2022-07-14 01:45:36 +02:00
apps = ( "fish" "cmake-gui" "com.github.hluk.copyq" "electron17" "org.gnome.Evince" "avahi-discover" "bssh" "bvnc" "org.flameshot.Flameshot" "org.fontforge.FontForge" "lstopo" "htop" "micro" "qv4l2" "qvidcap" "x11-emoji-picker" "xdvi" "yelp" "spotify" )
2022-06-06 17:36:19 +02:00
for app in " ${ apps [@] } "
do
if [ -f /usr/share/applications/" $app " .desktop ]
then
2022-06-06 18:06:40 +02:00
mv /usr/share/applications/" $app " .desktop /usr/share/applications/" $app " .desktop.bak
2022-06-06 17:36:19 +02:00
fi
done
2022-07-10 11:47:38 +02:00
# === Enable Bluetooth ==
systemctl enable bluetooth.service
systemctl start bluetooth.service
2022-07-30 01:24:17 +02:00
# === VSCodium ==
wget -q https://git.kennel.ml/Anri/confOS/raw/branch/main/.config/VSCodium/product.json -P " $HOME " /.config/VSCodium/
2022-06-06 16:16:11 +02:00
echo -e "\nInstallation terminée.\nIl faut redémarrer l'ordinateur.\nPensez à activer les extensions après redémarrage."
2022-06-04 02:14:25 +02:00
else
2022-08-04 01:17:56 +02:00
echo "Ce script ne fonctionne que sur Arch."
2022-06-04 02:14:25 +02:00
fi