Compare commits
	
		
			361 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					af632efafb | ||
| 
						 | 
					5130e64014 | ||
| 
						 | 
					48b71050ab | ||
| 
						 | 
					c959e1cb58 | ||
| 
						 | 
					10b140adff | ||
| 
						 | 
					fde880858a | ||
| 
						 | 
					e896c3107e | ||
| 
						 | 
					e7ece2aaba | ||
| 
						 | 
					7d5b1b38a2 | ||
| 
						 | 
					bfa185fac4 | ||
| 
						 | 
					36e11cc61c | ||
| 
						 | 
					3047114a1f | ||
| 
						 | 
					81f908b5c6 | ||
| 
						 | 
					795f7d0011 | ||
| 
						 | 
					99a906d9e3 | ||
| 
						 | 
					8fe17768f7 | ||
| 
						 | 
					bd69540724 | ||
| 
						 | 
					e4457dd31e | ||
| 
						 | 
					5e3c442a2f | ||
| 
						 | 
					b788a08745 | ||
| 
						 | 
					e9c7ebcddc | ||
| 
						 | 
					699c83b6ff | ||
| 
						 | 
					5015cfc93b | ||
| 
						 | 
					485c40d5f9 | ||
| 
						 | 
					41958715d4 | ||
| 
						 | 
					5ac75bb689 | ||
| 
						 | 
					a60b1c5d2f | ||
| 
						 | 
					0f49dbddfb | ||
| 
						 | 
					d194f2c726 | ||
| 
						 | 
					2769ef11ad | ||
| 
						 | 
					8faf64215e | ||
| 
						 | 
					c2fa943e86 | ||
| 
						 | 
					eaf997ee88 | ||
| 
						 | 
					d0b1d46ed4 | ||
| 
						 | 
					4134edfc38 | ||
| 
						 | 
					5315d6ae96 | ||
| 
						 | 
					0a4ab3b407 | ||
| 
						 | 
					cc1f6ffbc2 | ||
| 
						 | 
					8531dc3158 | ||
| 
						 | 
					ab1c6e3d00 | ||
| 
						 | 
					84d1b45060 | ||
| 
						 | 
					96163849d6 | ||
| 
						 | 
					cbf3a73d72 | ||
| 
						 | 
					61bb8b2241 | ||
| 
						 | 
					bb2e7222ba | ||
| 
						 | 
					f04cac6d6e | ||
| 
						 | 
					f09418bbb6 | ||
| 
						 | 
					ed3ab6b4fc | ||
| 
						 | 
					f087d20e6e | ||
| 
						 | 
					a8e9513783 | ||
| 
						 | 
					c82db690cc | ||
| 
						 | 
					cb3f58ad06 | ||
| 
						 | 
					b69c870a30 | ||
| 
						 | 
					e78b4a9207 | ||
| 
						 | 
					3cd4023fb3 | ||
| 
						 | 
					f40f86fa87 | ||
| 
						 | 
					c3a2e016bb | ||
| 
						 | 
					c8e9479186 | ||
| 
						 | 
					10dfa65860 | ||
| 
						 | 
					3bd8466e93 | ||
| 
						 | 
					76c8c16d79 | ||
| 
						 | 
					3cb34830eb | ||
| 
						 | 
					db2236001c | ||
| 
						 | 
					3756f7f6b8 | ||
| 
						 | 
					99f78fa553 | ||
| 
						 | 
					a9b6a312a7 | ||
| 
						 | 
					6aa8e37efe | ||
| 
						 | 
					ceac8c91ff | ||
| 
						 | 
					5b238c8dab | ||
| 
						 | 
					022d076054 | ||
| 
						 | 
					2952b68db8 | ||
| 
						 | 
					bb3bd6fec3 | ||
| 
						 | 
					e63bf22948 | ||
| 
						 | 
					5376947571 | ||
| 
						 | 
					975c898376 | ||
| 
						 | 
					a137a86a23 | ||
| 
						 | 
					839c7f6939 | ||
| 
						 | 
					7a59cd1457 | ||
| 
						 | 
					24849acada | ||
| 
						 | 
					ab9571bbc5 | ||
| 
						 | 
					56a31dc4a7 | ||
| 
						 | 
					7af4d439bd | ||
| 
						 | 
					cd2d7549b3 | ||
| 
						 | 
					3465bed290 | ||
| 
						 | 
					4ec3a673ff | ||
| 
						 | 
					5ed9c48196 | ||
| 
						 | 
					3c91283ede | ||
| 
						 | 
					e941181f46 | ||
| 
						 | 
					43e82adf0d | ||
| 
						 | 
					42cf1c7d8f | ||
| 
						 | 
					dce4fb3737 | ||
| 
						 | 
					646b351cc7 | ||
| 
						 | 
					e3b7e1d620 | ||
| 
						 | 
					04db03a4e6 | ||
| 
						 | 
					4a4817b3aa | ||
| 
						 | 
					7e1182ce55 | ||
| 
						 | 
					40529e1469 | ||
| 
						 | 
					14343e69cc | ||
| 
						 | 
					35db6d8afc | ||
| 
						 | 
					3d1090ba89 | ||
| 
						 | 
					18248ebf4b | ||
| 
						 | 
					b468873b2b | ||
| 
						 | 
					cdec9782a1 | ||
| 
						 | 
					6af273771c | ||
| 
						 | 
					4fb31e0896 | ||
| 
						 | 
					b800a1d136 | ||
| 
						 | 
					33a74489f0 | ||
| 
						 | 
					5364697914 | ||
| 
						 | 
					7edc596311 | ||
| 
						 | 
					68b400e95d | ||
| 
						 | 
					656882d76f | ||
| 
						 | 
					1479e76f01 | ||
| 
						 | 
					f2544a3318 | ||
| 
						 | 
					aafeaf7317 | ||
| 
						 | 
					f21d46ea7d | ||
| 
						 | 
					c0ba635c50 | ||
| 
						 | 
					0a673ad7a3 | ||
| 
						 | 
					3aabc08ede | ||
| 
						 | 
					d456617f0e | ||
| 
						 | 
					61fe833a06 | ||
| 
						 | 
					917e281634 | ||
| 
						 | 
					31451c3ad3 | ||
| 
						 | 
					344f35f9f5 | ||
| 
						 | 
					87adcd263b | ||
| 
						 | 
					fd3c19bd55 | ||
| 
						 | 
					1bdb393f81 | ||
| 
						 | 
					940feed314 | ||
| 
						 | 
					606b44179d | ||
| 
						 | 
					20f6917910 | ||
| 
						 | 
					820cbb3545 | ||
| 
						 | 
					90f3238301 | ||
| 
						 | 
					3bfc43c3d0 | ||
| 
						 | 
					c1128417a9 | ||
| 
						 | 
					1b62f8fa58 | ||
| 
						 | 
					54c3044dec | ||
| 
						 | 
					51336aa4a3 | ||
| 
						 | 
					c4b6ac812e | ||
| 
						 | 
					873bcb97a9 | ||
| 
						 | 
					907db0a851 | ||
| 
						 | 
					4e7c469862 | ||
| 
						 | 
					26445a0dc9 | ||
| 
						 | 
					b5068e32e9 | ||
| 
						 | 
					f099d2d5b5 | ||
| 
						 | 
					80a9da555e | ||
| 
						 | 
					d21026f0a1 | ||
| 
						 | 
					e5a1e77351 | ||
| 
						 | 
					8262d9e663 | ||
| 
						 | 
					90af1ced3c | ||
| 
						 | 
					5ccd42f807 | ||
| 
						 | 
					1586b7a02d | ||
| 
						 | 
					2420071f4c | ||
| 
						 | 
					04c26574b8 | ||
| 
						 | 
					b1a28ae1da | ||
| 
						 | 
					f68a01cd76 | ||
| 
						 | 
					2b625eb73e | ||
| 
						 | 
					0f1f30daca | ||
| 
						 | 
					dec4850d05 | ||
| 
						 | 
					0de4197cc5 | ||
| 
						 | 
					a372248b80 | ||
| 
						 | 
					69e7d7dfd3 | ||
| 
						 | 
					c99fe7dd7d | ||
| 
						 | 
					d6670a800d | ||
| 
						 | 
					6288c44697 | ||
| 
						 | 
					d5c5c52b30 | ||
| 
						 | 
					d0b4575bf4 | ||
| 
						 | 
					03518ce49e | ||
| 
						 | 
					cd8bb06af5 | ||
| 
						 | 
					3150a8a1be | ||
| 
						 | 
					b3c5f5435a | ||
| 
						 | 
					a692bdcf2b | ||
| 
						 | 
					d83454f6b7 | ||
| 
						 | 
					27b0142203 | ||
| 
						 | 
					867ba36030 | ||
| 
						 | 
					e83f36db10 | ||
| 
						 | 
					212f417e44 | ||
| 
						 | 
					3a392b8558 | ||
| 
						 | 
					92fe06b501 | ||
| 
						 | 
					6cf29bff33 | ||
| 
						 | 
					60c06a7cb4 | ||
| 
						 | 
					1147546122 | ||
| 
						 | 
					d384cee751 | ||
| 
						 | 
					5c710cf89c | ||
| 
						 | 
					8a111c181e | ||
| 
						 | 
					2255bf46a0 | ||
| 
						 | 
					04797343db | ||
| 
						 | 
					e7d41cc188 | ||
| 
						 | 
					22d8818850 | ||
| 
						 | 
					6784429c3c | ||
| 
						 | 
					37fea84de8 | ||
| 
						 | 
					c14d293e51 | ||
| 
						 | 
					79b1657a19 | ||
| 
						 | 
					d24837f1ad | ||
| 
						 | 
					3c2d303c0e | ||
| 
						 | 
					1e20a0f78a | ||
| 
						 | 
					96f9855248 | ||
| 
						 | 
					3c48858ffa | ||
| 
						 | 
					dd46d5b588 | ||
| 
						 | 
					0bc4e41ebd | ||
| 
						 | 
					703c4dd253 | ||
| 
						 | 
					b68528d85d | ||
| 
						 | 
					a644baf674 | ||
| 
						 | 
					c1f8688bfa | ||
| 
						 | 
					bea4dd2490 | ||
| 
						 | 
					83d10be1c1 | ||
| 
						 | 
					1529058f27 | ||
| 
						 | 
					36311d88af | ||
| 
						 | 
					f1a2a3c850 | ||
| 
						 | 
					ee734fae6b | ||
| 
						 | 
					62d3caa999 | ||
| 
						 | 
					4c9b397ff9 | ||
| 
						 | 
					5c6545adf5 | ||
| 
						 | 
					a704b1ee34 | ||
| 
						 | 
					f83d61dfe8 | ||
| 
						 | 
					c6180949a7 | ||
| 
						 | 
					1973ab0643 | ||
| 
						 | 
					427053f8d1 | ||
| 
						 | 
					a88e0373ef | ||
| 
						 | 
					aa9f2be24e | ||
| 
						 | 
					c53b29e60b | ||
| 
						 | 
					d6bdd03d91 | ||
| 
						 | 
					1144e98394 | ||
| 
						 | 
					7671d03a90 | ||
| 
						 | 
					bc554d45d8 | ||
| 
						 | 
					ac4caea921 | ||
| 
						 | 
					161f2d921b | ||
| 
						 | 
					210378f198 | ||
| 
						 | 
					7879616a75 | ||
| 
						 | 
					9e8dd3479d | ||
| 
						 | 
					0b72be924d | ||
| 
						 | 
					91e902f7fe | ||
| 
						 | 
					30fed9a211 | ||
| 
						 | 
					c45d46ad9a | ||
| 
						 | 
					6f55de8310 | ||
| 
						 | 
					07ad298133 | ||
| 
						 | 
					f0a4845e7d | ||
| 
						 | 
					82ec7a7ed4 | ||
| 
						 | 
					e7300e0f6f | ||
| 
						 | 
					c3feffa1e2 | ||
| 
						 | 
					956a430054 | ||
| 
						 | 
					01056b6636 | ||
| 
						 | 
					eb260b1a41 | ||
| 
						 | 
					7fe81359d4 | ||
| 
						 | 
					a3a859b4e9 | ||
| 
						 | 
					9c066c24b3 | ||
| 
						 | 
					0a668922a4 | ||
| 
						 | 
					5762964232 | ||
| 
						 | 
					cba6b211c2 | ||
| 
						 | 
					42750a621b | ||
| 
						 | 
					8ef465d592 | ||
| 
						 | 
					33fe200b52 | ||
| 
						 | 
					91fffb3f7d | ||
| 
						 | 
					1fa31efebf | ||
| 
						 | 
					244addb3f4 | ||
| 
						 | 
					c13be8d620 | ||
| 
						 | 
					dc39ae8568 | ||
| 
						 | 
					966d76a428 | ||
| 
						 | 
					7151bf8329 | ||
| 
						 | 
					dfecd46190 | ||
| 
						 | 
					5bc4db0f76 | ||
| 
						 | 
					999d6e795f | ||
| 
						 | 
					636075297c | ||
| 
						 | 
					6877a00033 | ||
| 
						 | 
					0927d635bc | ||
| 
						 | 
					450b08dde2 | ||
| 
						 | 
					da80487c07 | ||
| 
						 | 
					d9779c06fc | ||
| 
						 | 
					20996c6c5a | ||
| 
						 | 
					8dc9fcf1b9 | ||
| 
						 | 
					fc21dd4b7e | ||
| 
						 | 
					758b100d12 | ||
| 
						 | 
					8420fb1ced | ||
| 
						 | 
					f6128a16f9 | ||
| 
						 | 
					87526be6f0 | ||
| 
						 | 
					565050ac51 | ||
| 
						 | 
					5e408d8ff6 | ||
| 
						 | 
					1724f7fa43 | ||
| 
						 | 
					3e6fe6b541 | ||
| 
						 | 
					6620615ab9 | ||
| 
						 | 
					61c3095f2f | ||
| 
						 | 
					a72dc2fec2 | ||
| 
						 | 
					8b17f5517b | ||
| 
						 | 
					cd96232f7e | ||
| 
						 | 
					a9e145fe6d | ||
| 
						 | 
					5dd92c7655 | ||
| 
						 | 
					52bd69c2a4 | ||
| 
						 | 
					ca376970db | ||
| 
						 | 
					8352f2b3a8 | ||
| 
						 | 
					d4bfde79f3 | ||
| 
						 | 
					7ac8c1d4e1 | ||
| 
						 | 
					16e1ef5d40 | ||
| 
						 | 
					1d729384d1 | ||
| 
						 | 
					25c1eb28f9 | ||
| 
						 | 
					d719cc9a0e | ||
| 
						 | 
					9cde6570cc | ||
| 
						 | 
					e408ca97d8 | ||
| 
						 | 
					183dc670a3 | ||
| 
						 | 
					25947bcfdb | ||
| 
						 | 
					1ddfc571ae | ||
| 
						 | 
					21cd59a630 | ||
| 
						 | 
					6cbe47d481 | ||
| 
						 | 
					029655bb22 | ||
| 
						 | 
					27db9d4448 | ||
| 
						 | 
					176408afa8 | ||
| 
						 | 
					64674c395b | ||
| 
						 | 
					b9dee2c6f1 | ||
| 
						 | 
					a73ff905b0 | ||
| 
						 | 
					e3f0445df1 | ||
| 
						 | 
					ab06f7444b | ||
| 
						 | 
					a2a3590979 | ||
| 
						 | 
					e8aafb8e91 | ||
| 
						 | 
					18b1312449 | ||
| 
						 | 
					80ee95473b | ||
| 
						 | 
					454a04acdf | ||
| 
						 | 
					891831fe62 | ||
| 
						 | 
					cdb8e27453 | ||
| 
						 | 
					5c4913e983 | ||
| 
						 | 
					fa5ae54bbb | ||
| 
						 | 
					7de534192c | ||
| 
						 | 
					54dc0d542c | ||
| 
						 | 
					913333f518 | ||
| 
						 | 
					d702f39274 | ||
| 
						 | 
					0d8671a5ad | ||
