forked from GNOME/meld
-
Notifications
You must be signed in to change notification settings - Fork 121
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
161 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/bash -x | ||
|
||
set -o nounset | ||
set -o errexit | ||
set -o functrace | ||
|
||
trap "exit" INT | ||
failure() { | ||
local lineno=$1 | ||
local msg=$2 | ||
echo "Failed at $lineno: $msg" | ||
} | ||
trap 'failure ${LINENO} "$BASH_COMMAND"' ERR | ||
|
||
export PATH=$HOME/.new_local/bin:$HOME/gtk/inst/bin:$PATH | ||
|
||
#FIXME: This theme is pretty big and can be significantly reduced in size for our need. Perhaps ask for volunteers. | ||
|
||
curl -LSs https://raw.githubusercontent.com/vinceliuice/WhiteSur-gtk-theme/master/release/WhiteSur-Light-solid.tar.xz -o $HOME/Source/WhiteSur-Light-solid.tar.xz | ||
curl -LSs https://raw.githubusercontent.com/vinceliuice/WhiteSur-gtk-theme/master/release/WhiteSur-Dark-solid.tar.xz -o $HOME/Source/WhiteSur-Dark-solid.tar.xz | ||
|
||
(cd $HOME/Source && tar xf WhiteSur-Light-solid.tar.xz) | ||
(cd $HOME/Source && tar xf WhiteSur-Dark-solid.tar.xz) | ||
|
||
cp -RP $HOME/Source/WhiteSur-Light-solid $HOME/gtk/inst/share/themes | ||
cp -RP $HOME/Source/WhiteSur-Dark-solid $HOME/gtk/inst/share/themes | ||
|
||
cp $HOME/gtk/inst/share/themes/Mac/gtk-3.0/gtk-keys.css $HOME/Source/WhiteSur-Dark-solid/gtk-3.0/ | ||
cp $HOME/gtk/inst/share/themes/Mac/gtk-3.0/gtk-keys.css $HOME/Source/WhiteSur-Light-solid/gtk-3.0/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
#!/bin/bash -x | ||
|
||
set -o nounset | ||
set -o errexit | ||
set -o functrace | ||
|
||
trap "exit" INT | ||
failure() { | ||
local lineno=$1 | ||
local msg=$2 | ||
echo "Failed at $lineno: $msg" | ||
} | ||
trap 'failure ${LINENO} "$BASH_COMMAND"' ERR | ||
|
||
export PATH=$HOME/.new_local/bin:$HOME/gtk/inst/bin:$PATH | ||
|
||
#FIXME: This theme is pretty big and can be significantly reduced in size for our need. Perhaps ask for volunteers. | ||
|
||
curl -LSs https://codeload.github.com/vinceliuice/WhiteSur-icon-theme/tar.gz/refs/tags/2023-07-03 -o $HOME/Source/WhiteSur-icon-theme-2023-07-03.tar.gz | ||
(cd $HOME/Source && tar xf WhiteSur-icon-theme-2023-07-03.tar.gz) | ||
|
||
# Ths installer was never meant to install for macOS, so we have to craft our own version | ||
# based on what's inside the installer shell script. | ||
# This: | ||
# ./install -d $HOME/gtk/inst/share/icons -n Meld-WhiteSur-Icons | ||
# won't work for us.. | ||
|
||
# So the following is mostly based on install.sh that comes with the theme. | ||
|
||
SRC_DIR=$HOME/Source/WhiteSur-icon-theme-2023-07-03 | ||
theme="" | ||
color="-dark" | ||
|
||
THEME_NAME=Meld-WhiteSur-Icons | ||
name=$THEME_NAME | ||
THEME_DIR=$HOME/gtk/inst/share/icons/${THEME_NAME} | ||
dest=$HOME/gtk/inst/share/icons | ||
[[ -d ${THEME_DIR} ]] && rm -rf ${THEME_DIR} | ||
|
||
echo "Installing to '${THEME_DIR}'..." | ||
|
||
mkdir -p ${THEME_DIR} | ||
cp -RP "${SRC_DIR}"/{COPYING,AUTHORS} ${THEME_DIR} | ||
cp -RP "${SRC_DIR}"/src/index.theme ${THEME_DIR} | ||
|
||
#sed -i "s/WhiteSur/Meld-Icons/g" ${THEME_DIR}/index.theme | ||
|
||
mkdir -p ${THEME_DIR}/status | ||
cp -RP "${SRC_DIR}"/src/{actions,animations,apps,categories,devices,emblems,mimes,places} ${THEME_DIR} | ||
cp -RP "${SRC_DIR}"/src/status/{16,22,24,32,symbolic} ${THEME_DIR}/status | ||
|
||
cp -RP "${SRC_DIR}"/links/{actions,apps,categories,devices,emblems,mimes,places,status} ${THEME_DIR} | ||
|
||
if [[ ${theme} != '' ]]; then | ||
cp -RP "${SRC_DIR}"/colors/color${theme}/*.svg ${THEME_DIR}/places/scalable | ||
fi | ||
|
||
if [[ ${color} == '-dark' ]]; then | ||
mkdir -p ${THEME_DIR}/{apps,categories,emblems,devices,mimes,places,status} | ||
|
||
cp -RP "${SRC_DIR}"/src/actions ${THEME_DIR} | ||
cp -RP "${SRC_DIR}"/src/apps/symbolic ${THEME_DIR}/apps | ||
cp -RP "${SRC_DIR}"/src/categories/symbolic ${THEME_DIR}/categories | ||
cp -RP "${SRC_DIR}"/src/emblems/symbolic ${THEME_DIR}/emblems | ||
cp -RP "${SRC_DIR}"/src/mimes/symbolic ${THEME_DIR}/mimes | ||
cp -RP "${SRC_DIR}"/src/devices/{16,22,24,symbolic} ${THEME_DIR}/devices | ||
cp -RP "${SRC_DIR}"/src/places/{16,22,24,symbolic} ${THEME_DIR}/places | ||
cp -RP "${SRC_DIR}"/src/status/{16,22,24,symbolic} ${THEME_DIR}/status | ||
|
||
if [[ ${bold:-} == 'true' ]]; then | ||
cp -RP "${SRC_DIR}"/bold/* ${THEME_DIR} | ||
fi | ||
|
||
# if [[ $DESKTOP_SESSION == '/usr/share/xsessions/budgie-desktop' ]]; then | ||
# cp -RP "${SRC_DIR}"/src/status/symbolic-budgie/*.svg ${THEME_DIR}/status/symbolic | ||
# fi | ||
|
||
# Change icon color for dark theme | ||
sed -i "s/#363636/#dedede/g" "${THEME_DIR}"/{actions,devices,places,status}/{16,22,24}/* || true | ||
sed -i "s/#363636/#dedede/g" "${THEME_DIR}"/actions/32/* || true | ||
sed -i "s/#363636/#dedede/g" "${THEME_DIR}"/{actions,apps,categories,emblems,devices,mimes,places,status}/symbolic/* "" || true | ||
|
||
cp -RP "${SRC_DIR}"/links/actions/{16,22,24,32,symbolic} ${THEME_DIR}/actions | ||
cp -RP "${SRC_DIR}"/links/devices/{16,22,24,symbolic} ${THEME_DIR}/devices | ||
cp -RP "${SRC_DIR}"/links/places/{16,22,24,symbolic} ${THEME_DIR}/places | ||
cp -RP "${SRC_DIR}"/links/status/{16,22,24,symbolic} ${THEME_DIR}/status | ||
cp -RP "${SRC_DIR}"/links/apps/symbolic ${THEME_DIR}/apps | ||
cp -RP "${SRC_DIR}"/links/categories/symbolic ${THEME_DIR}/categories | ||
cp -RP "${SRC_DIR}"/links/mimes/symbolic ${THEME_DIR}/mimes | ||
|
||
#TODO: Those are breaking.. Later though when we have some time.. | ||
# cd ${dest} | ||
# ln -s ../${name}${theme}/animations ${name}${theme}-dark/animations | ||
# ln -s ../../${name}${theme}/categories/32 ${name}${theme}-dark/categories/32 | ||
# ln -s ../../${name}${theme}/emblems/16 ${name}${theme}-dark/emblems/16 | ||
# ln -s ../../${name}${theme}/emblems/22 ${name}${theme}-dark/emblems/22 | ||
# ln -s ../../${name}${theme}/emblems/24 ${name}${theme}-dark/emblems/24 | ||
# ln -s ../../${name}${theme}/mimes/16 ${name}${theme}-dark/mimes/16 | ||
# ln -s ../../${name}${theme}/mimes/22 ${name}${theme}-dark/mimes/22 | ||
# ln -s ../../${name}${theme}/mimes/scalable ${name}${theme}-dark/mimes/scalable | ||
# ln -s ../../${name}${theme}/apps/scalable ${name}${theme}-dark/apps/scalable | ||
# ln -s ../../${name}${theme}/devices/scalable ${name}${theme}-dark/devices/scalable | ||
# ln -s ../../${name}${theme}/places/scalable ${name}${theme}-dark/places/scalable | ||
# ln -s ../../${name}${theme}/status/32 ${name}${theme}-dark/status/32 | ||
fi | ||
|
||
( | ||
cd ${THEME_DIR} | ||
ln -sf actions actions@2x | ||
ln -sf animations animations@2x | ||
ln -sf apps apps@2x | ||
ln -sf categories categories@2x | ||
ln -sf devices devices@2x | ||
ln -sf emblems emblems@2x | ||
ln -sf mimes mimes@2x | ||
ln -sf places places@2x | ||
ln -sf status status@2x | ||
) | ||
|
||
gtk-update-icon-cache ${THEME_DIR} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters