Skip to content
This repository has been archived by the owner on Feb 25, 2021. It is now read-only.

Commit

Permalink
Merge pull request #15 from tott/master
Browse files Browse the repository at this point in the history
Allow setting of text color as reported in #10
  • Loading branch information
city41 authored Nov 29, 2018
2 parents c07db1d + 18d9325 commit b5dfdf8
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions matei3applet.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from i3conn import I3Conn

DEFAULT_COLORS = {
'background': '#000000',
'background': '#000000',
'statusline': '#ffffff',
'separator': '#666666',

Expand Down Expand Up @@ -107,7 +107,7 @@ def set_mode_label_text(self, text):
if text == 'default':
self.modeLabel.set_text('')
else:
textToSet = '<span background="%s"><b> %s </b></span>' % (self.colors['urgent_workspace_bg'], text)
textToSet = '<span background="%s" color="%s"><b> %s </b></span>' % (self.colors['urgent_workspace_bg'], self.colors['urgent_workspace_text'], text)
self.modeLabel.set_text(textToSet)

self.modeLabel.set_use_markup(True)
Expand Down Expand Up @@ -139,7 +139,8 @@ def get_workspace_fgcolor(workspace):

def workspace_to_label(workspace):
bgcolor = get_workspace_bgcolor(workspace)
return '<span background="%s"><b> %s </b></span>' % (bgcolor, workspace['name'])
fgcolor = get_workspace_fgcolor(workspace)
return '<span background="%s" color="%s"><b> %s </b></span>' % (bgcolor, fgcolor, workspace['name'])

def get_button(workspace):
button = Gtk.EventBox()
Expand All @@ -162,10 +163,10 @@ def applet_factory(applet, iid, data):
logging.debug('iid: {}'.format(iid))
if iid != "I3Applet":
return False

bar = i3bar(applet)
bar.show()

return True

MatePanelApplet.Applet.factory_main("I3AppletFactory", True,
Expand Down

0 comments on commit b5dfdf8

Please sign in to comment.