зеркало из
				https://github.com/iharh/notes.git
				synced 2025-10-30 21:26:09 +02:00 
			
		
		
		
	m
Этот коммит содержится в:
		
							родитель
							
								
									5bf2c06a9f
								
							
						
					
					
						Коммит
						bd20e1c71f
					
				| @ -1 +1,7 @@ | |||||||
|  | https://dunst-project.org/ | ||||||
|  | 
 | ||||||
|  | https://github.com/dunst-project/dunst | ||||||
|  | https://gist.github.com/NNBnh/5f6e601a6a82a6ed43b1959698758141 | ||||||
|  |     https://github.com/NNBnh/dotfiles | ||||||
|  | 
 | ||||||
| https://wiki.archlinux.org/index.php/Dunst | https://wiki.archlinux.org/index.php/Dunst | ||||||
|  | |||||||
| @ -35,3 +35,37 @@ kmonad | |||||||
| https://github.com/kmonad/kmonad | https://github.com/kmonad/kmonad | ||||||
|     https://www.youtube.com/watch?v=Dhj1eauljwU |     https://www.youtube.com/watch?v=Dhj1eauljwU | ||||||
|     https://github.com/kmonad/kmonad/blob/master/keymap/tutorial.kbd |     https://github.com/kmonad/kmonad/blob/master/keymap/tutorial.kbd | ||||||
|  | 
 | ||||||
|  | my code | ||||||
|  | 
 | ||||||
|  | -- from upstream Hacks | ||||||
|  | 
 | ||||||
|  | -- | A fully generic tray resize hook that invokes a callback whenever a | ||||||
|  | -- tray-like window changes width. | ||||||
|  | trayPaddingEventHook | ||||||
|  |   :: Query Bool     -- ^ query to identify the tray window | ||||||
|  |   -> (Int -> X ())  -- ^ action to perform when tray width changes | ||||||
|  |   -> Event -> X All -- ^ resulting event hook | ||||||
|  | trayPaddingEventHook trayQ widthChanged ConfigureEvent{ ev_window = w, ev_width = wa } = do | ||||||
|  |   whenX (runQuery trayQ w) $ widthChanged (fi wa) | ||||||
|  |   mempty | ||||||
|  | trayPaddingEventHook _ _ _ = mempty | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | -- | A generic version of 'trayerPaddingXmobarEventHook' that | ||||||
|  | -- allows the user to specify how to identify a tray window and the property | ||||||
|  | -- to use with 'xmonadPropLog''. This is useful for other trays like | ||||||
|  | -- stalonetray and also when space for more than one tray-like window needs to | ||||||
|  | -- be reserved. | ||||||
|  | trayPaddingXmobarEventHook | ||||||
|  |   :: Query Bool     -- ^ query to identify the tray window | ||||||
|  |   -> String         -- ^ 'xmonadPropLog'' property to use | ||||||
|  |   -> Event -> X All -- ^ resulting event hook | ||||||
|  | trayPaddingXmobarEventHook trayQ prop = trayPaddingEventHook trayQ hspaceLog | ||||||
|  |   where hspaceLog width = xmonadPropLog' prop ("<hspace=" ++ show width ++ "/>") | ||||||
|  | 
 | ||||||
|  | -- | A simple trayer/xmobar-specific event hook that watches for trayer window | ||||||
|  | -- resize changes and updates the _XMONAD_TRAYPAD property with xmobar markup | ||||||
|  | -- that leaves a gap for the myTray. | ||||||
|  | myTrayPaddingXmobarEventHook :: Event -> X All -- ^ event hook | ||||||
|  | myTrayPaddingXmobarEventHook = trayPaddingXmobarEventHook (className =? myTray) "_XMONAD_TRAYPAD" | ||||||
|  | |||||||
		Загрузка…
	
	
			
			x
			
			
		
	
		Ссылка в новой задаче
	
	Block a user
	 Ihar Hancharenka
						Ihar Hancharenka