| 
						 | 
					38e9b67026 | ||
| 
						 | 
					a3bbdb1b7b | ||
| 
						 | 
					d53ceee682 | ||
| 
						 | 
					78f56672b5 | ||
| 
						 | 
					c2fff604a7 | ||
| 
						 | 
					6644a6aa2e | ||
| 
						 | 
					3da2453997 | ||
| 
						 | 
					2ce37bc69e | ||
| 
						 | 
					f27ccc5c60 | ||
| 
						 | 
					2dbfda72f0 | ||
| 
						 | 
					7df39f3fc7 | ||
| 
						 | 
					0b45199cec | ||
| 
						 | 
					3632d7132f | ||
| 
						 | 
					565697087b | ||
| 
						 | 
					ea0008cba2 | ||
| 
						 | 
					af508c2e82 | ||
| 
						 | 
					f0d1d5206f | ||
| 
						 | 
					1c80c05587 | ||
| 
						 | 
					1e350be229 | ||
| 
						 | 
					1a26389e2b | ||
| 
						 | 
					bf9da23f07 | ||
| 
						 | 
					2373940215 | ||
| 
						 | 
					90687482ad | ||
| 
						 | 
					5ab627c06c | ||
| 
						 | 
					76d7e80fc4 | ||
| 
						 | 
					af8049bce8 | ||
| 
						 | 
					2bb51b3246 | ||
| 
						 | 
					b16d8282be | ||
| 
						 | 
					fef4614772 | ||
| 
						 | 
					be39dddcc5 | ||
| 
						 | 
					6d209b9b29 | ||
| 
						 | 
					57a0788bd8 | ||
| 
						 | 
					3ad906eede | ||
| 
						 | 
					0be9fb8797 | ||
| 
						 | 
					62a491e36d | ||
| 
						 | 
					0b5dcf229f | ||
| 
						 | 
					fda92f46aa | ||
| 
						 | 
					a62ea4062f | ||
| 
						 | 
					7dc28d130f | 
							
								
								
									
										3
									
								
								.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,3 @@
 | 
				
			|||||||
 | 
					.vscode/
 | 
				
			||||||
 | 
					*.o
 | 
				
			||||||
 | 
					dwm
 | 
				
			||||||
							
								
								
									
										59
									
								
								.hgtags
									
									
									
									
									
								
							
							
						
						
									
										59
									
								
								.hgtags
									
									
									
									
									
								
							@@ -1,59 +0,0 @@
 | 
				
			|||||||
d31b5ad96b0ba7b5b0a30928fcf000428339a577 0.1
 | 
					 | 
				
			||||||
0a6472e2203994bc5738d40a340d26f7ec9d6062 0.2
 | 
					 | 
				
			||||||
7e66082e5092fb0bccd18a3695a0bec52c80fdb2 0.3
 | 
					 | 
				
			||||||
eb3165734f00fe7f7da8aeebaed00e60a57caac9 0.4
 | 
					 | 
				
			||||||
22213b9a2114167ee8ba019a012e27da0422a61a 0.5
 | 
					 | 
				
			||||||
c11f86db4550cac5d0a648a3fe4d6d3b9a4fcf7e 0.6
 | 
					 | 
				
			||||||
3fb41412e2492f66476d92ce8f007a8b48fb1d2a 0.7
 | 
					 | 
				
			||||||
cd15de32e173f8ce97bfe1c9b6607937b59056b4 0.8
 | 
					 | 
				
			||||||
fae61afa861755636c4a1070694209ace8efbb6c 0.9
 | 
					 | 
				
			||||||
bbc98e77ae89a7c9232a5be0835f60ea00d8036e 1.0
 | 
					 | 
				
			||||||
44a55e6e46bf6c231780b09d919977d6f01083de 1.1
 | 
					 | 
				
			||||||
e3179ce2b90451d2807cd53b589d768412b8666b 1.2
 | 
					 | 
				
			||||||
f5f5cbf016a94b48a8fe9c47f0736e96d166d5d4 1.3
 | 
					 | 
				
			||||||
3cff9403766bf83a9fc2a0aef230115d68de2a8e 1.4
 | 
					 | 
				
			||||||
728c9089b079721b43c3347124639a29baa22a97 1.5
 | 
					 | 
				
			||||||
ad3fa2d185426c51fd5deceae809770363f8d33c 1.6
 | 
					 | 
				
			||||||
4dbdb61c8b8ce21dee5c7050a6b103855964ed20 1.7
 | 
					 | 
				
			||||||
d5ad819f2a66a40fa75dd2e44429f3bfc884d07b 1.7.1
 | 
					 | 
				
			||||||
c71952fa3c7ca848ec38a6923b5c6d0e18fff431 1.8
 | 
					 | 
				
			||||||
a5567a0d30112822db2627a04a2e7aa3b6c38148 1.9
 | 
					 | 
				
			||||||
12deea36603da407e3f32640048846a3bd74a9ec 2.0
 | 
					 | 
				
			||||||
a2c465098a3b972bbed00feda9804b6aae1e9531 2.1
 | 
					 | 
				
			||||||
7e92f58754ae6edb3225f26d754bd89c1ff458cf 2.2
 | 
					 | 
				
			||||||
719b37b37b0df829d7cf017ac70e353088fe5849 2.3
 | 
					 | 
				
			||||||
32b246925086910d63147483160281a91a47479f 2.4
 | 
					 | 
				
			||||||
dcbbfabc8ecc5f33a6cc950584de87da1a368045 2.5
 | 
					 | 
				
			||||||
c7f84f23ec5aef29988dcdc4ec22a7352ee8f58e 2.5.1
 | 
					 | 
				
			||||||
5308dd22b6ee8e3218c81d9e7e4125f235bb5778 2.6
 | 
					 | 
				
			||||||
21951c0dfbae5af68ed77821a4d87253ee91803f 2.7
 | 
					 | 
				
			||||||
107719a9ce3bd0c79f9f1f626596eb338a276561 2.8
 | 
					 | 
				
			||||||
3a5910fac3ccb522a98aeeba7af7008530b25092 2.9
 | 
					 | 
				
			||||||
76b58d21ea98257c05565a3b9c850b9b26a32968 3.0
 | 
					 | 
				
			||||||
e1c8bef05e6e48df4f26471ea0712aa43ab9d949 3.1
 | 
					 | 
				
			||||||
4ce65f61f01b055fa6c2901c6d2527ef741aa4bf 3.2
 | 
					 | 
				
			||||||
f2cabc83a18f9b5b548159329ddd4dee904fa31f 3.2.1
 | 
					 | 
				
			||||||
d3876aa792923f9a95f7ad0c7f0134533404df35 3.2.2
 | 
					 | 
				
			||||||
0f91934037b04221ff5d1ba3a6c39c1ff26e3661 3.3
 | 
					 | 
				
			||||||
9ede7b2d2450537e750d5505789fbe63960e97e6 3.4
 | 
					 | 
				
			||||||
63ad05e7f9e1f4f1881fb02f529cb6c6ae81e693 3.5
 | 
					 | 
				
			||||||
75b1b25fe0d7e29400baf30568153f668324928b 3.6
 | 
					 | 
				
			||||||
20ec6976cee1fcfee0c2f354ae382ee3f9f68efa 3.6.1
 | 
					 | 
				
			||||||
baee494346e520f8dee2cee9491b8350064770d2 3.7
 | 
					 | 
				
			||||||
2ea201354cf016407ea93e1e390d1422940d29b0 3.8
 | 
					 | 
				
			||||||
55478328b2422c700c5404a774c85e77322f41a3 3.9
 | 
					 | 
				
			||||||
018c3846842291cb6c009dc087e7fe2f0ef53bea 4.0
 | 
					 | 
				
			||||||
00f4180df72b49aadb2933804fde4bfb33e5666d 4.1
 | 
					 | 
				
			||||||
c13cb8c6b7a56af74cc88346e71d2490470b546f 4.2
 | 
					 | 
				
			||||||
e0ec0d5d8b1ef3ee04a83c7c0fee5853aa2ac6a6 4.3
 | 
					 | 
				
			||||||
408014d2126153d2b0fce26a13ba707db222b7b9 4.4
 | 
					 | 
				
			||||||
7c117df5d202530e85066d8b1ab02cef605c79ad 4.4.1
 | 
					 | 
				
			||||||
2acc60d6dfe28c101a8cd44a8aa710a38ae3607c 4.5
 | 
					 | 
				
			||||||
bcd7e18e196a00cc2e97ff3a4a58f3cdaba13856 4.6
 | 
					 | 
				
			||||||
d6d3085307d8d98b8b012b669e858fd787befeb1 4.7
 | 
					 | 
				
			||||||
607015ddb091d49cbd3457af41713691aa69f4d6 4.8
 | 
					 | 
				
			||||||
22c669b2dd3673785c3476b9976da21e8783f745 4.9
 | 
					 | 
				
			||||||
06eb9644e2dad7667d97495eb7d7bc62aa0429e8 5.0
 | 
					 | 
				
			||||||
ce355cea9bb89e162f61913737a46908cdfa7e45 5.1
 | 
					 | 
				
			||||||
e4bcaca8e6ef13d2c3b81f1218ad15e5da4d68bd 5.2
 | 
					 | 
				
			||||||
4004d61160355d869a7d2672561caad440751ba0 5.3
 | 
					 | 
				
			||||||
							
								
								
									
										21
									
								
								LICENSE
									
									
									
									
									
								
							
							
						
						
									
										21
									
								
								LICENSE
									
									
									
									
									
								
							@@ -1,14 +1,23 @@
 | 
				
			|||||||
MIT/X Consortium License
 | 
					MIT/X Consortium License
 | 
				
			||||||
 | 
					
 | 
				
			||||||
© 2006-2008 Anselm R Garbe <garbeam at gmail dot com>
 | 
					© 2006-2019 Anselm R Garbe <anselm@garbe.ca>
 | 
				
			||||||
 | 
					© 2006-2009 Jukka Salmi <jukka at salmi dot ch>
 | 
				
			||||||
© 2006-2007 Sander van Dijk <a dot h dot vandijk at gmail dot com>
 | 
					© 2006-2007 Sander van Dijk <a dot h dot vandijk at gmail dot com>
 | 
				
			||||||
© 2006-2007 Jukka Salmi <jukka at salmi dot ch>
 | 
					© 2007-2011 Peter Hartlich <sgkkr at hartlich dot com>
 | 
				
			||||||
© 2007 Premysl Hruby <dfenze at gmail dot com>
 | 
					© 2007-2009 Szabolcs Nagy <nszabolcs at gmail dot com>
 | 
				
			||||||
© 2007 Szabolcs Nagy <nszabolcs at gmail dot com>
 | 
					© 2007-2009 Christof Musik <christof at sendfax dot de>
 | 
				
			||||||
© 2007 Christof Musik <christof at sendfax dot de>
 | 
					© 2007-2009 Premysl Hruby <dfenze at gmail dot com>
 | 
				
			||||||
© 2007-2008 Enno Gottox Boland <gottox at s01 dot de>
 | 
					© 2007-2008 Enno Gottox Boland <gottox at s01 dot de>
 | 
				
			||||||
© 2007-2008 Peter Hartlich <sgkkr at hartlich dot com>
 | 
					 | 
				
			||||||
© 2008 Martin Hurton <martin dot hurton at gmail dot com>
 | 
					© 2008 Martin Hurton <martin dot hurton at gmail dot com>
 | 
				
			||||||
 | 
					© 2008 Neale Pickett <neale dot woozle dot org>
 | 
				
			||||||
 | 
					© 2009 Mate Nagy <mnagy at port70 dot net>
 | 
				
			||||||
 | 
					© 2010-2016 Hiltjo Posthuma <hiltjo@codemadness.org>
 | 
				
			||||||
 | 
					© 2010-2012 Connor Lane Smith <cls@lubutu.com>
 | 
				
			||||||
 | 
					© 2011 Christoph Lohmann <20h@r-36.net>
 | 
				
			||||||
 | 
					© 2015-2016 Quentin Rameau <quinq@fifth.space>
 | 
				
			||||||
 | 
					© 2015-2016 Eric Pruitt <eric.pruitt@gmail.com>
 | 
				
			||||||
 | 
					© 2016-2017 Markus Teich <markus.teich@stusta.mhn.de>
 | 
				
			||||||
 | 
					© 2020 Sravan Balaji <balajsra@umich.edu>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Permission is hereby granted, free of charge, to any person obtaining a
 | 
					Permission is hereby granted, free of charge, to any person obtaining a
 | 
				
			||||||
copy of this software and associated documentation files (the "Software"),
 | 
					copy of this software and associated documentation files (the "Software"),
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										47
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										47
									
								
								Makefile
									
									
									
									
									
								
							@@ -3,7 +3,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
include config.mk
 | 
					include config.mk
 | 
				
			||||||
 | 
					
 | 
				
			||||||
SRC = dwm.c
 | 
					SRC = drw.c dwm.c util.c
 | 
				
			||||||
OBJ = ${SRC:.c=.o}
 | 
					OBJ = ${SRC:.c=.o}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
all: options dwm
 | 
					all: options dwm
 | 
				
			||||||
@@ -15,46 +15,37 @@ options:
 | 
				
			|||||||
	@echo "CC       = ${CC}"
 | 
						@echo "CC       = ${CC}"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.c.o:
 | 
					.c.o:
 | 
				
			||||||
	@echo CC $<
 | 
						${CC} -c ${CFLAGS} $<
 | 
				
			||||||
	@${CC} -c ${CFLAGS} $<
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
${OBJ}: config.h config.mk
 | 
					${OBJ}: config.h config.mk
 | 
				
			||||||
 | 
					
 | 
				
			||||||
config.h:
 | 
					config.h:
 | 
				
			||||||
	@echo creating $@ from config.def.h
 | 
						cp config.def.h $@
 | 
				
			||||||
	@cp config.def.h $@
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
dwm: ${OBJ}
 | 
					dwm: ${OBJ}
 | 
				
			||||||
	@echo CC -o $@
 | 
						${CC} -o $@ ${OBJ} ${LDFLAGS}
 | 
				
			||||||
	@${CC} -o $@ ${OBJ} ${LDFLAGS}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
clean:
 | 
					clean:
 | 
				
			||||||
	@echo cleaning
 | 
						rm -f dwm ${OBJ} dwm-${VERSION}.tar.gz
 | 
				
			||||||
	@rm -f dwm ${OBJ} dwm-${VERSION}.tar.gz
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
dist: clean
 | 
					dist: clean
 | 
				
			||||||
	@echo creating dist tarball
 | 
						mkdir -p dwm-${VERSION}
 | 
				
			||||||
	@mkdir -p dwm-${VERSION}
 | 
						cp -R LICENSE Makefile README config.def.h config.mk\
 | 
				
			||||||
	@cp -R LICENSE Makefile README config.def.h config.mk \
 | 
							dwm.1 drw.h util.h ${SRC} dwm.png transient.c dwm-${VERSION}
 | 
				
			||||||
		dwm.1 ${SRC} dwm-${VERSION}
 | 
						tar -cf dwm-${VERSION}.tar dwm-${VERSION}
 | 
				
			||||||
	@tar -cf dwm-${VERSION}.tar dwm-${VERSION}
 | 
						gzip dwm-${VERSION}.tar
 | 
				
			||||||
	@gzip dwm-${VERSION}.tar
 | 
						rm -rf dwm-${VERSION}
 | 
				
			||||||
	@rm -rf dwm-${VERSION}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
