65 lines
2.1 KiB
Bash
Executable File
65 lines
2.1 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
################################################################################
|
|
#
|
|
# themer
|
|
# Installs/updates unofficial libadwaita themes for various programs
|
|
#
|
|
################################################################################
|
|
|
|
########################################
|
|
# Install adw-gtk3 for legacy GTK3 applications
|
|
|
|
echo
|
|
echo "*** Installing adw-gtk3 theme for GTK3 applications... ***"
|
|
echo
|
|
|
|
# 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
|
|
mkdir -p ${HOME}/.local/share/themes
|
|
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
|
|
echo "*** Installing Adwaita theme for Firefox... ***"
|
|
echo
|
|
|
|
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
|
|
|
|
########################################
|
|
# Install Adwaita theme for Steam
|
|
|
|
echo
|
|
echo "*** Installing Adwaita theme for Steam... ***"
|
|
echo
|
|
|
|
cd /tmp/
|
|
rm -rf ./Adwaita-for-Steam/
|
|
git clone https://github.com/tkashkin/Adwaita-for-Steam
|
|
cd ./Adwaita-for-Steam/
|
|
./install.py --font-install
|
|
cd /tmp/
|