So I have the following Problem. I am working on a script to dynamically change the content tag of any target window. The reason I want to do this is, because I added a windowrule that overrides the active and inactive opacity of all windows, where the content is games, photo or video:
hl.window_rule({
-- Set the background opacity for photos, pictures and video windows to 100% at all times
name = "non-transparent-media",
match = {
content = "photo|video|game"
},
opacity = "1.0 override"
})
I tried modifying the content property like this
$ hyprctl eval 'hl.dispatch(hl.dsp.window.set_prop({ prop="content", value="photo", window="pid:4457" }))'
error: =[C]:-1: Invalid prop name
Is there any way I can modify the content property through hyprctl?
My final goal is to integrate the script into a firefox extension, so that I can switch the content property of firefox at runtime based on the url of the currently active tab, so that the window becomes non transparent when playing YouTube.
Hyprland version
Hyprland 0.56.2 built from branch v0.56.2 at commit efb50993780079460b0cbed1363e2166a2de1d9f clean ([gha] Nix: update inputs).
Date: Wed Aug 5 14:13:21 2026
Tag: v0.56.2, commits: 7661
Libraries:
Hyprgraphics: built against 0.5.1, system has 0.5.1
Hyprutils: built against 0.14.1, system has 0.14.1
Hyprcursor: built against 0.1.13, system has 0.1.13
Hyprlang: built against 0.6.8, system has 0.6.8
Aquamarine: built against 0.15.0, system has 0.15.0
Version ABI string: efb50993780079460b0cbed1363e2166a2de1d9f_aq_0.15_hu_0.14_hg_0.5_hc_0.1_hlg_0.6
no flags were set