1 Star 1 Fork 0

Sekiro/intellij-colors-solarized

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
buildjar.sh 3.11 KB
一键复制 编辑 原始数据 按行查看 历史
#!/bin/bash
# Create a Darcula version of the specified color scheme.
#
# Usage:
# createDarculaVersion sourceFile targetFile
#
function createDarculaVersion {
cp "${1}" "${2}"
# Append " (Darcula)" to the name of the scheme
sed -i'.orig' -e 's/\(<scheme name="[^"]*\)\(" .*\)/\1 \(Darcula\)\2/' "${2}"
# Remove any existing FILESTATUS elements
sed -i'.orig' -e '/<option name="FILESTATUS_/d' "${2}"
# Replace the notification background
sed -i'.orig' -e 's/<option name="NOTIFICATION_BACKGROUND.*$/<option name="NOTIFICATION_BACKGROUND" value="73642" \/>/' "${2}"
# Use Darcula parent theme
sed -i'.orig' -e 's/\(parent_scheme\)="[^"]*"/\1="Darcula"/' "${2}"
# Fix static methods
sed -i'.orig' -e 's/<\/attributes>/<option name="DEFAULT_STATIC_METHOD"><value><option name="FONT_TYPE" value="2" \/><\/value><\/option><\/attributes>/' "${2}"
# Special handling for Solarized Dark
if [[ ${2} =~ .*Dark.* ]]
then
# Function declarations
sed -i'.orig' -e 's/<\/attributes>/<option name="DEFAULT_FUNCTION_DECLARATION"><value><option name="FOREGROUND" value="839496" \/><\/value><\/option><\/attributes>/' "${2}"
# Instance methods
sed -i'.orig' -e 's/<\/attributes>/<option name="DEFAULT_INSTANCE_METHOD"><value><option name="FOREGROUND" value="839496" \/><\/value><\/option><\/attributes>/' "${2}"
fi
# Special handling for Solarized Light
if [[ ${2} =~ .*Light.* ]]
then
# Function declarations
sed -i'.orig' -e 's/<\/attributes>/<option name="DEFAULT_FUNCTION_DECLARATION"><value><option name="FOREGROUND" value="586E75" \/><\/value><\/option><\/attributes>/' "${2}"
# Instance methods
sed -i'.orig' -e 's/<\/attributes>/<option name="DEFAULT_INSTANCE_METHOD"><value><option name="FOREGROUND" value="586E75" \/><\/value><\/option><\/attributes>/' "${2}"
# Parameter hints
sed -i'.orig' -e 's/<\/attributes>/<option name="INLINE_PARAMETER_HINT"><value><option name="FOREGROUND" value="7A7A7A" \/><option name="BACKGROUND" value="EDEDED" \/><\/value><\/option><\/attributes>/' "${2}"
fi
rm "${2}.orig"
}
# Create the "colors" directory for the scheme files
# and copy the .icls scheme files there
mkdir colors
cp Solarized\ Light.icls colors
cp Solarized\ Dark.icls colors
# Create Darcula versions of both schemes,
createDarculaVersion colors/Solarized\ Light.icls colors/Solarized\ Light\ \(Darcula\).icls
createDarculaVersion colors/Solarized\ Dark.icls colors/Solarized\ Dark\ \(Darcula\).icls
# Create .xml versions of all schemes for backwards compatibility
cp colors/Solarized\ Light.icls colors/Solarized\ Light.xml
cp colors/Solarized\ Dark.icls colors/Solarized\ Dark.xml
cp colors/Solarized\ Light\ \(Darcula\).icls colors/Solarized\ Light\ \(Darcula\).xml
cp colors/Solarized\ Dark\ \(Darcula\).icls colors/Solarized\ Dark\ \(Darcula\).xml
# Create an empty "IntelliJ IDEA Global Settings" file,
# needed to be able to import the JAR using "Import Settings..."
touch IntelliJ\ IDEA\ Global\ Settings
# Create the JAR file
jar cfM settings.jar IntelliJ\ IDEA\ Global\ Settings colors
# Cleanup
rm -r colors
rm IntelliJ\ IDEA\ Global\ Settings
echo "settings.jar generated"
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/wxy_666/intellij-colors-solarized.git
git@gitee.com:wxy_666/intellij-colors-solarized.git
wxy_666
intellij-colors-solarized
intellij-colors-solarized
master

搜索帮助