*Syntax*:
-------------------------
-tray_output <none|output>
+tray_output <none|primary|output>
-------------------------
*Example*:
tray_output none
}
+# show tray icons on the primary monitor
+tray_output primary
+
# show tray icons on the big monitor
bar {
tray_output HDMI2
}
-------------------------
+Note that you might not have a primary output configured yet. To do so, run:
+-------------------------
+xrandr --output <output> --primary
+-------------------------
+
=== Font
Specifies the font (again, X core font, not Xft, just like in i3) to be used in
struct i3_output {
char* name; /* Name of the output */
bool active; /* If the output is active */
+ bool primary; /* If it is the primary output */
int ws; /* The number of the currently visible ws */
rect rect; /* The rect (relative to the root-win) */
static int outputs_boolean_cb(void *params_, int val) {
struct outputs_json_params *params = (struct outputs_json_params*) params_;
- if (strcmp(params->cur_key, "active")) {
- return 0;
+ if (!strcmp(params->cur_key, "active")) {
+ params->outputs_walk->active = val;
+ FREE(params->cur_key);
+ return 1;
}
- params->outputs_walk->active = val;
-
- FREE(params->cur_key);
+ if (!strcmp(params->cur_key, "primary")) {
+ params->outputs_walk->primary = val;
+ FREE(params->cur_key);
+ return 1;
+ }
- return 1;
+ return 0;
}
/*
SLIST_FOREACH(walk, outputs, slist) {
if (!walk->active)
continue;
- if (config.tray_output &&
- strcasecmp(walk->name, config.tray_output) != 0)
- continue;
+ if (config.tray_output) {
+ if ((strcasecmp(walk->name, config.tray_output) != 0) &&
+ (!walk->primary || strcasecmp("primary", config.tray_output) != 0))
+ continue;
+ }
+
DLOG("using output %s\n", walk->name);
output = walk;
}
ystr("active");
y(bool, output->active);
+ ystr("primary");
+ y(bool, output->primary);
+
ystr("rect");
y(map_open);
ystr("x");