-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add labwc patch to color app's frames
This commit adds the labwc patch which allows to change the frame color of choosen app by using window rules. As an example foot terminal has aqua colored frame. To get solution working labwc must be enabled in guivm.nix (uncomment this line # profiles.graphics.compositor = "labwc";) The patch approach was choosen cause there is no better solution (which should revise the theme handling) ready. The discussion about better soultion will be held here labwc/labwc#1092. The documentaion was also updated with LabWC section. Signed-off-by: dmitry-erin <[email protected]>
- Loading branch information
1 parent
46bf722
commit 704e5cd
Showing
5 changed files
with
426 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<!-- | ||
Copyright 2022-2024 TII (SSRC) and the Ghaf contributors | ||
SPDX-License-Identifier: CC-BY-SA-4.0 | ||
--> | ||
|
||
# Labwc Desktop Environment | ||
|
||
[Labwc](https://labwc.github.io/) is a configurable and lightweight wlroots-based Wayland-compatible desktop environment. | ||
To use Labwc as your default desktop environment, add it as a module to Ghaf: | ||
|
||
* change the configuration option `profiles.graphics.compositor = "labwc"` | ||
or | ||
* uncomment the corresponding line in [guivm.nix](../modules/virtualization/microvm/guivm.nix) file. | ||
|
||
|
||
The basis of the labwc configuration is the set of following files: `rc.xml`, `menu.xml`, `autostart`, and `environment`. These files can be edited by substituting in the Labwc overlay `overlays/custom-packages/labwc/default.nix`. | ||
|
||
|
||
## Window Border Coloring | ||
|
||
The border color concept illustrates the application trustworthiness in a user-friendly manner. The color shows the application's security level and allows avoiding user's mistakes. The same approach can be found in other projects, for example, [QubeOS](https://www.qubes-os.org/doc/getting-started/#color--security). | ||
|
||
Ghaf uses patched Labwc which makes it possible to change the border color for the chosen application. The implementation is based on window rules by substituting the server decoration colors (`serverDecoration` = `yes`). The `borderColor` property is responsible for the frame color. | ||
|
||
> **TIP:** According to the labwc specification, the **identifier** parameter is case-sensitive and relates to app_id for native Wayland windows and WM_CLASS for XWayland clients. | ||
For example: | ||
``` | ||
<windowRules> | ||
<windowRule identifier="Foot" borderColor="#00FFFF" serverDecoration="yes" skipTaskbar="yes" /> | ||
<windowRule identifier="firefox" borderColor="#FF0000" serverDecoration="yes" skipTaskbar="yes" /> | ||
</windowRules> | ||
``` | ||
|
||
![Foot Terminal with Aqua Colored Frame](../img/colored_foot_frame.png) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.