2023-05-30 22:07:01 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
#
|
|
|
|
# themer
|
|
|
|
# Installs/updates unofficial libadwaita themes for various programs
|
|
|
|
#
|
|
|
|
################################################################################
|
|
|
|
|
|
|
|
########################################
|
|
|
|
# Install adw-gtk3 for legacy GTK3 applications
|
|
|
|
|
2023-06-01 15:03:10 +00:00
|
|
|
echo
|
|
|
|
echo "*** Installing adw-gtk3 theme for GTK3 applications... ***"
|
|
|
|
echo
|
2023-05-30 22:07:01 +00:00
|
|
|
|
|
|
|
# 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)
|
2023-06-01 10:33:37 +00:00
|
|
|
wget "${DOWNLOAD_URL}" -O /tmp/adw-gtk3.tar
|
2023-06-02 12:50:30 +00:00
|
|
|
mkdir -p ${HOME}/.local/share/themes
|
2023-06-01 10:33:37 +00:00
|
|
|
tar xf /tmp/adw-gtk3.tar -C ${HOME}/.local/share/themes/
|
2023-05-30 22:07:01 +00:00
|
|
|
|
|
|
|
# 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
|
|
|
|
|
2023-06-01 15:03:10 +00:00
|
|
|
echo
|
|
|
|
echo "*** Installing Adwaita theme for Firefox... ***"
|
|
|
|
echo
|
|
|
|
|
2023-05-30 22:07:01 +00:00
|
|
|
curl -s -o- https://raw.githubusercontent.com/rafaelmardojai/firefox-gnome-theme/master/scripts/install-by-curl.sh | bash
|
|
|
|
|
|
|
|
# Set user flags for theme
|
|
|
|
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
|
|
|
|
|
2023-06-01 15:03:10 +00:00
|
|
|
echo
|
|
|
|
echo "*** Installing Adwaita theme for Steam... ***"
|
|
|
|
echo
|
|
|
|
|
2023-05-30 22:07:01 +00:00
|
|
|
cd /tmp/
|
2023-06-01 15:03:10 +00:00
|
|
|
rm -rf ./Adwaita-for-Steam/
|
2023-05-30 22:07:01 +00:00
|
|
|
git clone https://github.com/tkashkin/Adwaita-for-Steam
|
2023-06-01 15:03:10 +00:00
|
|
|
cd ./Adwaita-for-Steam/
|
|
|
|
./install.py --font-install
|
2023-05-30 22:07:01 +00:00
|
|
|
cd /tmp/
|