install: all
 | 
					install: all
 | 
				
			||||||
	@echo installing executable file to ${DESTDIR}${PREFIX}/bin
 | 
						mkdir -p ${DESTDIR}${PREFIX}/bin
 | 
				
			||||||
	@mkdir -p ${DESTDIR}${PREFIX}/bin
 | 
						cp -f dwm ${DESTDIR}${PREFIX}/bin
 | 
				
			||||||
	@cp -f dwm ${DESTDIR}${PREFIX}/bin
 | 
						chmod 755 ${DESTDIR}${PREFIX}/bin/dwm
 | 
				
			||||||
	@chmod 755 ${DESTDIR}${PREFIX}/bin/dwm
 | 
						mkdir -p ${DESTDIR}${MANPREFIX}/man1
 | 
				
			||||||
	@echo installing manual page to ${DESTDIR}${MANPREFIX}/man1
 | 
						sed "s/VERSION/${VERSION}/g" < dwm.1 > ${DESTDIR}${MANPREFIX}/man1/dwm.1
 | 
				
			||||||
	@mkdir -p ${DESTDIR}${MANPREFIX}/man1
 | 
						chmod 644 ${DESTDIR}${MANPREFIX}/man1/dwm.1
 | 
				
			||||||
	@sed "s/VERSION/${VERSION}/g" < dwm.1 > ${DESTDIR}${MANPREFIX}/man1/dwm.1
 | 
					 | 
				
			||||||
	@chmod 644 ${DESTDIR}${MANPREFIX}/man1/dwm.1
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
uninstall:
 | 
					uninstall:
 | 
				
			||||||
	@echo removing executable file from ${DESTDIR}${PREFIX}/bin
 | 
						rm -f ${DESTDIR}${PREFIX}/bin/dwm\
 | 
				
			||||||
	@rm -f ${DESTDIR}${PREFIX}/bin/dwm
 | 
							${DESTDIR}${MANPREFIX}/man1/dwm.1
 | 
				
			||||||
	@echo removing manual page from ${DESTDIR}${MANPREFIX}/man1
 | 
					 | 
				
			||||||
	@rm -f ${DESTDIR}${MANPREFIX}/man1/dwm.1
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.PHONY: all options clean dist install uninstall
 | 
					.PHONY: all options clean dist install uninstall
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										51
									
								
								README
									
									
									
									
									
								
							
							
						
						
									
										51
									
								
								README
									
									
									
									
									
								
							@@ -1,51 +0,0 @@
 | 
				
			|||||||
dwm - dynamic window manager
 | 
					 | 
				
			||||||
============================
 | 
					 | 
				
			||||||
dwm is an extremely fast, small, and dynamic window manager for X.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
Requirements
 | 
					 | 
				
			||||||
------------
 | 
					 | 
				
			||||||
In order to build dwm you need the Xlib header files.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
Installation
 | 
					 | 
				
			||||||
------------
 | 
					 | 
				
			||||||
Edit config.mk to match your local setup (dwm is installed into
 | 
					 | 
				
			||||||
the /usr/local namespace by default).
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
Afterwards enter the following command to build and install dwm (if
 | 
					 | 
				
			||||||
necessary as root):
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    make clean install
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
If you are going to use the default bluegray color scheme it is highly
 | 
					 | 
				
			||||||
recommended to also install the bluegray files shipped in the dextra package.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
Running dwm
 | 
					 | 
				
			||||||
-----------
 | 
					 | 
				
			||||||
Add the following line to your .xinitrc to start dwm using startx:
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    exec dwm
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
In order to connect dwm to a specific display, make sure that
 | 
					 | 
				
			||||||
the DISPLAY environment variable is set correctly, e.g.:
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    DISPLAY=foo.bar:1 exec dwm
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(This will start dwm on display :1 of the host foo.bar.)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
In order to display status info in the bar, you can do something
 | 
					 | 
				
			||||||
like this in your .xinitrc:
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    while true
 | 
					 | 
				
			||||||
    do
 | 
					 | 
				
			||||||
        echo `date` `uptime | sed 's/.*,//'`
 | 
					 | 
				
			||||||
        sleep 1
 | 
					 | 
				
			||||||
    done | dwm
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
Configuration
 | 
					 | 
				
			||||||
-------------
 | 
					 | 
				
			||||||
The configuration of dwm is done by creating a custom config.h
 | 
					 | 
				
			||||||
