mirror of
https://github.com/Mayccoll/Gogh.git
synced 2023-08-10 21:12:46 +03:00
Implemented support for Konsole; no profiles though
This commit is contained in:
parent
ec6bff26f9
commit
ff15f921a4
@ -198,6 +198,26 @@ updateFootConfig () {
|
|||||||
sed -i -r -e "s/^${name}=.+/${name}=${color/\#/}/g" "${config}"
|
sed -i -r -e "s/^${name}=.+/${name}=${color/\#/}/g" "${config}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
createKonsoleEntry () {
|
||||||
|
local name="${1}"
|
||||||
|
local color="${2}"
|
||||||
|
set --
|
||||||
|
set -- $(hexRGBtoDecRGB "${color}")
|
||||||
|
R=${1}; shift; G=${1}; shift; B=${1}; shift
|
||||||
|
|
||||||
|
echo -e "[$name]\nColor=${R},${G},${B}\n"
|
||||||
|
}
|
||||||
|
|
||||||
|
createKonsoleTriple () {
|
||||||
|
local name="${1}"
|
||||||
|
local colorn="${2}" # normal and faint
|
||||||
|
local colori="${3}" # intense
|
||||||
|
|
||||||
|
createKonsoleEntry "${name}" "${colorn}"
|
||||||
|
createKonsoleEntry "${name}Faint" "${colorn}"
|
||||||
|
createKonsoleEntry "${name}Intense" "${colori}"
|
||||||
|
}
|
||||||
|
|
||||||
convertNameAndRGBtoITerm() {
|
convertNameAndRGBtoITerm() {
|
||||||
local name="${1}"
|
local name="${1}"
|
||||||
local color="${2}"
|
local color="${2}"
|
||||||
@ -545,6 +565,38 @@ apply_konsole() {
|
|||||||
# | Applying values on Konsole
|
# | Applying values on Konsole
|
||||||
# | ===========================================
|
# | ===========================================
|
||||||
|
|
||||||
|
if [[ -z "${XDG_DATA_HOME:-}" ]]; then
|
||||||
|
KDIR="${HOME}/.local/share/konsole"
|
||||||
|
else
|
||||||
|
KDIR="${XDG_DATA_HOME}/konsole"
|
||||||
|
fi
|
||||||
|
|
||||||
|
KPROFILE="${KDIR}/${PROFILE_NAME}.colorscheme"
|
||||||
|
echo "Updating color theme file (${KPROFILE}) with theme ..."
|
||||||
|
if [[ -f "${KPROFILE}" ]]; then
|
||||||
|
echo "Profile ${PROFILE_NAME} already exists in Konsole confiuration (${KONSOLE_DIR}); Skipping ..."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
touch "${KPROFILE}"
|
||||||
|
createKonsoleTriple "Background" "${BACKGROUND_COLOR}" "${BACKGROUND_COLOR}" >> "${KPROFILE}"
|
||||||
|
createKonsoleTriple "Color0" "${COLOR_01}" "${COLOR_09}" >> "${KPROFILE}"
|
||||||
|
createKonsoleTriple "Color1" "${COLOR_02}" "${COLOR_10}" >> "${KPROFILE}"
|
||||||
|
createKonsoleTriple "Color2" "${COLOR_03}" "${COLOR_11}" >> "${KPROFILE}"
|
||||||
|
createKonsoleTriple "Color3" "${COLOR_04}" "${COLOR_12}" >> "${KPROFILE}"
|
||||||
|
createKonsoleTriple "Color4" "${COLOR_05}" "${COLOR_13}" >> "${KPROFILE}"
|
||||||
|
createKonsoleTriple "Color5" "${COLOR_06}" "${COLOR_14}" >> "${KPROFILE}"
|
||||||
|
createKonsoleTriple "Color6" "${COLOR_07}" "${COLOR_15}" >> "${KPROFILE}"
|
||||||
|
createKonsoleTriple "Color7" "${COLOR_08}" "${COLOR_16}" >> "${KPROFILE}"
|
||||||
|
createKonsoleTriple "Foreground" "${FOREGROUND_COLOR}" "${FOREGROUND_COLOR}" >> "${KPROFILE}"
|
||||||
|
echo "[General]" >> "${KPROFILE}"
|
||||||
|
echo "Blur=false" >> "${KPROFILE}"
|
||||||
|
echo "ColorRandomization=false" >> "${KPROFILE}"
|
||||||
|
echo "Description=${PROFILE_NAME}" >> "${KPROFILE}"
|
||||||
|
echo "Opacity=1" >> "${KPROFILE}"
|
||||||
|
echo "Wallpaper=" >> "${KPROFILE}"
|
||||||
|
|
||||||
|
echo "Done - please change your profile by going to Settings > Manage Profiles... > Edit... > Appearance"
|
||||||
}
|
}
|
||||||
|
|
||||||
apply_darwin() {
|
apply_darwin() {
|
||||||
|
Loading…
Reference in New Issue
Block a user