diff --git a/.gitignore b/.gitignore index 4ddde8f90..44afac44b 100644 --- a/.gitignore +++ b/.gitignore @@ -38,3 +38,5 @@ Makefile Makefile.in missing inkscape.log +ColorDeck-adapta.cdk +ColorDeck-adapta-nokto.cdk diff --git a/README.md b/README.md index 208cfd362..7493f7031 100644 --- a/README.md +++ b/README.md @@ -330,6 +330,24 @@ Extra Telegram Support > * Bundled noise-texture images are for *tiled* mode. > * Telegram support is a W.I.P currently. +Extra Tweetdeck Support +----------------------- + To try "Colordeck for Tweetdeck" extension theming, pass this option: + + ``` + --enable-tweetdeck enable Tweetdeck-colordeck support (type: bool) + ``` + + The installer installs `cdk` files into `Adapta*/tweetdeck` directories if Tweetdeck support is enabled. + Then open the file via Colordeck -> import > "Colors" -> Choose File. + + > **Note:** + > + > * [**Chrome Web Store**](https://chrome.google.com/webstore/detail/colordeck-for-tweetdeck/jgoilgghdiafcdpgaddhfnlnhjhiejjl) + > * [**Firefox Add-ons**](https://addons.mozilla.org/en-US/firefox/addon/colordeck/) + > * Light and dark variants are supported. + > * Currently those files support "Colors" only, so enabling "Colors" checkbox is enough. + Other Projects ------ This is a list of community projects, related to Adapta: diff --git a/autogen.sh b/autogen.sh index 80667bb54..01f82137f 100755 --- a/autogen.sh +++ b/autogen.sh @@ -18,5 +18,6 @@ if test -z "${NOCONFIGURE}"; then --disable-chrome-legacy \ --disable-plank \ --disable-telegram \ + --disable-tweetdeck \ "$@" fi diff --git a/configure.ac b/configure.ac index 5f3c7f741..cf4ea4ce7 100644 --- a/configure.ac +++ b/configure.ac @@ -23,17 +23,18 @@ AM_INIT_AUTOMAKE([ AC_PREFIX_DEFAULT(/usr) AM_SILENT_RULES([yes]) -ADAPTA_OPTION([PARALLEL], [parallel], [parallel-build], [disable]) -ADAPTA_OPTION([GTK_NEXT], [gtk_next], [Gtk-4.0], [disable]) -ADAPTA_OPTION([GNOME], [gnome], [Gnome-Shell], [disable]) -ADAPTA_OPTION([CINNAMON], [cinnamon], [Cinnamon], [disable]) -ADAPTA_OPTION([FLASHBACK], [flashback], [Flashback], [disable]) -ADAPTA_OPTION([XFCE], [xfce], [XFce], [disable]) -ADAPTA_OPTION([MATE], [mate], [Mate], [disable]) -ADAPTA_OPTION([OPENBOX], [openbox], [Openbox], [disable]) -ADAPTA_OPTION([CHROME_LEGACY],[chrome_legacy],[Chrome(ium)-legacy],[disable]) -ADAPTA_OPTION([PLANK], [plank], [Plank], [disable]) -ADAPTA_OPTION([TELEGRAM], [telegram], [Telegram], [disable]) +ADAPTA_OPTION([PARALLEL], [parallel], [parallel-build], [disable]) +ADAPTA_OPTION([GTK_NEXT], [gtk_next], [Gtk-4.0], [disable]) +ADAPTA_OPTION([GNOME], [gnome], [Gnome-Shell], [disable]) +ADAPTA_OPTION([CINNAMON], [cinnamon], [Cinnamon], [disable]) +ADAPTA_OPTION([FLASHBACK], [flashback], [Flashback], [disable]) +ADAPTA_OPTION([XFCE], [xfce], [XFce], [disable]) +ADAPTA_OPTION([MATE], [mate], [Mate], [disable]) +ADAPTA_OPTION([OPENBOX], [openbox], [Openbox], [disable]) +ADAPTA_OPTION([CHROME_LEGACY],[chrome_legacy],[Chrome(ium)-legacy], [disable]) +ADAPTA_OPTION([PLANK], [plank], [Plank], [disable]) +ADAPTA_OPTION([TELEGRAM], [telegram], [Telegram], [disable]) +ADAPTA_OPTION([TWEETDECK], [tweetdeck], [Tweetdeck-Colordeck], [disable]) PKG_PROG_PKG_CONFIG AS_IF([test -z "$PKG_CONFIG"], [AC_MSG_ERROR(['pkg-config' not found.])]) @@ -131,6 +132,7 @@ AC_MSG_RESULT([ Chrome(ium)-legacy: $ENABLE_CHROME_LEGACY Plank: $ENABLE_PLANK Telegram: $ENABLE_TELEGRAM + Tweetdeck-Colordeck: $ENABLE_TWEETDECK =========================================================== =>> run 'make' and 'sudo make install' diff --git a/extra/Makefile.am b/extra/Makefile.am index e8660fa0f..9f9b36a3b 100644 --- a/extra/Makefile.am +++ b/extra/Makefile.am @@ -20,11 +20,18 @@ gedit_file = \ $(geditdir)/adapta.xml \ $(geditdir)/README.md +tweetdeckdir = $(srcdir)/tweetdeck +tweetdeck_file = $(tweetdeckdir)/light/ColorDeck-adapta.cdk +tweetdeck_nokto_file = $(tweetdeckdir)/dark/ColorDeck-adapta-nokto.cdk + # ****************** # * Generate files * # ****************** all: +if ENABLE_TWEETDECK + cd $(tweetdeckdir) && ./recolor-cdk.sh +endif # ***************** # * Install files * @@ -62,6 +69,16 @@ if ENABLE_TELEGRAM ln -sf ../Adapta-Nokto/telegram $(noktoetadir)/telegram endif +if ENABLE_TWEETDECK + $(MKDIR_P) $(adaptadir)/tweetdeck + $(MKDIR_P) $(noktodir)/tweetdeck + cp -Rv $(tweetdeck_file) $(adaptadir)/tweetdeck + cp -Rv $(tweetdeck_nokto_file) $(noktodir)/tweetdeck + cd $(adaptadir) + ln -sf ../Adapta/tweetdeck $(adaptaetadir)/tweetdeck + ln -sf ../Adapta-Nokto/tweetdeck $(noktoetadir)/tweetdeck +endif + $(MKDIR_P) $(adaptadir)/gedit cp -Rv $(gedit_file) $(adaptadir)/gedit cd $(adaptadir) @@ -93,6 +110,13 @@ if ENABLE_TELEGRAM test -e $(adaptaetadir)/telegram && rm -rfv $(adaptaetadir)/telegram endif +if ENABLE_TWEETDECK + test -e $(noktodir)/tweetdeck && rm -rfv $(noktodir)/tweetdeck + test -e $(adaptadir)/tweetdeck && rm -rfv $(adaptadir)/tweetdeck + test -e $(noktoetadir)/tweetdeck && rm -rfv $(noktoetadir)/tweetdeck + test -e $(adaptaetadir)/tweetdeck && rm -rfv $(adaptaetadir)/tweetdeck +endif + test -e $(noktodir)/gedit && rm -rfv $(noktodir)/gedit test -e $(adaptadir)/gedit && rm -rfv $(adaptadir)/gedit @@ -102,5 +126,11 @@ endif CLEANFILES = +if ENABLE_TWEETDECK +CLEANFILES += \ + $(tweetdeckdir)/light/ColorDeck-adapta.cdk \ + $(tweetdeckdir)/dark/ColorDeck-adapta-nokto.cdk +endif + DISTCLEANFILES = \ $(CLEANFILES) diff --git a/extra/tweetdeck/dark/ColorDeck-adapta-nokto.cdk.in b/extra/tweetdeck/dark/ColorDeck-adapta-nokto.cdk.in new file mode 100644 index 000000000..9312c132e --- /dev/null +++ b/extra/tweetdeck/dark/ColorDeck-adapta-nokto.cdk.in @@ -0,0 +1,24 @@ +{ + "data":{ + "colors":{ + "c_principal":"#263238", + "c_background":"#263238", + "c_ct_background":"#222D32", + "c_ct_background2":"#66CEFF", + "c_ct_text":"#7F898E", + "c_cw_background":"#009688", + "c_cw_text":"#FFFFFF", + "c_links":"#55BCDA", + "c_ml_background":"#243035", + "c_ml_icons":"#B9C2C6", + "c_ntfBubble_color":"#4DB6AC", + "c_ntf_background":"#009688", + "c_ntf_text":"#FFFFFF", + "c_scrollbar":"#596469", + "c_tw_background":"#263238", + "c_tw_text":"#CFD8DC", + "ct_backgroundType":"solid", + "mode":"advanced" + } + } +} diff --git a/extra/tweetdeck/light/ColorDeck-adapta.cdk.in b/extra/tweetdeck/light/ColorDeck-adapta.cdk.in new file mode 100644 index 000000000..f3676e7ce --- /dev/null +++ b/extra/tweetdeck/light/ColorDeck-adapta.cdk.in @@ -0,0 +1,24 @@ +{ + "data":{ + "colors":{ + "c_principal":"#263238", + "c_background":"#FAFBFC", + "c_ct_background":"#E5E9EC", + "c_ct_background2":"#66CEFF", + "c_ct_text":"#7E868B", + "c_cw_background":"#009688", + "c_cw_text":"#FFFFFF", + "c_links":"#03A9F4", + "c_ml_background":"#F7F9F9", + "c_ml_icons":"#414C51", + "c_ntfBubble_color":"#4DB6AC", + "c_ntf_background":"#009688", + "c_ntf_text":"#FFFFFF", + "c_scrollbar":"#BABFC1", + "c_tw_background":"#FAFBFC", + "c_tw_text":"#263238", + "ct_backgroundType":"solid", + "mode":"advanced" + } + } +} diff --git a/extra/tweetdeck/recolor-cdk.sh b/extra/tweetdeck/recolor-cdk.sh new file mode 100755 index 000000000..6d69ca64c --- /dev/null +++ b/extra/tweetdeck/recolor-cdk.sh @@ -0,0 +1,47 @@ +#! /bin/bash +# +# This file is part of adapta-gtk-theme +# +# Copyright (C) 2016-2018 Tista +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# + +SRC_LIGHT_FILE="./light/ColorDeck-adapta.cdk" +SRC_DARK_FILE="./dark/ColorDeck-adapta-nokto.cdk" +COL_FILE="../../gtk/sass/common/_colors.scss" +KEY_FILE="../../gtk/sass/common/_key_colors.scss" + +# Default colours +accent1="`grep 'Teal300' $COL_FILE | \ + cut -d' ' -f3`" +suggested1="`grep 'Teal500' $COL_FILE | \ + cut -d' ' -f3`" + +# Check and re-color color-scheme +if [ -e $KEY_FILE ]; then + accent2="`grep 'key_accent' $KEY_FILE | \ + cut -d' ' -f2 | cut -d';' -f1`" + suggested2="`grep 'key_suggestion' $KEY_FILE | \ + cut -d' ' -f2 | cut -d';' -f1`" + + cp -f $SRC_LIGHT_FILE.in $SRC_LIGHT_FILE && \ + cp -f $SRC_DARK_FILE.in $SRC_DARK_FILE && sleep 1 + + if [ $accent1 != $accent2 ]; then + sed -i "s/$accent1/$accent2/gi" $SRC_LIGHT_FILE + sed -i "s/$accent1/$accent2/gi" $SRC_DARK_FILE + echo $accent1 is re-colored with $accent2. + fi + if [ $suggested1 != $suggested2 ]; then + sed -i "s/$suggested1/$suggested2/gi" $SRC_LIGHT_FILE + sed -i "s/$suggested1/$suggested2/gi" $SRC_DARK_FILE + echo $suggested1 is re-colored with $suggested2. + fi +else + echo ../../gtk/sass/common/_key_colors.scss was not found. Stopped... + exit 1 +fi