and (re)compiling the source code.
 | 
					 | 
				
			||||||
							
								
								
									
										79
									
								
								README.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										79
									
								
								README.md
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,79 @@
 | 
				
			|||||||
 | 
					# Sravan's dwm - dynamic window manager
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[dwm](https://dwm.suckless.org/) is an extremely fast, small, and dynamic window manager for X.
 | 
				
			||||||
 | 
					This is Sravan's fork of dwm with patches and custom modifications.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## dwm Information
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					### Requirements
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					In order to build dwm you need the Xlib header files.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					### Installation
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Edit config.mk to match your local setup (dwm is installed into
 | 
				
			||||||
 | 
					the /usr/local namespace by default).
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Afterwards enter the following command to build and install dwm (if
 | 
				
			||||||
 | 
					necessary as root):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    make clean install
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					### Running dwm
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Add the following line to your .xinitrc to start dwm using startx:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    exec dwm
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					In order to connect dwm to a specific display, make sure that
 | 
				
			||||||
 | 
					the DISPLAY environment variable is set correctly, e.g.:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    DISPLAY=foo.bar:1 exec dwm
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					(This will start dwm on display :1 of the host foo.bar.)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					In order to display status info in the bar, you can do something
 | 
				
			||||||
 | 
					like this in your .xinitrc:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    while xsetroot -name "`date` `uptime | sed 's/.*,//'`"
 | 
				
			||||||
 | 
					    do
 | 
				
			||||||
 | 
					    	sleep 1
 | 
				
			||||||
 | 
					    done &
 | 
				
			||||||
 | 
					    exec dwm
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					### Configuration
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					The configuration of dwm is done by creating a custom config.h
 | 
				
			||||||
 | 
					and (re)compiling the source code.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Personal Modifications
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					### Patches
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					* [autostart](https://dwm.suckless.org/patches/autostart/)
 | 
				
			||||||
 | 
					* [centeredmaster](https://dwm.suckless.org/patches/centeredmaster/)
 | 
				
			||||||
 | 
					* [combo](https://dwm.suckless.org/patches/combo/)
 | 
				
			||||||
 | 
					* [cyclelayouts](https://dwm.suckless.org/patches/cyclelayouts/)
 | 
				
			||||||
 | 
					* [gridmode](https://dwm.suckless.org/patches/gridmode/)
 | 
				
			||||||
 | 
					* [movestack](https://dwm.suckless.org/patches/movestack/)
 | 
				
			||||||
 | 
					* [restartsig](https://dwm.suckless.org/patches/restartsig/)
 | 
				
			||||||
 | 
					* [ru_gaps](https://dwm.suckless.org/patches/ru_gaps/)
 | 
				
			||||||
 | 
					* [systray](https://dwm.suckless.org/patches/systray/)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					### Modifications
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					* Change mod key to super key (windows key)
 | 
				
			||||||
 | 
					* Change terminal from st to alacritty
 | 
				
			||||||
 | 
					* Change colors to follow [Dracula](https://draculatheme.com) theme
 | 
				
			||||||
 | 
					* Increase border to 3 pixels
 | 
				
			||||||
 | 
					* Set default gap size to 10 pixels
 | 
				
			||||||
 | 
					* Change tags to be [Font Awesome](https://fontawesome.com) icons
 | 
				
			||||||
 | 
					* Run programs and processes on autostart
 | 
				
			||||||
 | 
					* [Pulse Audio Volume Control](https://gist.github.com/palopezv/efd34059af6126ad970940bcc6a90f2e)
 | 
				
			||||||
 | 
					* Media Play/Pause, Prev, and Next Keybindings via [Playerctl](https://github.com/altdesktop/playerctl)
 | 
				
			||||||
 | 
					  * Arch Community Repo: [playerctl](https://www.archlinux.org/packages/community/x86_64/playerctl/)
 | 
				
			||||||
 | 
					* Use [light-locker](https://github.com/the-cavalry/light-locker) to lock screen with [LightDM](https://github.com/canonical/lightdm)
 | 
				
			||||||
 | 
					  * Arch Community Repo: [lightdm](https://www.archlinux.org/packages/extra/x86_64/lightdm/)
 | 
				
			||||||
 | 
					  * Arch Community Repo: [light-locker](https://www.archlinux.org/packages/community/x86_64/light-locker/)
 | 
				
			||||||
 | 
					* Brightness Increase and Decrease Keybindings via [acpilight](https://gitlab.com/wavexx/acpilight)
 | 
				
			||||||
 | 
					  * Arch Community Repo: [acpilight](https://www.archlinux.org/packages/community/any/acpilight/)
 | 
				
			||||||
							
								
								
									
										53
									
								
								autoquit.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										53
									
								
								autoquit.sh
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,53 @@
 | 
				
			|||||||
 | 
					#!/bin/bash
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					########################
 | 
				
			||||||
 | 
					# Startup Applications #
 | 
				
			||||||
 | 
					########################
 | 
				
			||||||
 | 
					# List of applications to kill on exit
 | 
				
			||||||
 | 
					declare -a applications_array=(\
 | 
				
			||||||
 | 
					    # System Tray Applications
 | 
				
			||||||
 | 
					    "volctl" \          # PulseAudio Volume Control
 | 
				
			||||||
 | 
					    "nyrna" \           # Nyrna Application Suspend
 | 
				
			||||||
 | 
					    "blueman-tray" \    # Blueman Bluetooth Manager
 | 
				
			||||||
 | 
					    "nm-applet" \       # Network Manager Applet
 | 
				
			||||||
 | 
					    "kdeconnect-indi" \ # KDE Connect
 | 
				
			||||||
 | 
					    "flameshot" \       # Flameshot Screenshot Tool
 | 
				
			||||||
 | 
					    "redshift-gtk" \    # Redshift Blue Light Filter
 | 
				
			||||||
 | 
					    # Background Processes
 | 
				
			||||||
 | 
					    "picom" \           # Picom Compositor
 | 
				
			||||||
 | 
					    "xfce4-notifyd" \   # Xfce Notification Daemon
 | 
				
			||||||
 | 
					    "greenclip" \       # Greenclip Clipboard Manager
 | 
				
			||||||
 | 
					    "redshift" \        # Redshift Blue Light Filter
 | 
				
			||||||
 | 
					    "polkit-gnome-au" \ # GNOME Polkit Authentication Agent
 | 
				
			||||||
 | 
					    "slstatus" \        # slstatus status bar
 | 
				
			||||||
 | 
					    "light-locker" \    # LightDM Locker
 | 
				
			||||||
 | 
					    # Hardware Driver Applications
 | 
				
			||||||
 | 
					    "solaar" \          # Logitech Mouse Driver
 | 
				
			||||||
 | 
					    "polychromatic-t" \ # Razer Keyboard Customization
 | 
				
			||||||
 | 
					    "optimus-manager" \ # Optimus Manager Qt
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Kill applications
 | 
				
			||||||
 | 
					for i in "${applications_array[@]}"
 | 
				
			||||||
 | 
					do
 | 
				
			||||||
 | 
					    pkill -9 $i &
 | 
				
			||||||
 | 
					done
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#####################
 | 
				
			||||||
 | 
					# Cloud Drive Rsync #
 | 
				
			||||||
 | 
					#####################
 | 
				
			||||||
 | 
					# Local cloud storage directory
 | 
				
			||||||
 | 
					local_clone_dir="$HOME/Cloud"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# List of remotes as defined in rclone
 | 
				
			||||||
 | 
					declare -a remote_array=(\
 | 
				
			||||||
 | 
					    "OneDrive - Personal" \
 | 
				
			||||||
 | 
					    "Google Drive - Personal" \
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Unmount Remotes
 | 
				
			||||||
 | 
					for i in "${remote_array[@]}"
 | 
				
			||||||
 | 
					do
 | 
				
			||||||
 | 
					    local_path="$local_clone_dir"/"$i"
 | 
				
			||||||
 | 
					    fusermount -u "$local_path" &
 | 
				
			||||||
 | 
					done
 | 
				
			||||||
							
								
								
									
										62
									
								
								autostart.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										62
									
								
								autostart.sh
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,62 @@
 | 
				
			|||||||
 | 
					#!/bin/bash
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					########################
 | 
				
			||||||
 | 
					# Startup Applications #
 | 
				
			||||||
 | 
					########################
 | 
				
			||||||
 | 
					# List of applications to run on start
 | 
				
			||||||
 | 
					declare -a applications_array=(\
 | 
				
			||||||
 | 
					    # System Restore Processes
 | 
				
			||||||
 | 
					    "bash /home/sravan/.screenlayout/default-screen-layout.sh" \    # Restore default screen layout
 | 
				
			||||||
 | 
					    "nitrogen --restore" \                                          # Restore wallpaper
 | 
				
			||||||
 | 
					    # System Tray Applications
 | 
				
			||||||
 | 
					    "volctl" \                                                      # PulseAudio Volume Control
 | 
				
			||||||
 | 
					    "nyrna" \                                                       # Nyrna Application Suspend
 | 
				
			||||||
 | 
					    "blueman-tray" \                                                # Blueman Bluetooth Manager
 | 
				
			||||||
 | 
					    "nm-applet" \                                                   # Network Manager Applet
 | 
				
			||||||
 | 
					    "kdeconnect-indicator" \                                        # KDE Connect
 | 
				
			||||||
 | 
					    "flameshot" \                                                   # Flameshot Screenshot Tool
 | 
				
			||||||
 | 
					    # Background Processes
 | 
				
			||||||
 | 
					    "picom --config /home/sravan/.config/picom/picom.conf" \        # Picom Compositor
 | 
				
			||||||
 | 
					    "/usr/lib/xfce4/notifyd/xfce4-notifyd" \                        # Xfce Notification Daemon
 | 
				
			||||||
 | 
					    "greenclip daemon" \                                            # Greenclip Clipboard Manager
 | 
				
			||||||
 | 
					    "redshift -x" \                                                 # Reset redshift display gamma
 | 
				
			||||||
 | 
					    "redshift-gtk" \                                                # Redshift Blue Light Filter
 | 
				
			||||||
 | 
					    "/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1" \   # GNOME Polkit Authentication Agent
 | 
				
			||||||
 | 
					    "slstatus" \                                                    # slstatus status bar
 | 
				
			||||||
 | 
					    "light-locker --lock-on-suspend --lock-on-lid" \                # LightDM Locker
 | 
				
			||||||
 | 
					    # Hardware Driver Applications
 | 
				
			||||||
 | 
					    "solaar --window=hide" \                                        # Logitech Mouse Driver
 | 
				
			||||||
 | 
					    "polychromatic-tray-applet" \                                   # Razer Keyboard Customization
 | 
				
			||||||
 | 
					    "optimus-manager-qt" \                                          # Optimus Manager Qt
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Run applications (ignore if they don't exist)
 | 
				
			||||||
 | 
					for i in "${applications_array[@]}"
 | 
				
			||||||
 | 
					do
 | 
				
			||||||
 | 
					    if ! command -v $i > /dev/null
 | 
				
			||||||
 | 
					    then
 | 
				
			||||||
 | 
					        do_nothing() { :; }
 | 
				
			||||||
 | 
					    else
 | 
				
			||||||
 | 
					        $i &
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
 | 
					done
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#####################
 | 
				
			||||||
 | 
					# Cloud Drive Rsync #
 | 
				
			||||||
 | 
					#####################
 | 
				
			||||||
 | 
					# Local cloud storage directory
 | 
				
			||||||
 | 
					local_clone_dir="$HOME/Cloud"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# List of remotes as defined in rclone
 | 
				
			||||||
 | 
					declare -a remote_array=(\
 | 
				
			||||||
 | 
					    "OneDrive - Personal" \
 | 
				
			||||||
 | 
					    "Google Drive - Personal" \
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Mount Remotes
 | 
				
			||||||
 | 
					for i in "${remote_array[@]}"
 | 
				
			||||||
 | 
					do
 | 
				
			||||||
 | 
					    local_path="$local_clone_dir"/"$i"
 | 
				
			||||||
 | 
					    mkdir -p "$local_path"
 | 
				
			||||||
 | 
					    rclone mount "$i": "$local_path" &
 | 
				
			||||||
 | 
					done
 | 
				
			||||||
							
								
								
									
										66
									
								
								config.def.h
									
									
									
									
									
								
							
							
						
						
									
										66
									
								
								config.def.h
									
									
									
									
									
								
							@@ -1,36 +1,42 @@
 | 
				
			|||||||
/* See LICENSE file for copyright and license details. */
 | 
					/* See LICENSE file for copyright and license details. */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* appearance */
 | 
					/* appearance */
 | 
				
			||||||
static const char font[]            = "-*-terminus-medium-r-normal-*-14-*-*-*-*-*-*-*";
 | 
					static const unsigned int borderpx  = 1;        /* border pixel of windows */
 | 
				
			||||||
static const char normbordercolor[] = "#cccccc";
 | 
					static const unsigned int snap      = 32;       /* snap pixel */
 | 
				
			||||||
static const char normbgcolor[]     = "#cccccc";
 | 
					static const int showbar            = 1;        /* 0 means no bar */
 | 
				
			||||||
static const char normfgcolor[]     = "#000000";
 | 
					static const int topbar             = 1;        /* 0 means bottom bar */
 | 
				
			||||||
static const char selbordercolor[]  = "#0066ff";
 | 
					static const char *fonts[]          = { "monospace:size=10" };
 | 
				
			||||||
static const char selbgcolor[]      = "#0066ff";
 | 
					static const char dmenufont[]       = "monospace:size=10";
 | 
				
			||||||
static const char selfgcolor[]      = "#ffffff";
 | 
					static const char col_gray1[]       = "#222222";
 | 
				
			||||||
static unsigned int borderpx        = 1;        /* border pixel of windows */
 | 
					static const char col_gray2[]       = "#444444";
 | 
				
			||||||
static unsigned int snap            = 32;       /* snap pixel */
 | 
					static const char col_gray3[]       = "#bbbbbb";
 | 
				
			||||||
static Bool showbar                 = True;     /* False means no bar */
 | 
					static const char col_gray4[]       = "#eeeeee";
 | 
				
			||||||
static Bool topbar                  = True;     /* False means bottom bar */
 | 
					static const char col_cyan[]        = "#005577";
 | 
				
			||||||
static Bool readin                  = True;     /* False means do not read stdin */
 | 
					static const char *colors[][3]      = {
 | 
				
			||||||
static Bool usegrab                 = False;    /* True means grabbing the X server
 | 
						/*               fg         bg         border   */
 | 
				
			||||||
                                                   during mouse-based resizals */
 | 
						[SchemeNorm] = { col_gray3, col_gray1, col_gray2 },
 | 
				
			||||||
 | 
						[SchemeSel]  = { col_gray4, col_cyan,  col_cyan  },
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* tagging */
 | 
					/* tagging */
 | 
				
			||||||
static const char tags[][MAXTAGLEN] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
 | 
					static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
 | 
				
			||||||
static unsigned int tagset[] = {1, 1}; /* after start, first tag is selected */
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
static Rule rules[] = {
 | 
					static const Rule rules[] = {
 | 
				
			||||||
	/* class      instance    title       tags mask     isfloating */
 | 
						/* xprop(1):
 | 
				
			||||||
	{ "Gimp",     NULL,       NULL,       0,            True },
 | 
						 *	WM_CLASS(STRING) = instance, class
 | 
				
			||||||
	{ "Firefox",  NULL,       NULL,       1 << 8,       True },
 | 
						 *	WM_NAME(STRING) = title
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
 | 
						/* class      instance    title       tags mask     isfloating   monitor */
 | 
				
			||||||
 | 
						{ "Gimp",     NULL,       NULL,       0,            1,           -1 },
 | 
				
			||||||
 | 
						{ "Firefox",  NULL,       NULL,       1 << 8,       0,           -1 },
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* layout(s) */
 | 
					/* layout(s) */
 | 
				
			||||||
static float mfact      = 0.55; /* factor of master area size [0.05..0.95] */
 | 
					static const float mfact     = 0.55; /* factor of master area size [0.05..0.95] */
 | 
				
			||||||
static Bool resizehints = True; /* False means respect size hints in tiled resizals */
 | 
					static const int nmaster     = 1;    /* number of clients in master area */
 | 
				
			||||||
 | 
					static const int resizehints = 1;    /* 1 means respect size hints in tiled resizals */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static Layout layouts[] = {
 | 
					static const Layout layouts[] = {
 | 
				
			||||||
	/* symbol     arrange function */
 | 
						/* symbol     arrange function */
 | 
				
			||||||
	{ "[]=",      tile },    /* first entry is default */
 | 
						{ "[]=",      tile },    /* first entry is default */
 | 
				
			||||||
	{ "><>",      NULL },    /* no layout function means floating behavior */
 | 
						{ "><>",      NULL },    /* no layout function means floating behavior */
 | 
				
			||||||
@@ -49,8 +55,9 @@ static Layout layouts[] = {
 | 
				
			|||||||
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
 | 
					#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* commands */
 | 
					/* commands */
 | 
				
			||||||
static const char *dmenucmd[] = { "dmenu_run", "-fn", font, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbgcolor, "-sf", selfgcolor, NULL };
 | 
					static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
 | 
				
			||||||
static const char *termcmd[]  = { "uxterm", NULL };
 | 
					static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL };
 | 
				
			||||||
 | 
					static const char *termcmd[]  = { "st", NULL };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static Key keys[] = {
 | 
					static Key keys[] = {
 | 
				
			||||||
	/* modifier                     key        function        argument */
 | 
						/* modifier                     key        function        argument */
 | 
				
			||||||
@@ -59,6 +66,8 @@ static Key keys[] = {
 | 
				
			|||||||
	{ MODKEY,                       XK_b,      togglebar,      {0} },
 | 
						{ MODKEY,                       XK_b,      togglebar,      {0} },
 | 
				
			||||||
	{ MODKEY,                       XK_j,      focusstack,     {.i = +1 } },
 | 
						{ MODKEY,                       XK_j,      focusstack,     {.i = +1 } },
 | 
				
			||||||
	{ MODKEY,                       XK_k,      focusstack,     {.i = -1 } },
 | 
						{ MODKEY,                       XK_k,      focusstack,     {.i = -1 } },
 | 
				
			||||||
 | 
						{ MODKEY,                       XK_i,      incnmaster,     {.i = +1 } },
 | 
				
			||||||
 | 
						{ MODKEY,                       XK_d,      incnmaster,     {.i = -1 } },
 | 
				
			||||||
	{ MODKEY,                       XK_h,      setmfact,       {.f = -0.05} },
 | 
						{ MODKEY,                       XK_h,      setmfact,       {.f = -0.05} },
 | 
				
			||||||
	{ MODKEY,                       XK_l,      setmfact,       {.f = +0.05} },
 | 
						{ MODKEY,                       XK_l,      setmfact,       {.f = +0.05} },
 | 
				
			||||||
	{ MODKEY,                       XK_Return, zoom,           {0} },
 | 
						{ MODKEY,                       XK_Return, zoom,           {0} },
 | 
				
			||||||
@@ -71,6 +80,10 @@ static Key keys[] = {
 | 
				
			|||||||
	{ MODKEY|ShiftMask,             XK_space,  togglefloating, {0} },
 | 
						{ MODKEY|ShiftMask,             XK_space,  togglefloating, {0} },
 | 
				
			||||||
	{ MODKEY,                       XK_0,      view,           {.ui = ~0 } },
 | 
						{ MODKEY,                       XK_0,      view,           {.ui = ~0 } },
 | 
				
			||||||
	{ MODKEY|ShiftMask,             XK_0,      tag,            {.ui = ~0 } },
 | 
						{ MODKEY|ShiftMask,             XK_0,      tag,            {.ui = ~0 } },
 | 
				
			||||||
 | 
						{ MODKEY,                       XK_comma,  focusmon,       {.i = -1 } },
 | 
				
			||||||
 | 
						{ MODKEY,                       XK_period, focusmon,       {.i = +1 } },
 | 
				
			||||||
 | 
						{ MODKEY|ShiftMask,             XK_comma,  tagmon,         {.i = -1 } },
 | 
				
			||||||
 | 
						{ MODKEY|ShiftMask,             XK_period, tagmon,         {.i = +1 } },
 | 
				
			||||||
	TAGKEYS(                        XK_1,                      0)
 | 
						TAGKEYS(                        XK_1,                      0)
 | 
				
			||||||
	TAGKEYS(                        XK_2,                      1)
 | 
						TAGKEYS(                        XK_2,                      1)
 | 
				
			||||||
	TAGKEYS(                        XK_3,                      2)
 | 
						TAGKEYS(                        XK_3,                      2)
 | 
				
			||||||
@@ -84,8 +97,7 @@ static Key keys[] = {
 | 
				
			|||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* button definitions */
 | 
					/* button definitions */
 | 
				
			||||||
/* click can be a tag number (starting at 0),
 | 
					/* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
 | 
				
			||||||
 * ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
 | 
					 | 
				
			||||||
static Button buttons[] = {
 | 
					static Button buttons[] = {
 | 
				
			||||||
	/* click                event mask      button          function        argument */
 | 
						/* click                event mask      button          function        argument */
 | 
				
			||||||
	{ ClkLtSymbol,          0,              Button1,        setlayout,      {0} },
 | 
						{ ClkLtSymbol,          0,              Button1,        setlayout,      {0} },
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										164
									
								
								config.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										164
									
								
								config.h
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,164 @@
 | 
				
			|||||||
 | 
					/* See LICENSE file for copyright and license details. */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/* includes */
 | 
				
			||||||
 | 
					#include <X11/XF86keysym.h>
 | 
				
			||||||
 | 
					#include "movestack.c"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/* appearance */
 | 
				
			||||||
 | 
					static const unsigned int borderpx  = 3;        /* border pixel of windows */
 | 
				
			||||||
 | 
					static const int gappx				= 15;		/* gaps between windows */
 | 
				
			||||||
 | 
					static const unsigned int snap      = 10;       /* snap pixel */
 | 
				
			||||||
 | 
					static const unsigned int systraypinning = 0;   /* 0: sloppy systray follows selected monitor, >0: pin systray to monitor X */
 | 
				
			||||||
 | 
					static const unsigned int systrayspacing = 2;   /* systray spacing */
 | 
				
			||||||
 | 
					static const int systraypinningfailfirst = 1;   /* 1: if pinning fails, display systray on the first monitor, False: display systray on the last monitor*/
 | 
				
			||||||
 | 
					static const int showsystray        = 1;     	/* 0 means no systray */
 | 
				
			||||||
 | 
					static const int showbar            = 1;        /* 0 means no bar */
 | 
				
			||||||
 | 
					static const int topbar             = 1;        /* 0 means bottom bar */
 | 
				
			||||||
 | 
					static const char *fonts[]          = { "NotoSans Nerd Font:size=10" };
 | 
				
			||||||
 | 
					static const char col_gray1[]       = "#282a36"; /* background color */
 | 
				
			||||||
 | 
					static const char col_gray2[]       = "#44475a"; /* inactive window border color */
 | 
				
			||||||
 | 
					static const char col_gray3[]       = "#f8f8f2"; /* font color */
 | 
				
			||||||
 | 
					static const char col_gray4[]       = "#282a36"; /* current tag and current window font color */
 | 
				
			||||||
 | 
					static const char col_cyan[]        = "#bd93f9"; /* Top bar second color and active window border color */
 | 
				
			||||||
 | 
					static const char *colors[][3]      = {
 | 
				
			||||||
 | 
						/*               fg         bg         border   */
 | 
				
			||||||
 | 
						[SchemeNorm] = { col_gray3, col_gray1, col_gray2 },
 | 
				
			||||||
 | 
						[SchemeSel]  = { col_gray4, col_cyan,  col_cyan  },
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/* tagging */
 | 
				
			||||||
 | 
					static const char *tags[] = { " ₁", "龎 ₂", " ₃", " ₄", "爵 ₅", " ₆", " ₇", " ₈", " ₉" };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static const Rule rules[] = {
 | 
				
			||||||
 | 
						/* xprop(1):
 | 
				
			||||||
 | 
						 *	WM_CLASS(STRING) = instance, class
 | 
				
			||||||
 | 
						 *	WM_NAME(STRING) = title
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
 | 
						/* class      instance    title       tags mask     isfloating   monitor */
 | 
				
			||||||
 | 
						{ "origin",	  NULL,		  NULL,		  0,			1,			 -1 },
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/* layout(s) */
 | 
				
			||||||
 | 
					static const float mfact     = 0.55; /* factor of master area size [0.05..0.95] */
 | 
				
			||||||
 | 
					static const int nmaster     = 1;    /* number of clients in master area */
 | 
				
			||||||
 | 
					static const int resizehints = 1;    /* 1 means respect size hints in tiled resizals */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include "layouts.c"
 | 
				
			||||||
 | 
					static const Layout layouts[] = {
 | 
				
			||||||
 | 
						/* symbol     arrange function */
 | 
				
			||||||
 | 
						{ "[]=",      tile },    /* first entry is default */
 | 
				
			||||||
 | 
						{ "><>",      NULL },    /* no layout function means floating behavior */
 | 
				
			||||||
 | 
						{ "[M]",      monocle },
 | 
				
			||||||
 | 
						{ "|M|",      centeredmaster },
 | 
				
			||||||
 | 
						{ ">M>",      centeredfloatingmaster },
 | 
				
			||||||
 | 
						{ "HHH",      grid },
 | 
				
			||||||
 | 
						{ NULL,       NULL },
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/* key definitions */
 | 
				
			||||||
 | 
					#define MODKEY Mod4Mask		/* Mod1Mask = Alt, Mod4Mask = Super */
 | 
				
			||||||
 | 
					#define TAGKEYS(KEY,TAG) \
 | 
				
			||||||
 | 
						{ MODKEY,                       KEY,      comboview,      {.ui = 1 << TAG} }, \
 | 
				
			||||||
 | 
						{ MODKEY|ControlMask,           KEY,      toggleview,     {.ui = 1 << TAG} }, \
 | 
				
			||||||
 | 
						{ MODKEY|ShiftMask,             KEY,      combotag,       {.ui = 1 << TAG} }, \
 | 
				
			||||||
 | 
						{ MODKEY|ControlMask|ShiftMask, KEY,      toggletag,      {.ui = 1 << TAG} },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/* helper for spawning shell commands in the pre dwm-5.0 fashion */
 | 
				
			||||||
 | 
					#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/* configuration parameters */
 | 
				
			||||||
 | 
					static const char rootdir[] = "/home/sravan/.config"; /* Location of dwm source code */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/* commands */
 | 
				
			||||||
 | 
					static const char *rofiruncmd[]			= { "rofi", "-show", "drun",	  NULL };
 | 
				
			||||||
 | 
					static const char *roficlipcmd[]		= { "rofi", "-show", "clipboard", NULL };
 | 
				
			||||||
 | 
					static const char *lockcmd[]			= { "light-locker-command", "--lock",  NULL };
 | 
				
			||||||
 | 
					static const char *sleepcmd[]			= { "systemctl",			"suspend", NULL };
 | 
				
			||||||
 | 
					static const char *termcmd[]			= { "alacritty", NULL };
 | 
				
			||||||
 | 
					static const char *upvolcmd[]			= { "/usr/bin/pactl", "set-sink-volume", "@DEFAULT_SINK@", "+1%",     NULL };
 | 
				
			||||||
 | 
					static const char *downvolcmd[]			= { "/usr/bin/pactl", "set-sink-volume", "@DEFAULT_SINK@", "-1%",     NULL };
 | 
				
			||||||
 | 
					static const char *mutevolcmd[]			= { "/usr/bin/pactl", "set-sink-mute",   "@DEFAULT_SINK@", "toggle",  NULL };
 | 
				
			||||||
 | 
					static const char *brightness_up[]		= { "xbacklight", "-inc", "1", NULL };
 | 
				
			||||||
 | 
					static const char *brightness_down[]	= { "xbacklight", "-dec", "1", NULL };
 | 
				
			||||||
 | 
					static const char *playerplaypausecmd[]	= { "playerctl", "--player=playerctld", "play-pause", NULL };
 | 
				
			||||||
 | 
					static const char *playernextcmd[]		= { "playerctl", "--player=playerctld", "next", 	  NULL };
 | 
				
			||||||
 | 
					static const char *playerprevcmd[]		= { "playerctl", "--player=playerctld", "previous",   NULL };
 | 
				
			||||||
 | 
					static const char *flameshotcmd[]		= { "flameshot", "gui",	NULL };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/* key definitions */
 | 
				
			||||||
 | 
					static Key keys[] = {
 | 
				
			||||||
 | 
						/* modifier						key							function		argument */
 | 
				
			||||||
 | 
						{ MODKEY,						XK_p,						spawn,          {.v = rofiruncmd} },
 | 
				
			||||||
 | 
						{ MODKEY,						XK_c,						spawn,          {.v = roficlipcmd} },
 | 
				
			||||||
 | 
						{ MODKEY|ShiftMask,				XK_l,						spawn,          {.v = lockcmd} },
 | 
				
			||||||
 | 
						{ MODKEY|ShiftMask,				XK_s,						spawn,          {.v = sleepcmd} },
 | 
				
			||||||
 | 
						{ MODKEY|ShiftMask,				XK_Return,					spawn,          {.v = termcmd} },
 | 
				
			||||||
 | 
						{ MODKEY,           			XK_b,      					togglebar,      {0} },
 | 
				
			||||||
 | 
						{ MODKEY,           			XK_j,      					focusstack,     {.i = +1} },
 | 
				
			||||||
 | 
						{ MODKEY,           			XK_k,      					focusstack,     {.i = -1} },
 | 
				
			||||||
 | 
						{ MODKEY,           			XK_i,      					incnmaster,     {.i = +1} },
 | 
				
			||||||
 | 
						{ MODKEY,           			XK_d,      					incnmaster,     {.i = -1} },
 | 
				
			||||||
 | 
						{ MODKEY,           			XK_h,						setmfact,       {.f = -0.05} },
 | 
				
			||||||
 | 
						{ MODKEY,           			XK_l,						setmfact,       {.f = +0.05} },
 | 
				
			||||||
 | 
						{ MODKEY|ShiftMask,				XK_j,						movestack,      {.i = +1} },
 | 
				
			||||||
 | 
						{ MODKEY|ShiftMask,				XK_k,						movestack,      {.i = -1} },
 | 
				
			||||||
 | 
						{ MODKEY,           			XK_Return,					zoom,           {0} },
 | 
				
			||||||
 | 
						{ MODKEY,           			XK_Tab,						view,           {0} },
 | 
				
			||||||
 | 
						{ MODKEY|ShiftMask, 			XK_c,						killclient,     {0} },
 | 
				
			||||||
 | 
						{ MODKEY,           			XK_t,						setlayout,      {.v = &layouts[0]} },
 | 
				
			||||||
 | 
						{ MODKEY,           			XK_f,						setlayout,      {.v = &layouts[1]} },
 | 
				
			||||||
 | 
						{ MODKEY,           			XK_m,						setlayout,      {.v = &layouts[2]} },
 | 
				
			||||||
 | 
						{ MODKEY,						XK_u,						setlayout,		{.v = &layouts[3]} },
 | 
				
			||||||
 | 
						{ MODKEY,						XK_o,						setlayout,		{.v = &layouts[4]} },
 | 
				
			||||||
 | 
						{ MODKEY,						XK_g,						setlayout,		{.v = &layouts[5]} },
 | 
				
			||||||
 | 
						{ MODKEY|ControlMask,			XK_comma,					cyclelayout,	{.i = -1 } },
 | 
				
			||||||
 | 
						{ MODKEY|ControlMask,			XK_period,					cyclelayout,	{.i = +1 } },
 | 
				
			||||||
 | 
						{ MODKEY,           			XK_space,					setlayout,      {0} },
 | 
				
			||||||
 | 
						{ MODKEY|ShiftMask, 			XK_space,					togglefloating, {0} },
 | 
				
			||||||
 | 
						{ MODKEY,           			XK_0,						view,           {.ui = ~0} },
 | 
				
			||||||
 | 
						{ MODKEY|ShiftMask, 			XK_0,						tag,            {.ui = ~0} },
 | 
				
			||||||
 | 
						{ MODKEY,           			XK_comma,					focusmon,       {.i = -1} },
 | 
				
			||||||
 | 
						{ MODKEY,           			XK_period,					focusmon,       {.i = +1} },
 | 
				
			||||||
 | 
						{ MODKEY|ShiftMask, 			XK_comma,					tagmon,         {.i = -1} },
 | 
				
			||||||
 | 
						{ MODKEY|ShiftMask, 			XK_period, 					tagmon,         {.i = +1} },
 | 
				
			||||||
 | 
						{ MODKEY,						XK_minus,					setgaps,        {.i = -5 } },
 | 
				
			||||||
 | 
						{ MODKEY,						XK_equal,					setgaps,        {.i = +5 } },
 | 
				
			||||||
 | 
						{ MODKEY|ShiftMask,				XK_equal,					setgaps,        {.i = 0  } },
 | 
				
			||||||
 | 
						{ 0,							XF86XK_AudioLowerVolume,	spawn,			{.v = downvolcmd} },
 | 
				
			||||||
 | 
						{ 0,                			XF86XK_AudioMute,			spawn,			{.v = mutevolcmd} },
 | 
				
			||||||
 | 
						{ 0,                			XF86XK_AudioRaiseVolume,	spawn,			{.v = upvolcmd} },
 | 
				
			||||||
 | 
						{ 0, 							XF86XK_MonBrightnessUp,		spawn,			{.v = brightness_up} },
 | 
				
			||||||
 | 
						{ 0, 							XF86XK_MonBrightnessDown,	spawn,			{.v = brightness_down} },
 | 
				
			||||||
 | 
						{ 0,							XF86XK_AudioPlay,			spawn,			{.v = playerplaypausecmd} },
 | 
				
			||||||
 | 
						{ 0,							XF86XK_AudioNext,			spawn,			{.v = playernextcmd} },
 | 
				
			||||||
 | 
						{ 0,							XF86XK_AudioPrev,			spawn,			{.v = playerprevcmd} },
 | 
				
			||||||
 | 
						{ 0,							XK_Print,					spawn,			{.v = flameshotcmd} },
 | 
				
			||||||
 | 
						TAGKEYS(            			XK_1,                      					0)
 | 
				
			||||||
 | 
						TAGKEYS(            			XK_2,                      					1)
 | 
				
			||||||
 | 
						TAGKEYS(            			XK_3,                      					2)
 | 
				
			||||||
 | 
						TAGKEYS(            			XK_4,                      					3)
 | 
				
			||||||
 | 
						TAGKEYS(            			XK_5,                      					4)
 | 
				
			||||||
 | 
						TAGKEYS(            			XK_6,                      					5)
 | 
				
			||||||
 | 
						TAGKEYS(            			XK_7,                      					6)
 | 
				
			||||||
 | 
						TAGKEYS(            			XK_8,                      					7)
 | 
				
			||||||
 | 
						TAGKEYS(            			XK_9,                      					8)
 | 
				
			||||||
 | 
						{ MODKEY|ShiftMask, 			XK_q,      					quit,			{0} },
 | 
				
			||||||
 | 
						{ MODKEY|ControlMask|ShiftMask,	XK_q,      					quit,           {1} },
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/* button definitions */
 | 
				
			||||||
 | 
					/* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
 | 
				
			||||||
 | 
					static Button buttons[] = {
 | 
				
			||||||
 | 
						/* click                event mask      button          function        argument */
 | 
				
			||||||
 | 
						{ ClkLtSymbol,          0,              Button1,        setlayout,      {0} },
 | 
				
			||||||
 | 
						{ ClkLtSymbol,          0,              Button3,        setlayout,      {.v = &layouts[2]} },
 | 
				
			||||||
 | 
						{ ClkWinTitle,          0,              Button2,        zoom,           {0} },
 | 
				
			||||||
 | 
						{ ClkStatusText,        0,              Button2,        spawn,          {.v = termcmd } },
 | 
				
			||||||
 | 
						{ ClkClientWin,         MODKEY,         Button1,        movemouse,      {0} },
 | 
				
			||||||
 | 
						{ ClkClientWin,         MODKEY,         Button2,        togglefloating, {0} },
 | 
				
			||||||
 | 
						{ ClkClientWin,         MODKEY,         Button3,        resizemouse,    {0} },
 | 
				
			||||||
 | 
						{ ClkTagBar,            0,              Button1,        view,           {0} },
 | 
				
			||||||
 | 
						{ ClkTagBar,            0,              Button3,        toggleview,     {0} },
 | 
				
			||||||
 | 
						{ ClkTagBar,            MODKEY,         Button1,        tag,            {0} },
 | 
				
			||||||
 | 
						{ ClkTagBar,            MODKEY,         Button3,        toggletag,      {0} },
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
							
								
								
									
										25
									
								
								config.mk
									
									
									
									
									
								
							
							
						
						
									
										25
									
								
								config.mk
									
									
									
									
									
								
							@@ -1,5 +1,5 @@
 | 
				
			|||||||
# dwm version
 | 
					# dwm version
 | 
				
			||||||
VERSION = 5.3
 | 
					VERSION = 6.2
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Customize below to fit your system
 | 
					# Customize below to fit your system
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -10,18 +10,25 @@ MANPREFIX = ${PREFIX}/share/man
 | 
				
			|||||||
X11INC = /usr/X11R6/include
 | 
					X11INC = /usr/X11R6/include
 | 
				
			||||||
X11LIB = /usr/X11R6/lib
 | 
					X11LIB = /usr/X11R6/lib
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Xinerama, un-comment if you want it
 | 
					# Xinerama, comment if you don't want it
 | 
				
			||||||
#XINERAMALIBS = -L${X11LIB} -lXinerama
 | 
					XINERAMALIBS  = -lXinerama
 | 
				
			||||||
#XINERAMAFLAGS = -DXINERAMA
 | 
					XINERAMAFLAGS = -DXINERAMA
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# freetype
 | 
				
			||||||
 | 
					FREETYPELIBS = -lfontconfig -lXft
 | 
				
			||||||
 | 
					FREETYPEINC = /usr/include/freetype2
 | 
				
			||||||
 | 
					# OpenBSD (uncomment)
 | 
				
			||||||
 | 
					#FREETYPEINC = ${X11INC}/freetype2
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# includes and libs
 | 
					# includes and libs
 | 
				
			||||||
INCS = -I. -I/usr/include -I${X11INC}
 | 
					INCS = -I${X11INC} -I${FREETYPEINC}
 | 
				
			||||||
LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 ${XINERAMALIBS}
 | 
					LIBS = -L${X11LIB} -lX11 ${XINERAMALIBS} ${FREETYPELIBS}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# flags
 | 
					# flags
 | 
				
			||||||
CPPFLAGS = -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS}
 | 
					CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_C_SOURCE=200809L -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS}
 | 
				
			||||||
CFLAGS = -std=c99 -pedantic -Wall -Os ${INCS} ${CPPFLAGS}
 | 
					#CFLAGS   = -g -std=c99 -pedantic -Wall -O0 ${INCS} ${CPPFLAGS}
 | 
				
			||||||
LDFLAGS = -s ${LIBS}
 | 
					CFLAGS   = -std=c99 -pedantic -Wall -Wno-deprecated-declarations -Os ${INCS} ${CPPFLAGS}
 | 
				
			||||||
 | 
					LDFLAGS  = ${LIBS}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Solaris
 | 
					# Solaris
 | 
				
			||||||
#CFLAGS = -fast ${INCS} -DVERSION=\"${VERSION}\"
 | 
					#CFLAGS = -fast ${INCS} -DVERSION=\"${VERSION}\"
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										436
									
								
								drw.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										436
									
								
								drw.c
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,436 @@
 | 
				
			|||||||
 | 
					/* See LICENSE file for copyright and license details. */
 | 
				
			||||||
 | 
					#include <stdio.h>
 | 
				
			||||||
 | 
					#include <stdlib.h>
 | 
				
			||||||
 | 
					#include <string.h>
 | 
				
			||||||
 | 
					#include <X11/Xlib.h>
 | 
				
			||||||
 | 
					#include <X11/Xft/Xft.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include "drw.h"
 | 
				
			||||||
 | 
					#include "util.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#define UTF_INVALID 0xFFFD
 | 
				
			||||||
 | 
					#define UTF_SIZ     4
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static const unsigned char utfbyte[UTF_SIZ + 1] = {0x80,    0, 0xC0, 0xE0, 0xF0};
 | 
				
			||||||
 | 
					static const unsigned char utfmask[UTF_SIZ + 1] = {0xC0, 0x80, 0xE0, 0xF0, 0xF8};
 | 
				
			||||||
 | 
					static const long utfmin[UTF_SIZ + 1] = {       0,    0,  0x80,  0x800,  0x10000};
 | 
				
			||||||
 | 
					static const long utfmax[UTF_SIZ + 1] = {0x10FFFF, 0x7F, 0x7FF, 0xFFFF, 0x10FFFF};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static long
 | 
				
			||||||
 | 
					utf8decodebyte(const char c, size_t *i)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						for (*i = 0; *i < (UTF_SIZ + 1); ++(*i))
 | 
				
			||||||
 | 
							if (((unsigned char)c & utfmask[*i]) == utfbyte[*i])
 | 
				
			||||||
 | 
								return (unsigned char)c & ~utfmask[*i];
 | 
				
			||||||
 | 
						return 0;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static size_t
 | 
				
			||||||
 | 
					utf8validate(long *u, size_t i)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						if (!BETWEEN(*u, utfmin[i], utfmax[i]) || BETWEEN(*u, 0xD800, 0xDFFF))
 | 
				
			||||||
 | 
							*u = UTF_INVALID;
 | 
				
			||||||
 | 
						for (i = 1; *u > utfmax[i]; ++i)
 | 
				
			||||||
 | 
							;
 | 
				
			||||||
 | 
						return i;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static size_t
 | 
				
			||||||
 | 
					utf8decode(const char *c, long *u, size_t clen)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						size_t i, j, len, type;
 | 
				
			||||||
 | 
						long udecoded;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						*u = UTF_INVALID;
 | 
				
			||||||
 | 
						if (!clen)
 | 
				
			||||||
 | 
							return 0;
 | 
				
			||||||
 | 
						udecoded = utf8decodebyte(c[0], &len);
 | 
				
			||||||
 | 
						if (!BETWEEN(len, 1, UTF_SIZ))
 | 
				
			||||||
 | 
							return 1;
 | 
				
			||||||
 | 
						for (i = 1, j = 1; i < clen && j < len; ++i, ++j) {
 | 
				
			||||||
 | 
							udecoded = (udecoded << 6) | utf8decodebyte(c[i], &type);
 | 
				
			||||||
 | 
							if (type)
 | 
				
			||||||
 | 
								return j;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						if (j < len)
 | 
				
			||||||
 | 
							return 0;
 | 
				
			||||||
 | 
						*u = udecoded;
 | 
				
			||||||
 | 
						utf8validate(u, len);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						return len;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Drw *
 | 
				
			||||||
 | 
					drw_create(Display *dpy, int screen, Window root, unsigned int w, unsigned int h)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						Drw *drw = ecalloc(1, sizeof(Drw));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						drw->dpy = dpy;
 | 
				
			||||||
 | 
						drw->screen = screen;
 | 
				
			||||||
 | 
						drw->root = root;
 | 
				
			||||||
 | 
						drw->w = w;
 | 
				
			||||||
 | 
						drw->h = h;
 | 
				
			||||||
 | 
						drw->drawable = XCreatePixmap(dpy, root, w, h, DefaultDepth(dpy, screen));
 | 
				
			||||||
 | 
						drw->gc = XCreateGC(dpy, root, 0, NULL);
 | 
				
			||||||
 | 
						XSetLineAttributes(dpy, drw->gc, 1, LineSolid, CapButt, JoinMiter);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						return drw;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void
 | 
				
			||||||
 | 
					drw_resize(Drw *drw, unsigned int w, unsigned int h)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						if (!drw)
 | 
				
			||||||
 | 
							return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						drw->w = w;
 | 
				
			||||||
 | 
						drw->h = h;
 | 
				
			||||||
 | 
						if (drw->drawable)
 | 
				
			||||||
 | 
							XFreePixmap(drw->dpy, drw->drawable);
 | 
				
			||||||
 | 
						drw->drawable = XCreatePixmap(drw->dpy, drw->root, w, h, DefaultDepth(drw->dpy, drw->screen));
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void
 | 
				
			||||||
 | 
					drw_free(Drw *drw)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						XFreePixmap(drw->dpy, drw->drawable);
 | 
				
			||||||
 | 
						XFreeGC(drw->dpy, drw->gc);
 | 
				
			||||||
 | 
						drw_fontset_free(drw->fonts);
 | 
				
			||||||
 | 
						free(drw);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/* This function is an implementation detail. Library users should use
 | 
				
			||||||
 | 
					 * drw_fontset_create instead.
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					static Fnt *
 | 
				
			||||||
 | 
					xfont_create(Drw *drw, const char *fontname, FcPattern *fontpattern)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						Fnt *font;
 | 
				
			||||||
 | 
						XftFont *xfont = NULL;
 | 
				
			||||||
 | 
						FcPattern *pattern = NULL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (fontname) {
 | 
				
			||||||
 | 
							/* Using the pattern found at font->xfont->pattern does not yield the
 | 
				
			||||||
 | 
							 * same substitution results as using the pattern returned by
 | 
				
			||||||
 | 
							 * FcNameParse; using the latter results in the desired fallback
 | 
				
			||||||
 | 
							 * behaviour whereas the former just results in missing-character
 | 
				
			||||||
 | 
							 * rectangles being drawn, at least with some fonts. */
 | 
				
			||||||
 | 
							if (!(xfont = XftFontOpenName(drw->dpy, drw->screen, fontname))) {
 | 
				
			||||||
 | 
								fprintf(stderr, "error, cannot load font from name: '%s'\n", fontname);
 | 
				
			||||||
 | 
								return NULL;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							if (!(pattern = FcNameParse((FcChar8 *) fontname))) {
 | 
				
			||||||
 | 
								fprintf(stderr, "error, cannot parse font name to pattern: '%s'\n", fontname);
 | 
				
			||||||
 | 
								XftFontClose(drw->dpy, xfont);
 | 
				
			||||||
 | 
								return NULL;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						} else if (fontpattern) {
 | 
				
			||||||
 | 
							if (!(xfont = XftFontOpenPattern(drw->dpy, fontpattern))) {
 | 
				
			||||||
 | 
								fprintf(stderr, "error, cannot load font from pattern.\n");
 | 
				
			||||||
 | 
								return NULL;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						} else {
 | 
				
			||||||
 | 
							die("no font specified.");
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/* Do not allow using color fonts. This is a workaround for a BadLength
 | 
				
			||||||
 | 
						 * error from Xft with color glyphs. Modelled on the Xterm workaround. See
 | 
				
			||||||
 | 
						 * https://bugzilla.redhat.com/show_bug.cgi?id=1498269
 | 
				
			||||||
 | 
						 * https://lists.suckless.org/dev/1701/30932.html
 | 
				
			||||||
 | 
						 * https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=916349
 | 
				
			||||||
 | 
						 * and lots more all over the internet.
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
 | 
						FcBool iscol;
 | 
				
			||||||
 | 
						if(FcPatternGetBool(xfont->pattern, FC_COLOR, 0, &iscol) == FcResultMatch && iscol) {
 | 
				
			||||||
 | 
							XftFontClose(drw->dpy, xfont);
 | 
				
			||||||
 | 
							return NULL;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						font = ecalloc(1, sizeof(Fnt));
 | 
				
			||||||
 | 
						font->xfont = xfont;
 | 
				
			||||||
 | 
						font->pattern = pattern;
 | 
				
			||||||
 | 
						font->h = xfont->ascent + xfont->descent;
 | 
				
			||||||
 | 
						font->dpy = drw->dpy;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						return font;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static void
 | 
				
			||||||
 | 
					xfont_free(Fnt *font)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						if (!font)
 | 
				
			||||||
 | 
							return;
 | 
				
			||||||
 | 
						if (font->pattern)
 | 
				
			||||||
 | 
							FcPatternDestroy(font->pattern);
 | 
				
			||||||
 | 
						XftFontClose(font->dpy, font->xfont);
 | 
				
			||||||
 | 
						free(font);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Fnt*
 | 
				
			||||||
 | 
					drw_fontset_create(Drw* drw, const char *fonts[], size_t fontcount)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						Fnt *cur, *ret = NULL;
 | 
				
			||||||
 | 
						size_t i;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (!drw || !fonts)
 | 
				
			||||||
 | 
							return NULL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						for (i = 1; i <= fontcount; i++) {
 | 
				
			||||||
 | 
							if ((cur = xfont_create(drw, fonts[fontcount - i], NULL))) {
 | 
				
			||||||
 | 
								cur->next = ret;
 | 
				
			||||||
 | 
								ret = cur;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return (drw->fonts = ret);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void
 | 
				
			||||||
 | 
					drw_fontset_free(Fnt *font)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						if (font) {
 | 
				
			||||||
 | 
							drw_fontset_free(font->next);
 | 
				
			||||||
 | 
							xfont_free(font);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void
 | 
				
			||||||
 | 
					drw_clr_create(Drw *drw, Clr *dest, const char *clrname)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						if (!drw || !dest || !clrname)
 | 
				
			||||||
 | 
							return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (!XftColorAllocName(drw->dpy, DefaultVisual(drw->dpy, drw->screen),
 | 
				
			||||||
 | 
						                       DefaultColormap(drw->dpy, drw->screen),
 | 
				
			||||||
 | 
						                       clrname, dest))
 | 
				
			||||||
 | 
							die("error, cannot allocate color '%s'", clrname);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/* Wrapper to create color schemes. The caller has to call free(3) on the
 | 
				
			||||||
 | 
					 * returned color scheme when done using it. */
 | 
				
			||||||
 | 
					Clr *
 | 
				
			||||||
 | 
					drw_scm_create(Drw *drw, const char *clrnames[], size_t clrcount)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						size_t i;
 | 
				
			||||||
 | 
						Clr *ret;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/* need at least two colors for a scheme */
 | 
				
			||||||
 | 
						if (!drw || !clrnames || clrcount < 2 || !(ret = ecalloc(clrcount, sizeof(XftColor))))
 | 
				
			||||||
 | 
							return NULL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						for (i = 0; i < clrcount; i++)
 | 
				
			||||||
 | 
							drw_clr_create(drw, &ret[i], clrnames[i]);
 | 
				
			||||||
 | 
						return ret;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void
 | 
				
			||||||
 | 
					drw_setfontset(Drw *drw, Fnt *set)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						if (drw)
 | 
				
			||||||
 | 
							drw->fonts = set;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void
 | 
				
			||||||
 | 
					drw_setscheme(Drw *drw, Clr *scm)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						if (drw)
 | 
				
			||||||
 | 
							drw->scheme = scm;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void
 | 
				
			||||||
 | 
					drw_rect(Drw *drw, int x, int y, unsigned int w, unsigned int h, int filled, int invert)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						if (!drw || !drw->scheme)
 | 
				
			||||||
 | 
							return;
 | 
				
			||||||
 | 
						XSetForeground(drw->dpy, drw->gc, invert ? drw->scheme[ColBg].pixel : drw->scheme[ColFg].pixel);
 | 
				
			||||||
 | 
						if (filled)
 | 
				
			||||||
 | 
							XFillRectangle(drw->dpy, drw->drawable, drw->gc, x, y, w, h);
 | 
				
			||||||
 | 
						else
 | 
				
			||||||
 | 
							XDrawRectangle(drw->dpy, drw->drawable, drw->gc, x, y, w - 1, h - 1);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					int
 | 
				
			||||||
 | 
					drw_text(Drw *drw, int x, int y, unsigned int w, unsigned int h, unsigned int lpad, const char *text, int invert)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						char buf[1024];
 | 
				
			||||||
 | 
						int ty;
 | 
				
			||||||
 | 
						unsigned int ew;
 | 
				
			||||||
 | 
						XftDraw *d = NULL;
 | 
				
			||||||
 | 
						Fnt *usedfont, *curfont, *nextfont;
 | 
				
			||||||
 | 
						size_t i, len;
 | 
				
			||||||
 | 
						int utf8strlen, utf8charlen, render = x || y || w || h;
 | 
				
			||||||
 | 
						long utf8codepoint = 0;
 | 
				
			||||||
 | 
						const char *utf8str;
 | 
				
			||||||
 | 
						FcCharSet *fccharset;
 | 
				
			||||||
 | 
						FcPattern *fcpattern;
 | 
				
			||||||
 | 
						FcPattern *match;
 | 
				
			||||||
 | 
						XftResult result;
 | 
				
			||||||
 | 
						int charexists = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (!drw || (render && !drw->scheme) || !text || !drw->fonts)
 | 
				
			||||||
 | 
							return 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (!render) {
 | 
				
			||||||
 | 
							w = ~w;
 | 
				
			||||||
 | 
						} else {
 | 
				
			||||||
 | 
							XSetForeground(drw->dpy, drw->gc, drw->scheme[invert ? ColFg : ColBg].pixel);
 | 
				
			||||||
 | 
							XFillRectangle(drw->dpy, drw->drawable, drw->gc, x, y, w, h);
 | 
				
			||||||
 | 
							d = XftDrawCreate(drw->dpy, drw->drawable,
 | 
				
			||||||
 | 
							                  DefaultVisual(drw->dpy, drw->screen),
 | 
				
			||||||
 | 
							                  DefaultColormap(drw->dpy, drw->screen));
 | 
				
			||||||
 | 
							x += lpad;
 | 
				
			||||||
 | 
							w -= lpad;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						usedfont = drw->fonts;
 | 
				
			||||||
 | 
						while (1) {
 | 
				
			||||||
 | 
							utf8strlen = 0;
 | 
				
			||||||
 | 
							utf8str = text;
 | 
				
			||||||
 | 
							nextfont = NULL;
 | 
				
			||||||
 | 
							while (*text) {
 | 
				
			||||||
 | 
								utf8charlen = utf8decode(text, &utf8codepoint, UTF_SIZ);
 | 
				
			||||||
 | 
								for (curfont = drw->fonts; curfont; curfont = curfont->next) {
 | 
				
			||||||
 | 
									charexists = charexists || XftCharExists(drw->dpy, curfont->xfont, utf8codepoint);
 | 
				
			||||||
 | 
									if (charexists) {
 | 
				
			||||||
 | 
										if (curfont == usedfont) {
 | 
				
			||||||
 | 
											utf8strlen += utf8charlen;
 | 
				
			||||||
 | 
											text += utf8charlen;
 | 
				
			||||||
 | 
										} else {
 | 
				
			||||||
 | 
											nextfont = curfont;
 | 
				
			||||||
 | 
										}
 | 
				
			||||||
 | 
										break;
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								if (!charexists || nextfont)
 | 
				
			||||||
 | 
									break;
 | 
				
			||||||
 | 
								else
 | 
				
			||||||
 | 
									charexists = 0;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							if (utf8strlen) {
 | 
				
			||||||
 | 
								drw_font_getexts(usedfont, utf8str, utf8strlen, &ew, NULL);
 | 
				
			||||||
 | 
								/* shorten text if necessary */
 | 
				
			||||||
 | 
								for (len = MIN(utf8strlen, sizeof(buf) - 1); len && ew > w; len--)
 | 
				
			||||||
 | 
									drw_font_getexts(usedfont, utf8str, len, &ew, NULL);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								if (len) {
 | 
				
			||||||
 | 
									memcpy(buf, utf8str, len);
 | 
				
			||||||
 | 
									buf[len] = '\0';
 | 
				
			||||||
 | 
									if (len < utf8strlen)
 | 
				
			||||||
 | 
										for (i = len; i && i > len - 3; buf[--i] = '.')
 | 
				
			||||||
 | 
											; /* NOP */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
									if (render) {
 | 
				
			||||||
 | 
										ty = y + (h - usedfont->h) / 2 + usedfont->xfont->ascent;
 | 
				
			||||||
 | 
										XftDrawStringUtf8(d, &drw->scheme[invert ? ColBg : ColFg],
 | 
				
			||||||
 | 
										                  usedfont->xfont, x, ty, (XftChar8 *)buf, len);
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
									x += ew;
 | 
				
			||||||
 | 
									w -= ew;
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							if (!*text) {
 | 
				
			||||||
 | 
								break;
 | 
				
			||||||
 | 
							} else if (nextfont) {
 | 
				
			||||||
 | 
								charexists = 0;
 | 
				
			||||||
 | 
								usedfont = nextfont;
 | 
				
			||||||
 | 
							} else {
 | 
				
			||||||
 | 
								/* Regardless of whether or not a fallback font is found, the
 | 
				
			||||||
 | 
								 * character must be drawn. */
 | 
				
			||||||
 | 
								charexists = 1;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								fccharset = FcCharSetCreate();
 | 
				
			||||||
 | 
								FcCharSetAddChar(fccharset, utf8codepoint);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								if (!drw->fonts->pattern) {
 | 
				
			||||||
 | 
									/* Refer to the comment in xfont_create for more information. */
 | 
				
			||||||
 | 
									die("the first font in the cache must be loaded from a font string.");
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								fcpattern = FcPatternDuplicate(drw->fonts->pattern);
 | 
				
			||||||
 | 
								FcPatternAddCharSet(fcpattern, FC_CHARSET, fccharset);
 | 
				
			||||||
 | 
								FcPatternAddBool(fcpattern, FC_SCALABLE, FcTrue);
 | 
				
			||||||
 | 
								FcPatternAddBool(fcpattern, FC_COLOR, FcFalse);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								FcConfigSubstitute(NULL, fcpattern, FcMatchPattern);
 | 
				
			||||||
 | 
								FcDefaultSubstitute(fcpattern);
 | 
				
			||||||
 | 
								match = XftFontMatch(drw->dpy, drw->screen, fcpattern, &result);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								FcCharSetDestroy(fccharset);
 | 
				
			||||||
 | 
								FcPatternDestroy(fcpattern);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								if (match) {
 | 
				
			||||||
 | 
									usedfont = xfont_create(drw, NULL, match);
 | 
				
			||||||
 | 
									if (usedfont && XftCharExists(drw->dpy, usedfont->xfont, utf8codepoint)) {
 | 
				
			||||||
 | 
										for (curfont = drw->fonts; curfont->next; curfont = curfont->next)
 | 
				
			||||||
 | 
											; /* NOP */
 | 
				
			||||||
 | 
										curfont->next = usedfont;
 | 
				
			||||||
 | 
									} else {
 | 
				
			||||||
 | 
										xfont_free(usedfont);
 | 
				
			||||||
 | 
										usedfont = drw->fonts;
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						if (d)
 | 
				
			||||||
 | 
							XftDrawDestroy(d);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						return x + (render ? w : 0);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void
 | 
				
			||||||
 | 
					drw_map(Drw *drw, Window win, int x, int y, unsigned int w, unsigned int h)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						if (!drw)
 | 
				
			||||||
 | 
							return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						XCopyArea(drw->dpy, drw->drawable, win, drw->gc, x, y, w, h, x, y);
 | 
				
			||||||
 | 
						XSync(drw->dpy, False);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					unsigned int
 | 
				
			||||||
 | 
					drw_fontset_getwidth(Drw *drw, const char *text)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						if (!drw || !drw->fonts || !text)
 | 
				
			||||||
 | 
							return 0;
 | 
				
			||||||
 | 
						return drw_text(drw, 0, 0, 0, 0, 0, text, 0);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void
 | 
				
			||||||
 | 
					drw_font_getexts(Fnt *font, const char *text, unsigned int len, unsigned int *w, unsigned int *h)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						XGlyphInfo ext;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (!font || !text)
 | 
				
			||||||
 | 
							return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						XftTextExtentsUtf8(font->dpy, font->xfont, (XftChar8 *)text, len, &ext);
 | 
				
			||||||
 | 
						if (w)
 | 
				
			||||||
 | 
							*w = ext.xOff;
 | 
				
			||||||
 | 
						if (h)
 | 
				
			||||||
 | 
							*h = font->h;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Cur *
 | 
				
			||||||
 | 
					drw_cur_create(Drw *drw, int shape)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						Cur *cur;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (!drw || !(cur = ecalloc(1, sizeof(Cur))))
 | 
				
			||||||
 | 
							return NULL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						cur->cursor = XCreateFontCursor(drw->dpy, shape);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						return cur;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void
 | 
				
			||||||
 | 
					drw_cur_free(Drw *drw, Cur *cursor)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						if (!cursor)
 | 
				
			||||||
 | 
							return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						XFreeCursor(drw->dpy, cursor->cursor);
 | 
				
			||||||
 | 
						free(cursor);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										57
									
								
								drw.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										57
									
								
								drw.h
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,57 @@
 | 
				
			|||||||
 | 
					/* See LICENSE file for copyright and license details. */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					typedef struct {
 | 
				
			||||||
 | 
						Cursor cursor;
 | 
				
			||||||
 | 
					} Cur;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					typedef struct Fnt {
 | 
				
			||||||
 | 
						Display *dpy;
 | 
				
			||||||
 | 
						unsigned int h;
 | 
				
			||||||
 | 
						XftFont *xfont;
 | 
				
			||||||
 | 
						FcPattern *pattern;
 | 
				
			||||||
 | 
						struct Fnt *next;
 | 
				
			||||||
 | 
					} Fnt;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					enum { ColFg, ColBg, ColBorder }; /* Clr scheme index */
 | 
				
			||||||
 | 
					typedef XftColor Clr;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					typedef struct {
 | 
				
			||||||
 | 
						unsigned int w, h;
 | 
				
			||||||
 | 
						Display *dpy;
 | 
				
			||||||
 | 
						int screen;
 | 
				
			||||||
 | 
						Window root;
 | 
				
			||||||
 | 
						Drawable drawable;
 | 
				
			||||||
 | 
						GC gc;
 | 
				
			||||||
 | 
						Clr *scheme;
 | 
				
			||||||
 | 
						Fnt *fonts;
 | 
				
			||||||
 | 
					} Drw;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/* Drawable abstraction */
 | 
				
			||||||
 | 
					Drw *drw_create(Display *dpy, int screen, Window win, unsigned int w, unsigned int h);
 | 
				
			||||||
 | 
					void drw_resize(Drw *drw, unsigned int w, unsigned int h);
 | 
				
			||||||
 | 
					void drw_free(Drw *drw);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/* Fnt abstraction */
 | 
				
			||||||
 | 
					Fnt *drw_fontset_create(Drw* drw, const char *fonts[], size_t fontcount);
 | 
				
			||||||
 | 
					void drw_fontset_free(Fnt* set);
 | 
				
			||||||
 | 
					unsigned int drw_fontset_getwidth(Drw *drw, const char *text);
 | 
				
			||||||
 | 
					void drw_font_getexts(Fnt *font, const char *text, unsigned int len, unsigned int *w, unsigned int *h);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/* Colorscheme abstraction */
 | 
				
			||||||
 | 
					void drw_clr_create(Drw *drw, Clr *dest, const char *clrname);
 | 
				
			||||||
 | 
					Clr *drw_scm_create(Drw *drw, const char *clrnames[], size_t clrcount);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/* Cursor abstraction */
 | 
				
			||||||
 | 
					Cur *drw_cur_create(Drw *drw, int shape);
 | 
				
			||||||
 | 
					void drw_cur_free(Drw *drw, Cur *cursor);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/* Drawing context manipulation */
 | 
				
			||||||
 | 
					void drw_setfontset(Drw *drw, Fnt *set);
 | 
				
			||||||
 | 
					void drw_setscheme(Drw *drw, Clr *scm);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/* Drawing functions */
 | 
				
			||||||
 | 
					void drw_rect(Drw *drw, int x, int y, unsigned int w, unsigned int h, int filled, int invert);
 | 
				
			||||||
 | 
					int drw_text(Drw *drw, int x, int y, unsigned int w, unsigned int h, unsigned int lpad, const char *text, int invert);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/* Map functions */
 | 
				
			||||||
 | 
					void drw_map(Drw *drw, Window win, int x, int y, unsigned int w, unsigned int h);
 | 
				
			||||||
							
								
								
									
										180
									
								
								dwm.1
									
									
									
									
									
								
							
							
						
						
									
										180
									
								
								dwm.1
									
									
									
									
									
								
							@@ -10,8 +10,9 @@ and floating layouts. Either layout can be applied dynamically, optimising the
 | 
				
			|||||||
environment for the application in use and the task performed.
 | 
					environment for the application in use and the task performed.
 | 
				
			||||||
.P
 | 
					.P
 | 
				
			||||||
In tiled layouts windows are managed in a master and stacking area. The master
 | 
					In tiled layouts windows are managed in a master and stacking area. The master
 | 
				
			||||||
area contains the window which currently needs most attention, whereas the
 | 
					area on the left contains one window by default, and the stacking area on the
 | 
				
			||||||
stacking area contains all other windows. In monocle layout all windows are
 | 
					right contains all other windows. The number of master area windows can be
 | 
				
			||||||
 | 
					adjusted from zero to an arbitrary number. In monocle layout all windows are
 | 
				
			||||||
maximised to the screen size. In floating layout windows can be resized and
 | 
					maximised to the screen size. In floating layout windows can be resized and
 | 
				
			||||||
moved freely. Dialog windows are always managed floating, regardless of the
 | 
					moved freely. Dialog windows are always managed floating, regardless of the
 | 
				
			||||||
layout applied.
 | 
					layout applied.
 | 
				
			||||||
@@ -19,25 +20,35 @@ layout applied.
 | 
				
			|||||||
Windows are grouped by tags. Each window can be tagged with one or multiple
 | 
					Windows are grouped by tags. Each window can be tagged with one or multiple
 | 
				
			||||||
tags. Selecting certain tags displays all windows with these tags.
 | 
					tags. Selecting certain tags displays all windows with these tags.
 | 
				
			||||||
.P
 | 
					.P
 | 
				
			||||||
dwm contains a small status bar which displays all available tags, the layout,
 | 
					Each screen contains a small status bar which displays all available tags, the
 | 
				
			||||||
the title of the focused window, and the text read from standard input. A
 | 
					layout, the title of the focused window, and the text read from the root window
 | 
				
			||||||
floating window is indicated with an empty square and a maximised
 | 
					name property, if the screen is focused. A floating window is indicated with an
 | 
				
			||||||
floating window is indicated with a filled square before the windows
 | 
					empty square and a maximised floating window is indicated with a filled square
 | 
				
			||||||
title.  The selected tags are indicated with a different color. The tags of
 | 
					before the windows title.  The selected tags are indicated with a different
 | 
				
			||||||
the focused window are indicated with a filled square in the top left
 | 
					color. The tags of the focused window are indicated with a filled square in the
 | 
				
			||||||
corner.  The tags which are applied to one or more windows are indicated
 | 
					top left corner.  The tags which are applied to one or more windows are
 | 
				
			||||||
with an empty square in the top left corner.
 | 
					indicated with an empty square in the top left corner.
 | 
				
			||||||
.P
 | 
					.P
 | 
				
			||||||
dwm draws a small border around windows to indicate the focus state.
 | 
					dwm draws a small border around windows to indicate the focus state.
 | 
				
			||||||
 | 
					.P
 | 
				
			||||||
 | 
					On start, dwm can start additional programs that may be specified in two special
 | 
				
			||||||
 | 
					shell scripts (see the FILES section below), autostart_blocking.sh and
 | 
				
			||||||
 | 
					autostart.sh.  The former is executed first and dwm will wait for its
 | 
				
			||||||
 | 
					termination before starting.  The latter is executed in the background before
 | 
				
			||||||
 | 
					dwm enters its handler loop.
 | 
				
			||||||
 | 
					.P
 | 
				
			||||||
 | 
					Either of these files may be omitted.
 | 
				
			||||||
.SH OPTIONS
 | 
					.SH OPTIONS
 | 
				
			||||||
.TP
 | 
					.TP
 | 
				
			||||||
.B \-v
 | 
					.B \-v
 | 
				
			||||||
prints version information to standard output, then exits.
 | 
					prints version information to stderr, then exits.
 | 
				
			||||||
.SH USAGE
 | 
					.SH USAGE
 | 
				
			||||||
.SS Status bar
 | 
					.SS Status bar
 | 
				
			||||||
.TP
 | 
					.TP
 | 
				
			||||||
.B Standard input
 | 
					.B X root window name
 | 
				
			||||||
is read and displayed in the status text area.
 | 
					is read and displayed in the status text area. It can be set with the
 | 
				
			||||||
 | 
					.BR xsetroot (1)
 | 
				
			||||||
 | 
					command.
 | 
				
			||||||
.TP
 | 
					.TP
 | 
				
			||||||
.B Button1
 | 
					.B Button1
 | 
				
			||||||
click on a tag label to display all windows with that tag, click on the layout
 | 
					click on a tag label to display all windows with that tag, click on the layout
 | 
				
			||||||
@@ -55,7 +66,48 @@ click on a tag label adds/removes that tag to/from the focused window.
 | 
				
			|||||||
.TP
 | 
					.TP
 | 
				
			||||||
.B Mod1\-Shift\-Return
 | 
					.B Mod1\-Shift\-Return
 | 
				
			||||||
Start
 | 
					Start
 | 
				
			||||||
.BR xterm.
 | 
					.BR st(1).
 | 
				
			||||||
 | 
					.TP
 | 
				
			||||||
 | 
					.B Mod1\-p
 | 
				
			||||||
 | 
					Spawn
 | 
				
			||||||
 | 
					.BR rofi(1)
 | 
				
			||||||
 | 
					for launching other programs.
 | 
				
			||||||
 | 
					.TP
 | 
				
			||||||
 | 
					.B Mod1\-c
 | 
				
			||||||
 | 
					Spawn
 | 
				
			||||||
 | 
					.BR rofi(1)
 | 
				
			||||||
 | 
					for Greenclip clipboard manager
 | 
				
			||||||
 | 
					.TP
 | 
				
			||||||
 | 
					.B Mod1\-Shift\-n
 | 
				
			||||||
 | 
					Spawn
 | 
				
			||||||
 | 
					.BR light-locker(1)
 | 
				
			||||||
 | 
					to lock screen.
 | 
				
			||||||
 | 
					.TP
 | 
				
			||||||
 | 
					.B Mod1\-Shift\-s
 | 
				
			||||||
 | 
					Spawn
 | 
				
			||||||
 | 
					.BR suspend(1)
 | 
				
			||||||
 | 
					to lock screen and go to sleep.
 | 
				
			||||||
 | 
					.TP
 | 
				
			||||||
 | 
					.B Mod1\-,
 | 
				
			||||||
 | 
					Focus previous screen, if any.
 | 
				
			||||||
 | 
					.TP
 | 
				
			||||||
 | 
					.B Mod1\-.
 | 
				
			||||||
 | 
					Focus next screen, if any.
 | 
				
			||||||
 | 
					.TP
 | 
				
			||||||
 | 
					.B Mod1\-Shift\-,
 | 
				
			||||||
 | 
					Send focused window to previous screen, if any.
 | 
				
			||||||
 | 
					.TP
 | 
				
			||||||
 | 
					.B Mod1\-Shift\-.
 | 
				
			||||||
 | 
					Send focused window to next screen, if any.
 | 
				
			||||||
 | 
					.TP
 | 
				
			||||||
 | 
					.B Mod1\--
 | 
				
			||||||
 | 
					Decrease window gap.
 | 
				
			||||||
 | 
					.TP
 | 
				
			||||||
 | 
					.B Mod1\-=
 | 
				
			||||||
 | 
					Increase window gap.
 | 
				
			||||||
 | 
					.TP
 | 
				
			||||||
 | 
					.B Mod1\-Shift\-=
 | 
				
			||||||
 | 
					Reset window gap to 0.
 | 
				
			||||||
.TP
 | 
					.TP
 | 
				
			||||||
.B Mod1\-b
 | 
					.B Mod1\-b
 | 
				
			||||||
Toggles bar on and off.
 | 
					Toggles bar on and off.
 | 
				
			||||||
@@ -69,21 +121,42 @@ Sets floating layout.
 | 
				
			|||||||
.B Mod1\-m
 | 
					.B Mod1\-m
 | 
				
			||||||
Sets monocle layout.
 | 
					Sets monocle layout.
 | 
				
			||||||
.TP
 | 
					.TP
 | 
				
			||||||
 | 
					.B Mod1\-u
 | 
				
			||||||
 | 
					Sets centered master layout.
 | 
				
			||||||
 | 
					.TP
 | 
				
			||||||
 | 
					.B Mod1\-o
 | 
				
			||||||
 | 
					Sets centered floating master layout.
 | 
				
			||||||
 | 
					.TP
 | 
				
			||||||
 | 
					.B Mod1\-g
 | 
				
			||||||
 | 
					Sets grid layout.
 | 
				
			||||||
 | 
					.TP
 | 
				
			||||||
.B Mod1\-space
 | 
					.B Mod1\-space
 | 
				
			||||||
Toggles between current and previous layout.
 | 
					Toggles between current and previous layout.
 | 
				
			||||||
.TP
 | 
					.TP
 | 
				
			||||||
 | 
					.B Mod1\-Control\-,
 | 
				
			||||||
 | 
					Cycles backwards in layout list.
 | 
				
			||||||
 | 
					.TP
 | 
				
			||||||
 | 
					.B Mod1\-Control\-.
 | 
				
			||||||
 | 
					Cycles forwards in layout list.
 | 
				
			||||||
 | 
					.TP
 | 
				
			||||||
.B Mod1\-j
 | 
					.B Mod1\-j
 | 
				
			||||||
Focus next window.
 | 
					Focus next window.
 | 
				
			||||||
.TP
 | 
					.TP
 | 
				
			||||||
.B Mod1\-k
 | 
					.B Mod1\-k
 | 
				
			||||||
Focus previous window.
 | 
					Focus previous window.
 | 
				
			||||||
.TP
 | 
					.TP
 | 
				
			||||||
.B Mod1\-h
 | 
					.B Mod1\-i
 | 
				
			||||||
Decrease master area size.
 | 
					Increase number of windows in master area.
 | 
				
			||||||
 | 
					.TP
 | 
				
			||||||
 | 
					.B Mod1\-d
 | 
				
			||||||
 | 
					Decrease number of windows in master area.
 | 
				
			||||||
.TP
 | 
					.TP
 | 
				
			||||||
.B Mod1\-l
 | 
					.B Mod1\-l
 | 
				
			||||||
Increase master area size.
 | 
					Increase master area size.
 | 
				
			||||||
.TP
 | 
					.TP
 | 
				
			||||||
 | 
					.B Mod1\-h
 | 
				
			||||||
 | 
					Decrease master area size.
 | 
				
			||||||
 | 
					.TP
 | 
				
			||||||
.B Mod1\-Return
 | 
					.B Mod1\-Return
 | 
				
			||||||
Zooms/cycles focused window to/from master area (tiled layouts only).
 | 
					Zooms/cycles focused window to/from master area (tiled layouts only).
 | 
				
			||||||
.TP
 | 
					.TP
 | 
				
			||||||
@@ -97,33 +170,28 @@ Toggle focused window between tiled and floating state.
 | 
				
			|||||||
Toggles to the previously selected tags.
 | 
					Toggles to the previously selected tags.
 | 
				
			||||||
.TP
 | 
					.TP
 | 
				
			||||||
.B Mod1\-Shift\-[1..n]
 | 
					.B Mod1\-Shift\-[1..n]
 | 
				
			||||||
Apply
 | 
					Apply nth tag to focused window.
 | 
				
			||||||
.RB nth
 | 
					 | 
				
			||||||
tag to focused window.
 | 
					 | 
				
			||||||
.TP
 | 
					.TP
 | 
				
			||||||
.B Mod1\-Shift\-0
 | 
					.B Mod1\-Shift\-0
 | 
				
			||||||
Apply all tags to focused window.
 | 
					Apply all tags to focused window.
 | 
				
			||||||
.TP
 | 
					.TP
 | 
				
			||||||
.B Mod1\-Control\-Shift\-[1..n]
 | 
					.B Mod1\-Control\-Shift\-[1..n]
 | 
				
			||||||
Add/remove
 | 
					Add/remove nth tag to/from focused window.
 | 
				
			||||||
.B nth
 | 
					 | 
				
			||||||
tag to/from focused window.
 | 
					 | 
				
			||||||
.TP
 | 
					.TP
 | 
				
			||||||
.B Mod1\-[1..n]
 | 
					.B Mod1\-[1..n]
 | 
				
			||||||
View all windows with
 | 
					View all windows with nth tag.
 | 
				
			||||||
.BR nth
 | 
					 | 
				
			||||||
tag.
 | 
					 | 
				
			||||||
.TP
 | 
					.TP
 | 
				
			||||||
.B Mod1\-0
 | 
					.B Mod1\-0
 | 
				
			||||||
View all windows with any tag.
 | 
					View all windows with any tag.
 | 
				
			||||||
.TP
 | 
					.TP
 | 
				
			||||||
.B Mod1\-Control\-[1..n]
 | 
					.B Mod1\-Control\-[1..n]
 | 
				
			||||||
Add/remove all windows with
 | 
					Add/remove all windows with nth tag to/from the view.
 | 
				
			||||||
.BR nth
 | 
					 | 
				
			||||||
tag to/from the view.
 | 
					 | 
				
			||||||
.TP
 | 
					.TP
 | 
				
			||||||
.B Mod1\-Shift\-q
 | 
					.B Mod1\-Shift\-q
 | 
				
			||||||
Quit dwm.
 | 
					Quit dwm.
 | 
				
			||||||
 | 
					.TP
 | 
				
			||||||
 | 
					.B Mod1\-Control\-Shift\-q
 | 
				
			||||||
 | 
					Restart dwm.
 | 
				
			||||||
.SS Mouse commands
 | 
					.SS Mouse commands
 | 
				
			||||||
.TP
 | 
					.TP
 | 
				
			||||||
.B Mod1\-Button1
 | 
					.B Mod1\-Button1
 | 
				
			||||||
@@ -134,30 +202,44 @@ Toggles focused window between floating and tiled state.
 | 
				
			|||||||
.TP
 | 
					.TP
 | 
				
			||||||
.B Mod1\-Button3
 | 
					.B Mod1\-Button3
 | 
				
			||||||
Resize focused window while dragging. Tiled windows will be toggled to the floating state.
 | 
					Resize focused window while dragging. Tiled windows will be toggled to the floating state.
 | 
				
			||||||
 | 
					.SH FILES
 | 
				
			||||||
 | 
					The files containing programs to be started along with dwm are searched for in
 | 
				
			||||||
 | 
					the dwm root directory.
 | 
				
			||||||
 | 
					.P
 | 
				
			||||||
 | 
					The first existing directory is scanned for any of the autostart files below.
 | 
				
			||||||
 | 
					.TP 15
 | 
				
			||||||
 | 
					autostart.sh
 | 
				
			||||||
 | 
					This file is started as a shell background process before dwm enters its handler
 | 
				
			||||||
 | 
					loop.
 | 
				
			||||||
 | 
					.TP 15
 | 
				
			||||||
 | 
					autostart_blocking.sh
 | 
				
			||||||
 | 
					This file is started before any autostart.sh; dwm waits for its termination.
 | 
				
			||||||
.SH CUSTOMIZATION
 | 
					.SH CUSTOMIZATION
 | 
				
			||||||
dwm is customized by creating a custom config.h and (re)compiling the source
 | 
					dwm is customized by creating a custom config.h and (re)compiling the source
 | 
				
			||||||
code. This keeps it fast, secure and simple.
 | 
					code. This keeps it fast, secure and simple.
 | 
				
			||||||
 | 
					.SH SIGNALS
 | 
				
			||||||
 | 
					.TP
 | 
				
			||||||
 | 
					.B SIGHUP - 1
 | 
				
			||||||
 | 
					Restart the dwm process.
 | 
				
			||||||
 | 
					.TP
 | 
				
			||||||
 | 
					.B SIGTERM - 15
 | 
				
			||||||
 | 
					Cleanly terminate the dwm process.
 | 
				
			||||||
.SH SEE ALSO
 | 
					.SH SEE ALSO
 | 
				
			||||||
.BR dmenu (1)
 | 
					.BR rofi (1),
 | 
				
			||||||
.SH BUGS
 | 
					.BR st (1)
 | 
				
			||||||
The status bar may display
 | 
					.SH ISSUES
 | 
				
			||||||
.BR "EOF"
 | 
					 | 
				
			||||||
when dwm has been started by an X session manager like
 | 
					 | 
				
			||||||
.BR xdm (1),
 | 
					 | 
				
			||||||
because those close standard output before executing dwm.
 | 
					 | 
				
			||||||
.P
 | 
					 | 
				
			||||||
Java applications which use the XToolkit/XAWT backend may draw grey windows
 | 
					Java applications which use the XToolkit/XAWT backend may draw grey windows
 | 
				
			||||||
only. The XToolkit/XAWT backend breaks ICCCM-compliance in recent JDK 1.5 and early
 | 
					only. The XToolkit/XAWT backend breaks ICCCM-compliance in recent JDK 1.5 and early
 | 
				
			||||||
JDK 1.6 versions, because it assumes a reparenting window manager. As a workaround
 | 
					JDK 1.6 versions, because it assumes a reparenting window manager. Possible workarounds
 | 
				
			||||||
you can use JDK 1.4 (which doesn't contain the XToolkit/XAWT backend) or you
 | 
					are using JDK 1.4 (which doesn't contain the XToolkit/XAWT backend) or setting the
 | 
				
			||||||
can set the following environment variable (to use the older Motif
 | 
					environment variable
 | 
				
			||||||
backend instead):
 | 
					.BR AWT_TOOLKIT=MToolkit
 | 
				
			||||||
.BR AWT_TOOLKIT=MToolkit .
 | 
					(to use the older Motif backend instead) or running
 | 
				
			||||||
.P
 | 
					.B xprop -root -f _NET_WM_NAME 32a -set _NET_WM_NAME LG3D
 | 
				
			||||||
GTK 2.10.9+ versions contain a broken
 | 
					or
 | 
				
			||||||
.BR Save\-As
 | 
					.B wmname LG3D
 | 
				
			||||||
file dialog implementation,
 | 
					(to pretend that a non-reparenting window manager is running that the
 | 
				
			||||||
which requests to reconfigure its window size in an endless loop. However, its
 | 
					XToolkit/XAWT backend can recognize) or when using OpenJDK setting the environment variable
 | 
				
			||||||
window is still respondable during this state, so you can simply ignore the flicker
 | 
					.BR _JAVA_AWT_WM_NONREPARENTING=1 .
 | 
				
			||||||
until a new GTK version appears, which will fix this bug, approximately
 | 
					.SH BUGS
 | 
				
			||||||
GTK 2.10.12+ versions.
 | 
					Send all bug reports with a patch to hackers@suckless.org.
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										27
									
								
								layouts.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										27
									
								
								layouts.c
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,27 @@
 | 
				
			|||||||
 | 
					void
 | 
				
			||||||
 | 
					grid(Monitor *m) {
 | 
				
			||||||
 | 
						unsigned int i, n, cx, cy, cw, ch, aw, ah, cols, rows;
 | 
				
			||||||
 | 
						Client *c;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						for(n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next))
 | 
				
			||||||
 | 
							n++;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/* grid dimensions */
 | 
				
			||||||
 | 
						for(rows = 0; rows <= n/2; rows++)
 | 
				
			||||||
 | 
							if(rows*rows >= n)
 | 
				
			||||||
 | 
								break;
 | 
				
			||||||
 | 
						cols = (rows && (rows - 1) * rows >= n) ? rows - 1 : rows;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/* window geoms (cell height/width) */
 | 
				
			||||||
 | 
						ch = m->wh / (rows ? rows : 1);
 | 
				
			||||||
 | 
						cw = m->ww / (cols ? cols : 1);
 | 
				
			||||||
 | 
						for(i = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next)) {
 | 
				
			||||||
 | 
							cx = m->wx + (i / rows) * cw;
 | 
				
			||||||
 | 
							cy = m->wy + (i % rows) * ch;
 | 
				
			||||||
 | 
							/* adjust height/width of last row/column's windows */
 | 
				
			||||||
 | 
							ah = ((i + 1) % rows == 0) ? m->wh - ch * rows : 0;
 | 
				
			||||||
 | 
							aw = (i >= rows * (cols - 1)) ? m->ww - cw * cols : 0;
 | 
				
			||||||
 | 
							resize(c, cx, cy, cw - 2 * c->bw + aw, ch - 2 * c->bw + ah, False);
 | 
				
			||||||
 | 
							i++;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										48
									
								
								movestack.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										48
									
								
								movestack.c
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,48 @@
 | 
				
			|||||||
 | 
					void
 | 
				
			||||||
 | 
					movestack(const Arg *arg) {
 | 
				
			||||||
 | 
						Client *c = NULL, *p = NULL, *pc = NULL, *i;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if(arg->i > 0) {
 | 
				
			||||||
 | 
							/* find the client after selmon->sel */
 | 
				
			||||||
 | 
							for(c = selmon->sel->next; c && (!ISVISIBLE(c) || c->isfloating); c = c->next);
 | 
				
			||||||
 | 
							if(!c)
 | 
				
			||||||
 | 
								for(c = selmon->clients; c && (!ISVISIBLE(c) || c->isfloating); c = c->next);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						else {
 | 
				
			||||||
 | 
							/* find the client before selmon->sel */
 | 
				
			||||||
 | 
							for(i = selmon->clients; i != selmon->sel; i = i->next)
 | 
				
			||||||
 | 
								if(ISVISIBLE(i) && !i->isfloating)
 | 
				
			||||||
 | 
									c = i;
 | 
				
			||||||
 | 
							if(!c)
 | 
				
			||||||
 | 
								for(; i; i = i->next)
 | 
				
			||||||
 | 
									if(ISVISIBLE(i) && !i->isfloating)
 | 
				
			||||||
 | 
										c = i;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						/* find the client before selmon->sel and c */
 | 
				
			||||||
 | 
						for(i = selmon->clients; i && (!p || !pc); i = i->next) {
 | 
				
			||||||
 | 
							if(i->next == selmon->sel)
 | 
				
			||||||
 | 
								p = i;
 | 
				
			||||||
 | 
							if(i->next == c)
 | 
				
			||||||
 | 
								pc = i;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/* swap c and selmon->sel selmon->clients in the selmon->clients list */
 | 
				
			||||||
 | 
						if(c && c != selmon->sel) {
 | 
				
			||||||
 | 
							Client *temp = selmon->sel->next==c?selmon->sel:selmon->sel->next;
 | 
				
			||||||
 | 
							selmon->sel->next = c->next==selmon->sel?c:c->next;
 | 
				
			||||||
 | 
							c->next = temp;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							if(p && p != c)
 | 
				
			||||||
 | 
								p->next = c;
 | 
				
			||||||
 | 
							if(pc && pc != selmon->sel)
 | 
				
			||||||
 | 
								pc->next = selmon->sel;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							if(selmon->sel == selmon->clients)
 | 
				
			||||||
 | 
								selmon->clients = c;
 | 
				
			||||||
 | 
							else if(c == selmon->clients)
 | 
				
			||||||
 | 
								selmon->clients = selmon->sel;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							arrange(selmon);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										42
									
								
								transient.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										42
									
								
								transient.c
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,42 @@
 | 
				
			|||||||
 | 
					/* cc transient.c -o transient -lX11 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include <stdlib.h>
 | 
				
			||||||
 | 
					#include <unistd.h>
 | 
				
			||||||
 | 
					#include <X11/Xlib.h>
 | 
				
			||||||
 | 
					#include <X11/Xutil.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					int main(void) {
 | 
				
			||||||
 | 
						Display *d;
 | 
				
			||||||
 | 
						Window r, f, t = None;
 | 
				
			||||||
 | 
						XSizeHints h;
 | 
				
			||||||
 | 
						XEvent e;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						d = XOpenDisplay(NULL);
 | 
				
			||||||
 | 
						if (!d)
 | 
				
			||||||
 | 
							exit(1);
 | 
				
			||||||
 | 
						r = DefaultRootWindow(d);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						f = XCreateSimpleWindow(d, r, 100, 100, 400, 400, 0, 0, 0);
 | 
				
			||||||
 | 
						h.min_width = h.max_width = h.min_height = h.max_height = 400;
 | 
				
			||||||
 | 
						h.flags = PMinSize | PMaxSize;
 | 
				
			||||||
 | 
						XSetWMNormalHints(d, f, &h);
 | 
				
			||||||
 | 
						XStoreName(d, f, "floating");
 | 
				
			||||||
 | 
						XMapWindow(d, f);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						XSelectInput(d, f, ExposureMask);
 | 
				
			||||||
 | 
						while (1) {
 | 
				
			||||||
 | 
							XNextEvent(d, &e);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							if (t == None) {
 | 
				
			||||||
 | 
								sleep(5);
 | 
				
			||||||
 | 
								t = XCreateSimpleWindow(d, r, 50, 50, 100, 100, 0, 0, 0);
 | 
				
			||||||
 | 
								XSetTransientForHint(d, t, f);
 | 
				
			||||||
 | 
								XStoreName(d, t, "transient");
 | 
				
			||||||
 | 
								XMapWindow(d, t);
 | 
				
			||||||
 | 
								XSelectInput(d, t, ExposureMask);
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						XCloseDisplay(d);
 | 
				
			||||||
 | 
						exit(0);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										35
									
								
								util.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										35
									
								
								util.c
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,35 @@
 | 
				
			|||||||
 | 
					/* See LICENSE file for copyright and license details. */
 | 
				
			||||||
 | 
					#include <stdarg.h>
 | 
				
			||||||
 | 
					#include <stdio.h>
 | 
				
			||||||
 | 
					#include <stdlib.h>
 | 
				
			||||||
 | 
					#include <string.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include "util.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void *
 | 
				
			||||||
 | 
					ecalloc(size_t nmemb, size_t size)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						void *p;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (!(p = calloc(nmemb, size)))
 | 
				
			||||||
 | 
							die("calloc:");
 | 
				
			||||||
 | 
						return p;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void
 | 
				
			||||||
 | 
					die(const char *fmt, ...) {
 | 
				
			||||||
 | 
						va_list ap;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						va_start(ap, fmt);
 | 
				
			||||||
 | 
						vfprintf(stderr, fmt, ap);
 | 
				
			||||||
 | 
						va_end(ap);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (fmt[0] && fmt[strlen(fmt)-1] == ':') {
 | 
				
			||||||
 | 
							fputc(' ', stderr);
 | 
				
			||||||
 | 
							perror(NULL);
 | 
				
			||||||
 | 
						} else {
 | 
				
			||||||
 | 
							fputc('\n', stderr);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						exit(1);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										8
									
								
								util.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								util.h
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,8 @@
 | 
				
			|||||||
 | 
					/* See LICENSE file for copyright and license details. */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#define MAX(A, B)               ((A) > (B) ? (A) : (B))
 | 
				
			||||||
 | 
					#define MIN(A, B)               ((A) < (B) ? (A) : (B))
 | 
				
			||||||
 | 
					#define BETWEEN(X, A, B)        ((A) <= (X) && (X) <= (B))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void die(const char *fmt, ...);
 | 
				
			||||||
 | 
					void *ecalloc(size_t nmemb, size_t size);
 | 
				
			||||||
		Reference in New Issue
	
	Block a user