mirror of
https://github.com/cage-kiosk/cage.git
synced 2026-04-09 08:21:23 -04:00
make the Cage multi-monitor layout configurable
This commit is contained in:
parent
3321daef98
commit
ad0872e33e
4 changed files with 38 additions and 2 deletions
11
cage.c
11
cage.c
|
|
@ -192,6 +192,8 @@ usage(FILE *file, const char *cage)
|
|||
" -h\t Display this help message\n"
|
||||
" -m extend Extend the display across all connected outputs (default)\n"
|
||||
" -m last Use only the last connected output\n"
|
||||
" -e auto Automatically place newly connected outputs (default)\n"
|
||||
" -e right Place newly connected outputs on the right\n"
|
||||
" -r\t Rotate the output 90 degrees clockwise, specify up to three times\n"
|
||||
" -s\t Allow VT switching\n"
|
||||
" -v\t Show the version number and exit\n"
|
||||
|
|
@ -204,7 +206,7 @@ static bool
|
|||
parse_args(struct cg_server *server, int argc, char *argv[])
|
||||
{
|
||||
int c;
|
||||
while ((c = getopt(argc, argv, "dhm:rsv")) != -1) {
|
||||
while ((c = getopt(argc, argv, "dhm:e:rsv")) != -1) {
|
||||
switch (c) {
|
||||
case 'd':
|
||||
server->xdg_decoration = true;
|
||||
|
|
@ -219,6 +221,13 @@ parse_args(struct cg_server *server, int argc, char *argv[])
|
|||
server->output_mode = CAGE_MULTI_OUTPUT_MODE_EXTEND;
|
||||
}
|
||||
break;
|
||||
case 'e':
|
||||
if (strcmp(optarg, "right") == 0) {
|
||||
server->output_extend_mode = CAGE_OUTPUT_EXTEND_MODE_RIGHT;
|
||||
} else if (strcmp(optarg, "auto") == 0) {
|
||||
server->output_extend_mode = CAGE_OUTPUT_EXTEND_MODE_AUTO;
|
||||
}
|
||||
break;
|
||||
case 'r':
|
||||
server->output_transform++;
|
||||
if (server->output_transform > WL_OUTPUT_TRANSFORM_270) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue