hypr: add HDR monitor options and convert rules to template

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-20 23:44:19 +01:00
parent 5549369a5c
commit 8b97d14bbf
2 changed files with 31 additions and 8 deletions

View File

@@ -4,12 +4,30 @@ monitorv2 {
mode = {{ .width }}x{{ .height }}@{{ .refresh_rate }}
position = {{ .position }}
scale = {{ .scale }}
{{- if index . "vrr" }}
{{- if hasKey . "vrr" }}
vrr = {{ .vrr }}
{{- end }}
{{- if index . "transform" }}
{{- if hasKey . "transform" }}
transform = {{ .transform }}
{{- end }}
{{- if hasKey . "bitdepth" }}
bitdepth = {{ .bitdepth }}
{{- end }}
{{- if hasKey . "cm" }}
cm = {{ .cm }}
{{- end }}
{{- if hasKey . "supports_hdr" }}
supports_hdr = {{ .supports_hdr }}
{{- end }}
{{- if hasKey . "sdrbrightness" }}
sdrbrightness = {{ .sdrbrightness }}
{{- end }}
{{- if hasKey . "sdrsaturation" }}
sdrsaturation = {{ .sdrsaturation }}
{{- end }}
{{- if hasKey . "max_luminance" }}
max_luminance = {{ .max_luminance }}
{{- end }}
}
{{- end }}
{{- if not .monitors }}

View File

@@ -1,3 +1,4 @@
{{- $tags := .chezmoi.config.data.tags -}}
# Ref https://wiki.hyprland.org/Configuring/Workspace-Rules/
# "Smart gaps" / "No gaps when only"
# uncomment all if you wish to use that.
@@ -80,26 +81,30 @@ windowrule = match:xwayland 1, no_initial_focus on
## ========== Communication ==========
# Comms
windowrule = match:class ^(info\.mumble\.Mumble|discord|vesktop|teamspeak-client|TeamSpeak|TeamSpeak 3|teamspeak3)$, workspace name:comms
windowrule = match:class ^(info\.mumble\.Mumble|discord|vesktop|teamspeak-client|TeamSpeak|TeamSpeak 3|teamspeak3)$, workspace 2
# Element
windowrule = match:class ^(Element)$, workspace name:element
windowrule = match:class ^(Element)$, workspace 3
## ========== Mail ==========
windowrule = match:class ^(org\.mozilla\.Thunderbird)$, workspace name:mail
windowrule = match:class ^(org\.mozilla\.Thunderbird)$, workspace 1
## ========== Notes ==========
windowrule = match:class ^(@joplin/app-desktop)$, workspace name:joplin
windowrule = match:class ^(@joplin/app-desktop)$, workspace 4
{{- if index $tags "entertainment" }}
## ========== Multimedia ==========
windowrule = match:class Spotify, workspace name:spotify
windowrule = match:class Spotify, workspace 6
{{- end }}
### ========== Development ==========
#windowrule = match:class jetbrains-webstorm, match:title Welcome to WebStorm, float on
#windowrule = match:class jetbrains-webstorm, match:title Welcome to WebStorm, size 1080 720
{{- if index $tags "cs2" }}
## ========== Gaming ==========
# Steam
windowrule = match:class ^(steam)$, workspace name:steam
windowrule = match:class ^(steam)$, workspace 5
{{- end }}
## ========== System ==========
windowrule = match:class com.saivert.pwvucontrol, float on