diff --git a/arch.sh b/arch.sh index a66c62e..60f16ad 100644 --- a/arch.sh +++ b/arch.sh @@ -95,23 +95,31 @@ main() { # Add aliases wget -q https://git.mylloon.fr/Anri/confOS/raw/branch/main/.config/fish/conf.d/alias.fish -O "$HOME"/.config/fish/conf.d/alias.fish - # Default theme in Gnome Terminal - local profil - profil=$(gsettings get org.gnome.Terminal.ProfilesList default | tr -d \') - gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:"${profil}"/ use-custom-command true - gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:"${profil}"/ custom-command "fish" - # Default colors - gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:"${profil}"/ use-theme-colors "false" - gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:"${profil}"/ foreground-color "rgb(211,208,200)" - gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:"${profil}"/ background-color "rgb(45,45,45)" - # Size and font - gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:"${profil}"/ use-system-font false - gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:"${profil}"/ default-size-columns 105 - gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:"${profil}"/ default-size-rows 25 - gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:"${profil}"/ font "MesloLGM Nerd Font 12" - gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:"${profil}"/ use-system-font false - # Duplicate the default profile to create a light theme - # TODO + # Default themes in Gnome Terminal + local GT_default GT_light + GT_default=$(gsettings get org.gnome.Terminal.ProfilesList default | tr -d \') + GT_light=$(uuidgen) + gsettings set org.gnome.Terminal.ProfilesList list "['${GT_default}', '${GT_light}']" + GT_profiles=("${GT_default}" "${GT_light}") + for profile in "${GT_profiles[@]}" + do + gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:"${profile}"/ use-custom-command true + gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:"${profile}"/ custom-command "fish" + # Default colors + gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:"${profile}"/ use-theme-colors "false" + # Size and font + gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:"${profile}"/ use-system-font false + gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:"${profile}"/ default-size-columns 105 + gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:"${profile}"/ default-size-rows 25 + gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:"${profile}"/ font "MesloLGM Nerd Font 12" + gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:"${profile}"/ use-system-font false + done + # Dark theme + gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:"${GT_default}"/ visible-name 'Dark' + gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:"${GT_default}"/ foreground-color "rgb(211,208,200)" + gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:"${GT_default}"/ background-color "rgb(45,45,45)" + # Light theme + gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:"${GT_light}"/ visible-name 'Light' # Keybinds gsettings set org.gnome.Terminal.Legacy.Keybindings:/org/gnome/terminal/legacy/keybindings/ close-tab "w" @@ -267,8 +275,6 @@ main() { gsettings set org.gnome.desktop.peripherals.mouse speed -0.6 # mouse speed gsettings --schemadir /usr/share/gnome-shell/extensions/nightthemeswitcher@romainvigier.fr/schemas/ set org.gnome.shell.extensions.nightthemeswitcher.gtk-variants enabled true # enable GTK theme to change gsettings --schemadir /usr/share/gnome-shell/extensions/nightthemeswitcher@romainvigier.fr/schemas/ set org.gnome.shell.extensions.nightthemeswitcher.commands sunset "set org.gnome.desktop.wm.preferences theme Dracula" # change gtk theme to dark at sunset - # gsettings --schemadir /usr/share/gnome-shell/extensions/nightthemeswitcher@romainvigier.fr/schemas/ set org.gnome.shell.extensions.nightthemeswitcher.shell-variants enabled true # change shell theme to dark at sunset - # gsettings --schemadir /usr/share/gnome-shell/extensions/nightthemeswitcher@romainvigier.fr/schemas/ set org.gnome.shell.extensions.nightthemeswitcher.shell-variants day "TODO" # change shell theme at sunrise # Default app Nautilus sed -i "s/inode\/directory=nautilus.desktop/inode\/directory=org.gnome.Nautilus.desktop/g" "$HOME"/.config/mimeapps.list