First attempt at integration with nmouse and keyboard bindings

This commit is contained in:
Simon Long 2024-05-01 13:39:40 +01:00
parent 96d5d80be2
commit 952d04b78d
6 changed files with 294 additions and 1 deletions

View file

@ -20,4 +20,12 @@ struct wlr_scene_node *lab_wlr_scene_get_prev_node(struct wlr_scene_node *node);
/* A variant of wlr_scene_output_commit() that respects wlr_output->pending */
bool lab_wlr_scene_output_commit(struct wlr_scene_output *scene_output);
enum magnify_dir {
MAGNIFY_INCREASE,
MAGNIFY_DECREASE
};
void magnify_toggle (void);
void magnify_set_scale (enum magnify_dir dir);
#endif /* LABWC_SCENE_HELPERS_H */

View file

@ -134,6 +134,9 @@ static struct key_combos {
.name = "command",
.value = "brightnessctl set 10%-",
},
}, {
.binding = "C-A-m",
.action = "ToggleMagnify",
}, {
.binding = NULL,
},
@ -441,6 +444,24 @@ static struct mouse_combos {
.button = "Middle",
.event = "Press",
.action = "Raise",
}, {
.context = "All",
.button = "W-Up",
.event = "Scroll",
.action = "SetMagnification",
.attributes[0] = {
.name = "scale",
.value = "up",
},
}, {
.context = "All",
.button = "W-Down",
.event = "Scroll",
.action = "SetMagnification",
.attributes[0] = {
.name = "scale",
.value = "down",
},
}, {
.context = NULL,
},

View file

@ -60,6 +60,9 @@ struct rcxml {
bool focus_follow_mouse_requires_movement;
bool raise_on_focus;
bool magnify;
int magnification;
/* theme */
char *theme_name;
int corner_radius;