mirror of
				https://github.com/rad4day/Waybar.git
				synced 2025-10-30 23:42:42 +01:00 
			
		
		
		
	Document hyprland/window rewrite option
This commit is contained in:
		| @@ -17,12 +17,31 @@ Addressed by *hyprland/window* | |||||||
| 	default: {} ++ | 	default: {} ++ | ||||||
| 	The format, how information should be displayed. On {} the current window title is displayed. | 	The format, how information should be displayed. On {} the current window title is displayed. | ||||||
|  |  | ||||||
|  | *rewrite*: ++ | ||||||
|  | 	typeof: object ++ | ||||||
|  | 	Rules to rewrite window title. See *rewrite rules*. | ||||||
|  |  | ||||||
|  | # REWRITE RULES | ||||||
|  |  | ||||||
|  | *rewrite* is an object where keys are regular expressions and values are | ||||||
|  | rewrite rules if the expression matches. Rules may contain references to | ||||||
|  | captures of the expression. | ||||||
|  |  | ||||||
|  | Regular expression and replacement follow ECMA-script rules. | ||||||
|  |  | ||||||
|  | If no expression matches, the title is left unchanged. | ||||||
|  |  | ||||||
|  | Invalid expressions (e.g., mismatched parentheses) are skipped. | ||||||
|  |  | ||||||
| # EXAMPLES | # EXAMPLES | ||||||
|  |  | ||||||
| ``` | ``` | ||||||
| "hyprland/window": { | "hyprland/window": { | ||||||
|     "format": "{}" |     "format": "{}", | ||||||
|  |     "rewrite": { | ||||||
|  |       "(.*) - Mozilla Firefox": "🌎 $1", | ||||||
|  |       "(.*) - zsh": "> [$1]" | ||||||
|  |     } | ||||||
| } | } | ||||||
| ``` | ``` | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 herlev
					herlev