Skip to content
This repository has been archived by the owner on Mar 27, 2020. It is now read-only.

Commit

Permalink
Extra: [Tweetdeck-colordeck] Add cdk files for "Colordeck" extension
Browse files Browse the repository at this point in the history
Backgrounds:
  Twitter will stop providing UserStream APIs until 24th Aug, this
  means all 3rd-party twitter clients will have these issues:
    * User-stream can't be updated.
    * Notifications, legacy DM styles will be ended.

Changes:
  So we now do Tweetdeck support in both Chrome(ium) and Firefox.

  This commit provides light/dark colour schemes for "Colordeck"
  browser extensions for re-colouring Tweetdeck widgets partially.
  Still some widgets may be out of control though, but ours will
  improve Tweetdeck styling nicer than stock light/dark variants.
  • Loading branch information
tista500 committed Aug 16, 2018
1 parent acebcca commit b06c21d
Show file tree
Hide file tree
Showing 8 changed files with 159 additions and 11 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,5 @@ Makefile
Makefile.in
missing
inkscape.log
ColorDeck-adapta.cdk
ColorDeck-adapta-nokto.cdk
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions autogen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@ if test -z "${NOCONFIGURE}"; then
--disable-chrome-legacy \
--disable-plank \
--disable-telegram \
--disable-tweetdeck \
"$@"
fi
24 changes: 13 additions & 11 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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.])])
Expand Down Expand Up @@ -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'
Expand Down
30 changes: 30 additions & 0 deletions extra/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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 *
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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

Expand All @@ -102,5 +126,11 @@ endif

CLEANFILES =

if ENABLE_TWEETDECK
CLEANFILES += \
$(tweetdeckdir)/light/ColorDeck-adapta.cdk \
$(tweetdeckdir)/dark/ColorDeck-adapta-nokto.cdk
endif

DISTCLEANFILES = \
$(CLEANFILES)
24 changes: 24 additions & 0 deletions extra/tweetdeck/dark/ColorDeck-adapta-nokto.cdk.in
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
24 changes: 24 additions & 0 deletions extra/tweetdeck/light/ColorDeck-adapta.cdk.in
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
47 changes: 47 additions & 0 deletions extra/tweetdeck/recolor-cdk.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#! /bin/bash
#
# This file is part of adapta-gtk-theme
#
# Copyright (C) 2016-2018 Tista <[email protected]>
#
# 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

0 comments on commit b06c21d

Please sign in to comment.