mirror of
				https://codeberg.org/dwl/dwl-patches.git
				synced 2025-10-31 03:54:19 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			56 lines
		
	
	
		
			1.9 KiB
		
	
	
	
		
			Diff
		
	
	
	
	
	
			
		
		
	
	
			56 lines
		
	
	
		
			1.9 KiB
		
	
	
	
		
			Diff
		
	
	
	
	
	
| From 7a2b65af8c7a56c8d78875530685422702be993e Mon Sep 17 00:00:00 2001
 | |
| From: Dhruva Sambrani <44899822+DhruvaSambrani@users.noreply.github.com>
 | |
| Date: Mon, 8 Jan 2024 15:04:09 +0100
 | |
| Subject: [PATCH] first winview commit
 | |
| 
 | |
| ---
 | |
|  config.def.h |  1 +
 | |
|  dwl.c        | 12 ++++++++++++
 | |
|  2 files changed, 13 insertions(+)
 | |
| 
 | |
| diff --git a/config.def.h b/config.def.h
 | |
| index a8ed61d..af9d866 100644
 | |
| --- a/config.def.h
 | |
| +++ b/config.def.h
 | |
| @@ -138,6 +138,7 @@ static const Key keys[] = {
 | |
|  	{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_space,      togglefloating, {0} },
 | |
|  	{ MODKEY,                    XKB_KEY_e,         togglefullscreen, {0} },
 | |
|  	{ MODKEY,                    XKB_KEY_0,          view,           {.ui = ~0} },
 | |
| +	{ MODKEY,                    XKB_KEY_o,          winview,        {0}},
 | |
|  	{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_parenright, tag,            {.ui = ~0} },
 | |
|  	{ MODKEY,                    XKB_KEY_comma,      focusmon,       {.i = WLR_DIRECTION_LEFT} },
 | |
|  	{ MODKEY,                    XKB_KEY_period,     focusmon,       {.i = WLR_DIRECTION_RIGHT} },
 | |
| diff --git a/dwl.c b/dwl.c
 | |
| index 632dabf..5f3a596 100644
 | |
| --- a/dwl.c
 | |
| +++ b/dwl.c
 | |
| @@ -327,6 +327,7 @@ static void updatetitle(struct wl_listener *listener, void *data);
 | |
|  static void urgent(struct wl_listener *listener, void *data);
 | |
|  static void view(const Arg *arg);
 | |
|  static void virtualkeyboard(struct wl_listener *listener, void *data);
 | |
| +static void winview(const Arg *a);
 | |
|  static Monitor *xytomon(double x, double y);
 | |
|  static void xytonode(double x, double y, struct wlr_surface **psurface,
 | |
|  		Client **pc, LayerSurface **pl, double *nx, double *ny);
 | |
| @@ -2726,6 +2727,17 @@ virtualkeyboard(struct wl_listener *listener, void *data)
 | |
|  	wlr_keyboard_group_add_keyboard(vkb_group.wlr_group, &keyboard->keyboard);
 | |
|  }
 | |
|  
 | |
| +void
 | |
| +winview(const Arg *a) {
 | |
| +	Arg b = {0};
 | |
| +	Client *sel = focustop(selmon);
 | |
| +	if(!sel)
 | |
| +		return;
 | |
| +	b.ui = sel -> tags;
 | |
| +	view(&b);
 | |
| +	return;
 | |
| +}
 | |
| +
 | |
|  Monitor *
 | |
|  xytomon(double x, double y)
 | |
|  {
 | |
| -- 
 | |
| 2.43.0
 | |
| 
 | 
