diff options
Diffstat (limited to 'main.c')
| -rw-r--r-- | main.c | 24 |
1 files changed, 24 insertions, 0 deletions
@@ -509,6 +509,8 @@ static int parse_options(int argc, char **argv, struct swaylock_state *state, LO_FONT_SIZE, LO_IND_IDLE_VISIBLE, LO_IND_RADIUS, + LO_IND_X_POSITION, + LO_IND_Y_POSITION, LO_IND_THICKNESS, LO_INSIDE_COLOR, LO_INSIDE_CLEAR_COLOR, @@ -564,6 +566,8 @@ static int parse_options(int argc, char **argv, struct swaylock_state *state, {"indicator-idle-visible", no_argument, NULL, LO_IND_IDLE_VISIBLE}, {"indicator-radius", required_argument, NULL, LO_IND_RADIUS}, {"indicator-thickness", required_argument, NULL, LO_IND_THICKNESS}, + {"indicator-x-position", required_argument, NULL, LO_IND_X_POSITION}, + {"indicator-y-position", required_argument, NULL, LO_IND_Y_POSITION}, {"inside-color", required_argument, NULL, LO_INSIDE_COLOR}, {"inside-clear-color", required_argument, NULL, LO_INSIDE_CLEAR_COLOR}, {"inside-caps-lock-color", required_argument, NULL, LO_INSIDE_CAPS_LOCK_COLOR}, @@ -645,6 +649,10 @@ static int parse_options(int argc, char **argv, struct swaylock_state *state, "Sets the indicator radius.\n" " --indicator-thickness <thick> " "Sets the indicator thickness.\n" + " --indicator-x-position <x> " + "Sets the horizontal position of the indicator.\n" + " --indicator-y-position <y> " + "Sets the vertical position of the indicator.\n" " --inside-color <color> " "Sets the color of the inside of the indicator.\n" " --inside-clear-color <color> " @@ -844,6 +852,18 @@ static int parse_options(int argc, char **argv, struct swaylock_state *state, state->args.thickness = strtol(optarg, NULL, 0); } break; + case LO_IND_X_POSITION: + if (state) { + state->args.override_indicator_x_position = true; + state->args.indicator_x_position = atoi(optarg); + } + break; + case LO_IND_Y_POSITION: + if (state) { + state->args.override_indicator_y_position = true; + state->args.indicator_y_position = atoi(optarg); + } + break; case LO_INSIDE_COLOR: if (state) { state->args.colors.inside.input = parse_color(optarg); @@ -1087,6 +1107,10 @@ int main(int argc, char **argv) { .font_size = 0, .radius = 50, .thickness = 10, + .indicator_x_position = 0, + .indicator_y_position = 0, + .override_indicator_x_position = false, + .override_indicator_y_position = false, .ignore_empty = false, .show_indicator = true, .show_caps_lock_indicator = false, |
