Permalink
Browse files

Merge remote-tracking branch 'remotes/johannes87/master'

  • Loading branch information...
sargon committed Dec 27, 2011
2 parents 1a450bd + b9fd05b commit d89c5ed8b451c0ee47ae7ebb0048ae2e953ef244
Showing with 8 additions and 2 deletions.
  1. +8 −2 panel.c
View
10 panel.c
@@ -400,7 +400,7 @@ usage()
printf(" --distancefrom <number>\n");
printf(" --expand <false|true>\n");
printf(" --padding <number>\n");
- printf(" --monitor <number> (default:0)\n");
+ printf(" --monitor <number|primary> (default:0)\n");
}
void
@@ -601,7 +601,13 @@ main(int argc, char *argv[], char *env[])
usage();
exit(1);
} else {
- p->monitor = atoi(argv[i]);
+ if (g_ascii_isdigit(argv[i][0])) {
+ p->monitor = atoi(argv[i]);
+ } else if (!strcmp(argv[i], "primary")) {
+ GdkDisplay *display = gdk_display_get_default ();
+ GdkScreen *screen = gdk_display_get_screen(display, 0);
+ p->monitor = gdk_screen_get_primary_monitor(screen);
+ }
}
} else {
printf("trayer: unknown option - %s\n", argv[i]);

0 comments on commit d89c5ed

Please sign in to comment.