Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

  • Loading branch information...
commit d89c5ed8b451c0ee47ae7ebb0048ae2e953ef244 2 parents 1a450bd + b9fd05b
@sargon sargon authored
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]);
Please sign in to comment.
Something went wrong with that request. Please try again.