Config/Infobar: Add occupied_fg option (Requested by s__C)

This commit is contained in:
Martin Duquesnoy 2010-10-23 16:36:07 +02:00
parent 6b788edc38
commit 2a9d024784
5 changed files with 9 additions and 4 deletions

View File

@ -472,11 +472,11 @@ conf_tag_section(void)
conf.colors.tagurfg = fetch_opt_first(sec, "#000000", "urgent_fg").str;
conf.colors.tagurbg = getcolor(fetch_opt_first(sec, "#DD1111", "urgent_bg").str);
conf.colors.tag_occupied_bg = getcolor(fetch_opt_first(sec, "#222222", "occupied_bg").str);
conf.colors.tag_occupied_fg = fetch_opt_first(sec, conf.colors.text, "occupied_fg").str;
conf.border.tag = fetch_opt_first(sec, "false", "border").bool;
conf.tagautohide = fetch_opt_first(sec, "false", "autohide").bool;
conf.tagnamecount = fetch_opt_first(sec, "false", "name_count").bool;
def_tag = fetch_section_first(sec, "default_tag");
position = fetch_opt_first(def_tag, "top", "infobar_position").str;

View File

@ -268,7 +268,9 @@ infobar_draw_taglist(int sc)
? conf.colors.tagurfg
: ((i == seltag[sc] || tags[sc][seltag[sc]].tagad & TagFlag(i))
? conf.colors.tagselfg
: conf.colors.text);
: (is_occupied[i]
? conf.colors.tag_occupied_fg
: conf.colors.text));
barwin_refresh_color(infobar[sc].tags[i]);

View File

@ -123,7 +123,8 @@ screen_set_sel(int screen)
if(screen < 0 || screen > screen_count() - 1)
screen = 0;
prevselscreen = selscreen;
if(selscreen != screen)
prevselscreen = selscreen;
client_focus(NULL);
XWarpPointer(dpy, None, ROOT, 0, 0, 0, 0,
@ -162,7 +163,7 @@ screen_get_sel(void)
XChangeProperty(dpy, ROOT, net_atom[wmfs_current_screen], XA_CARDINAL, 32,
PropModeReplace, (uchar*)&selscreen, 1);
if(os != selscreen)
if(os != selscreen && os != prevselscreen)
prevselscreen = os;
return selscreen;

View File

@ -399,6 +399,7 @@ typedef struct
uint tagurbg;
uint tagselbg;
uint tag_occupied_bg;
char *tag_occupied_fg;
uint tagbord;
char *layout_fg;
uint layout_bg;

View File

@ -99,6 +99,7 @@
tag_round = false
occupied_bg = "#003366"
occupied_fg = "#D4D4D4"
sel_fg = "#191919"
sel_bg = "#7E89A2"
urgent_bg = "#DD1111"