xdg_decoration_theme_v1
- external
 
zxdg_decoration_theme_manager_v1
This global interface allows clients to inform the compositor of their current light or dark theme preference.
The compositor may use this information to render matching decorations consistent with the client's theme.
get_toplevel_theme(id: new_id<zxdg_toplevel_theme_v1>, toplevel: object<xdg_toplevel>)
Argument  | Type  | Description  | 
|---|---|---|
| id | new_id<zxdg_toplevel_theme_v1> | |
| toplevel | object<xdg_toplevel> | 
Create a new decoration theme object associated with a given xdg_toplevel. The theme object is used to notify the compositor when the client changes between light and dark modes.
zxdg_toplevel_theme_v1
The toplevel theme object allows a client to notify the compositor of its active color theme.
The compositor should not enforce the client's theme, but may adjust decoration colors to match the client's preference.
set_theme(theme: uint<zxdg_toplevel_theme_v1.theme>)
Argument  | Type  | Description  | 
|---|---|---|
| theme | uint<zxdg_toplevel_theme_v1.theme> | current theme mode  | 
Notify the compositor that the client is currently using the specified theme mode. The compositor may use this information to adjust the color of decorations for this toplevel.
This request can be sent any time, such as when the user toggles between light and dark modes.
Compositor Support
Copyright
Copyright © 2025 YaoBing Xiao
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.