mirror of
				https://github.com/rad4day/Waybar.git
				synced 2025-11-01 00:12:42 +01:00 
			
		
		
		
	Add waybar-states(5)
This commit is contained in:
		
							
								
								
									
										43
									
								
								man/waybar-states.5.scd
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										43
									
								
								man/waybar-states.5.scd
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,43 @@ | ||||
| waybar-states(5) | ||||
|  | ||||
| # OVERVIEW | ||||
|  | ||||
| Some modules support 'states' which allows percentage values to be used as styling triggers to | ||||
| apply a class when the value matches the declared state value. | ||||
|  | ||||
| # STATES | ||||
|  | ||||
| - Every entry (*state*) consits of a *<name>* (typeof: *string*) and a *<value>* (typeof: *integer*). | ||||
|  | ||||
| 	- The state can be addressed as a CSS class in the *style.css*. The name of the CSS class is the *<name>* of the state. | ||||
| 	  Each class gets activated when the current capacity is equal or below the configured *<value>*. | ||||
|  | ||||
| 	- Also each state can have its own *format*. | ||||
| 	  Those con be configured via *format-<name>*. | ||||
| 	  Or if you want to differentiate a bit more even as *format-<status>-<state>*. | ||||
|  | ||||
| # EXAMPLE | ||||
|  | ||||
| ``` | ||||
| "battery": { | ||||
| 	"bat": "BAT2", | ||||
| 	"interval": 60, | ||||
| 	"states": { | ||||
| 		"warning": 30, | ||||
| 		"critical": 15 | ||||
| 	}, | ||||
| 	"format": "{capacity}% {icon}", | ||||
| 	"format-icons": ["", "", "", "", ""], | ||||
| 	"max-length": 25 | ||||
| } | ||||
| ``` | ||||
|  | ||||
| # STYLING STATES | ||||
|  | ||||
| - *#battery.<state>* | ||||
|   - *<state>* can be defined in the *config*. | ||||
|  | ||||
| # EXAMPLE: | ||||
|  | ||||
| - *#battery.warning: { background: orange; }* | ||||
| - *#battery.critical: { background: red; }* | ||||
| @@ -176,6 +176,7 @@ if scdoc.found() | ||||
|         'waybar-sway-workspaces.5.scd', | ||||
|         'waybar-temperature.5.scd', | ||||
|         'waybar-tray.5.scd', | ||||
|         'waybar-states.5.scd', | ||||
|     ] | ||||
|  | ||||
|     foreach filename : man_files | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Michael Aquilina
					Michael Aquilina