mirror of
				https://codeberg.org/dwl/dwl-patches.git
				synced 2025-10-31 12:04:23 +00:00 
			
		
		
		
	 9c5d5d85f3
			
		
	
	
		9c5d5d85f3
		
			
		
	
	
	
	
		
			
			Eliminated wiki. Individual patches have a README.md explanation in their own subdirectory. Simplified submission of new patches and maintenance of existing patches. Instructions page (README.md autodisplayed) is now at https://codeberg.org/dwl/dwl-patches/
		
			
				
	
	
		
			58 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			Diff
		
	
	
	
	
	
			
		
		
	
	
			58 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			Diff
		
	
	
	
	
	
| From fb48ec754d63b3d8e40fff2d047050675887d7f4 Mon Sep 17 00:00:00 2001
 | |
| From: Micah N Gorrell <m@minego.net>
 | |
| Date: Wed, 27 Mar 2024 12:53:18 -0600
 | |
| Subject: [PATCH] hiderule
 | |
| 
 | |
| ---
 | |
|  config.def.h | 9 ++++++---
 | |
|  dwl.c        | 4 ++++
 | |
|  2 files changed, 10 insertions(+), 3 deletions(-)
 | |
| 
 | |
| diff --git a/config.def.h b/config.def.h
 | |
| index 9009517..c476057 100644
 | |
| --- a/config.def.h
 | |
| +++ b/config.def.h
 | |
| @@ -21,11 +21,14 @@ static const float fullscreen_bg[]         = {0.1f, 0.1f, 0.1f, 1.0f}; /* You ca
 | |
|  static int log_level = WLR_ERROR;
 | |
|  
 | |
|  static const Rule rules[] = {
 | |
| -	/* app_id     title       tags mask     isfloating   monitor */
 | |
| +	/* app_id     title       tags mask     isfloating   monitor  ishidden */
 | |
|  	/* examples:
 | |
| -	{ "Gimp",     NULL,       0,            1,           -1 },
 | |
| +	{ "Gimp",     NULL,       0,            1,           -1,      0 },
 | |
|  	*/
 | |
| -	{ "firefox",  NULL,       1 << 8,       0,           -1 },
 | |
| +	{ "firefox",  NULL,       1 << 8,       0,           -1,      0 },
 | |
| +
 | |
| +	{ "firefox",  "Sharing Indicator",
 | |
| +							  0,		    1,			 -1,      1 },
 | |
|  };
 | |
|  
 | |
|  /* layout(s) */
 | |
| diff --git a/dwl.c b/dwl.c
 | |
| index 5867b0c..799fd89 100644
 | |
| --- a/dwl.c
 | |
| +++ b/dwl.c
 | |
| @@ -228,6 +228,7 @@ typedef struct {
 | |
|  	uint32_t tags;
 | |
|  	int isfloating;
 | |
|  	int monitor;
 | |
| +	int	ishidden;
 | |
|  } Rule;
 | |
|  
 | |
|  typedef struct {
 | |
| @@ -464,6 +465,9 @@ applyrules(Client *c)
 | |
|  			c->isfloating = r->isfloating;
 | |
|  			newtags |= r->tags;
 | |
|  			i = 0;
 | |
| +			if (r->ishidden) {
 | |
| +				mon = NULL;
 | |
| +			}
 | |
|  			wl_list_for_each(m, &mons, link) {
 | |
|  				if (r->monitor == i++)
 | |
|  					mon = m;
 | |
| -- 
 | |
| 2.44.0
 | |
| 
 |