Skip to content

Commit

Permalink
feat: add lockscreen bg color to config
Browse files Browse the repository at this point in the history
  • Loading branch information
Frewacom committed Dec 26, 2022
1 parent cf05635 commit a9451f6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions dscm-config.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ static float *rootcolor = NULL;
static float *bordercolor = NULL;
static float *focuscolor = NULL;
static float *fullscreen_bg = NULL;
static float *lockscreen_bg = NULL;
static char **tags = NULL;
static char **termcmd = NULL;
static char **menucmd = NULL;
Expand Down Expand Up @@ -188,6 +189,8 @@ dscm_config_parse()
sizeof(float), 0, &dscm_parse_color, NULL);
fullscreen_bg = dscm_iterate_list(dscm_alist_get(colors, "fullscreen"),
sizeof(float), 0, &dscm_parse_color, NULL);
lockscreen_bg = dscm_iterate_list(dscm_alist_get(colors, "lockscreen"),
sizeof(float), 0, &dscm_parse_color, NULL);
tags = dscm_iterate_list(dscm_alist_get(config, "tags"),
sizeof(char*), 0, &dscm_parse_string, &numtags);
termcmd = dscm_iterate_list(dscm_alist_get(config, "terminal"),
Expand Down Expand Up @@ -232,6 +235,7 @@ dscm_config_cleanup()
free(bordercolor);
free(focuscolor);
free(fullscreen_bg);
free(lockscreen_bg);
free((char*)xkb_rules->rules);
free((char*)xkb_rules->model);
free((char*)xkb_rules->layout);
Expand Down
2 changes: 1 addition & 1 deletion dwl.c
Original file line number Diff line number Diff line change
Expand Up @@ -2468,7 +2468,7 @@ setup()
wl_signal_add(&session_lock_mgr->events.new_lock, &session_lock_create_lock);
wl_signal_add(&session_lock_mgr->events.destroy, &session_lock_mgr_destroy);
locked_bg = wlr_scene_rect_create(layers[LyrBlock], sgeom.width, sgeom.height,
(float [4]){0.1, 0.1, 0.1, 1.0});
lockscreen_bg);
wlr_scene_node_set_enabled(&locked_bg->node, 0);

/* Use decoration protocols to negotiate server-side decorations */
Expand Down

0 comments on commit a9451f6

Please sign in to comment.