#!/bin/bash ################################################################################ # # themer # Installs/updates unofficial libadwaita themes for various programs # ################################################################################ # TODO: Tidy this up ######################################## # Install adw-gtk3 for legacy GTK3 applications echo "Installing adw-gtk3 theme for GTK3 applications..." # Download and install adw-gtk3 DOWNLOAD_URL=$(curl -s https://api.github.com/repos/lassekongo83/adw-gtk3/releases/latest | grep browser_download_url | cut -d '"' -f 4) wget "${DOWNLOAD_URL}" -O /tmp/adw-gtk3.tar tar xf /tmp/adw-gtk3.tar -C ${HOME}/.local/share/themes/ # Install adw-gtk3 for Flatpak applications sudo flatpak install --noninteractive org.gtk.Gtk3theme.adw-gtk3 org.gtk.Gtk3theme.adw-gtk3-dark # Apply adw-gtk3 theme to legacy applications gsettings set org.gnome.desktop.interface gtk-theme "adw-gtk3" # Ensure GTK2 applications still use regular Adwaita echo 'include "/usr/share/themes/Adwaita/gtk-2.0/gtkrc"' > ${HOME}/.gtkrc-2.0 ######################################## # Install Adwaita theme for Firefox echo "Installing Adwaita theme for Firefox..." curl -s -o- https://raw.githubusercontent.com/rafaelmardojai/firefox-gnome-theme/master/scripts/install-by-curl.sh | bash # Set user flags for theme echo "Configuring Adwaita theme for Firefox..." function set_ff_flag () { USER_JS_FILE=${HOME}/.mozilla/firefox/*.default-release/user.js sed -i 's/user_pref("'${1}'",.*);/user_pref("'${1}'",'${2}');/' $USER_JS_FILE grep -q ${1} $USER_JS_FILE || echo "user_pref(\"$1\",$2);" >> $USER_JS_FILE } set_ff_flag gnomeTheme.dragWindowHeaderbarButtons true set_ff_flag gnomeTheme.bookmarksToolbarUnderTabs true set_ff_flag gnomeTheme.hideSingleTab true set_ff_flag gnomeTheme.hideUnifiedExtensions true ######################################## # Install Adwaita theme for Steam echo "Installing Adwaita theme for Steam..." cd /tmp/ git clone https://github.com/tkashkin/Adwaita-for-Steam cd Adwaita-for-Steam ./install.py cd /tmp/