labwc: Add module for Labwc (#6807)
Add a module for labwc compositor. Add myself as labwc module maintainer
This commit is contained in:
parent
5d48f3ded3
commit
d8263c0b84
14 changed files with 741 additions and 0 deletions
11
tests/modules/services/window-managers/labwc/autostart
Normal file
11
tests/modules/services/window-managers/labwc/autostart
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
#!/nix/store/58br4vk3q5akf4g8lx0pqzfhn47k3j8d-bash-5.2p37/bin/bash
|
||||
### This file was generated with Nix. Don't modify this file directly.
|
||||
|
||||
### AUTOSTART SERVICE ###
|
||||
wayvnc &
|
||||
waybar &
|
||||
swaybg -c '#113344' >/dev/null 2>&1 &
|
||||
|
||||
### SYSTEMD INTEGRATION ###
|
||||
@dbus@/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY XDG_CURRENT_DESKTOP && systemctl --user stop labwc-session.target && systemctl --user start labwc-session.target
|
||||
|
||||
6
tests/modules/services/window-managers/labwc/default.nix
Normal file
6
tests/modules/services/window-managers/labwc/default.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
labwc-rc-configuration = ./labwc-rc.nix;
|
||||
labwc-menu-configuration = ./labwc-menu.nix;
|
||||
labwc-autostart-configuration = ./labwc-autostart.nix;
|
||||
labwc-environment-configuration = ./labwc-environment.nix;
|
||||
}
|
||||
3
tests/modules/services/window-managers/labwc/environment
Normal file
3
tests/modules/services/window-managers/labwc/environment
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
XDG_CURRENT_DESKTOP=labwc:wlroots
|
||||
XKB_DEFAULT_LAYOUT=us
|
||||
WLR_XWAYLAND=
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
wayland.windowManager.labwc = {
|
||||
enable = true;
|
||||
package = null;
|
||||
autostart = [
|
||||
"wayvnc &"
|
||||
"waybar &"
|
||||
"swaybg -c '#113344' >/dev/null 2>&1 &"
|
||||
];
|
||||
};
|
||||
|
||||
nmt.script = ''
|
||||
labwcAutostart=home-files/.config/labwc/autostart
|
||||
|
||||
assertFileExists "$labwcAutostart"
|
||||
assertFileContent "$labwcAutostart" "${./autostart}"
|
||||
'';
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
wayland.windowManager.labwc = {
|
||||
enable = true;
|
||||
package = null;
|
||||
xwayland.enable = false;
|
||||
environment = [
|
||||
"XDG_CURRENT_DESKTOP=labwc:wlroots"
|
||||
"XKB_DEFAULT_LAYOUT=us"
|
||||
];
|
||||
};
|
||||
|
||||
nmt.script = ''
|
||||
labwcEnvironment=home-files/.config/labwc/environment
|
||||
|
||||
assertFileExists "$labwcEnvironment"
|
||||
assertFileContent "$labwcEnvironment" "${./environment}"
|
||||
'';
|
||||
}
|
||||
99
tests/modules/services/window-managers/labwc/labwc-menu.nix
Normal file
99
tests/modules/services/window-managers/labwc/labwc-menu.nix
Normal file
|
|
@ -0,0 +1,99 @@
|
|||
{
|
||||
wayland.windowManager.labwc = {
|
||||
enable = true;
|
||||
package = null;
|
||||
menu = [
|
||||
{
|
||||
menuId = "client-menu";
|
||||
label = "Client Menu";
|
||||
icon = "";
|
||||
items = [
|
||||
{
|
||||
label = "Maximize";
|
||||
icon = "";
|
||||
action = {
|
||||
name = "ToggleMaximize";
|
||||
};
|
||||
}
|
||||
{
|
||||
label = "Fullscreen";
|
||||
action = {
|
||||
name = "ToggleFullscreen";
|
||||
};
|
||||
}
|
||||
{
|
||||
label = "Always on Top";
|
||||
action = {
|
||||
name = "ToggleAlwaysOnTop";
|
||||
};
|
||||
}
|
||||
{
|
||||
label = "Alacritty";
|
||||
action = {
|
||||
name = "Execute";
|
||||
command = "alacritty";
|
||||
};
|
||||
}
|
||||
{
|
||||
separator = { };
|
||||
}
|
||||
{
|
||||
label = "Workspace";
|
||||
menuId = "workspace";
|
||||
icon = "";
|
||||
items = [
|
||||
{
|
||||
label = "Move Left";
|
||||
action = {
|
||||
name = "SendToDesktop";
|
||||
to = "left";
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
separator = {
|
||||
label = "sep";
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
menuId = "menu-two";
|
||||
label = "Client Menu Two";
|
||||
icon = "";
|
||||
items = [
|
||||
{
|
||||
label = "Menu In Menu";
|
||||
menuId = "menu-in-menu";
|
||||
icon = "";
|
||||
items = [
|
||||
{
|
||||
label = "Menu In Menu In Menu";
|
||||
menuId = "menu-in-menu-in-menu";
|
||||
icon = "";
|
||||
items = [
|
||||
{
|
||||
label = "Move Right";
|
||||
action = {
|
||||
name = "SendToDesktop";
|
||||
to = "right";
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
}
|
||||
{ menuId = ""; }
|
||||
];
|
||||
};
|
||||
|
||||
nmt.script = ''
|
||||
labwcMenuConfig=home-files/.config/labwc/menu.xml
|
||||
|
||||
assertFileExists "$labwcMenuConfig"
|
||||
assertFileContent "$labwcMenuConfig" "${./menu.xml}"
|
||||
'';
|
||||
}
|
||||
81
tests/modules/services/window-managers/labwc/labwc-rc.nix
Normal file
81
tests/modules/services/window-managers/labwc/labwc-rc.nix
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
{
|
||||
wayland.windowManager.labwc = {
|
||||
enable = true;
|
||||
package = null;
|
||||
rc = {
|
||||
theme = {
|
||||
name = "nord";
|
||||
cornerRadius = 8;
|
||||
font = {
|
||||
"@name" = "FiraCode";
|
||||
"@place" = "";
|
||||
"@size" = "11";
|
||||
};
|
||||
};
|
||||
mouse = {
|
||||
default = { };
|
||||
context = {
|
||||
"@name" = "Root";
|
||||
mousebind = [
|
||||
{
|
||||
"@button" = "Right";
|
||||
"@action" = "Press";
|
||||
action = {
|
||||
"@name" = "ShowMenu";
|
||||
"@menu" = "some-custom-menu";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
keyboard = {
|
||||
default = true;
|
||||
keybind = [
|
||||
{
|
||||
"@key" = "W-Return";
|
||||
action = {
|
||||
"@command" = "alacritty";
|
||||
"@name" = "Execute";
|
||||
};
|
||||
}
|
||||
{
|
||||
"@key" = "W-Esc";
|
||||
action = {
|
||||
"@name" = "Execute";
|
||||
"@command" = "foot";
|
||||
};
|
||||
}
|
||||
{
|
||||
"@key" = "W-1";
|
||||
action = {
|
||||
"@to" = "1";
|
||||
"@name" = "GoToDesktop";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
desktops = {
|
||||
"@number" = 10;
|
||||
};
|
||||
};
|
||||
extraConfig = ''
|
||||
<!-- ExtraConfig -->
|
||||
<tabletTool motion="absolute" relativeMotionSensitivity="1.0" />
|
||||
<libinput>
|
||||
<device category="default">
|
||||
<naturalScroll></naturalScroll>
|
||||
<leftHanded></leftHanded>
|
||||
<pointerSpeed></pointerSpeed>
|
||||
<accelProfile></accelProfile>
|
||||
</device>
|
||||
</libinput>
|
||||
'';
|
||||
};
|
||||
|
||||
nmt.script = ''
|
||||
labwcConfig=home-files/.config/labwc/rc.xml
|
||||
|
||||
assertFileExists "$labwcConfig"
|
||||
assertFileContent "$labwcConfig" "${./rc.xml}"
|
||||
'';
|
||||
}
|
||||
38
tests/modules/services/window-managers/labwc/menu.xml
Normal file
38
tests/modules/services/window-managers/labwc/menu.xml
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- ### This file was generated with Nix. Don't modify this file directly. -->
|
||||
<openbox_menu>
|
||||
<menu id="client-menu" label="Client Menu">
|
||||
<item label="Maximize">
|
||||
<action name="ToggleMaximize" />
|
||||
</item>
|
||||
<item label="Fullscreen">
|
||||
<action name="ToggleFullscreen" />
|
||||
</item>
|
||||
<item label="Always on Top">
|
||||
<action name="ToggleAlwaysOnTop" />
|
||||
</item>
|
||||
<item label="Alacritty">
|
||||
<action name="Execute" command="alacritty" />
|
||||
</item>
|
||||
<separator />
|
||||
<menu id="workspace" label="Workspace">
|
||||
<item label="Move Left">
|
||||
<action name="SendToDesktop" to="left" />
|
||||
</item>
|
||||
</menu>
|
||||
<separator label="sep" />
|
||||
</menu>
|
||||
<menu id="menu-two" label="Client Menu Two">
|
||||
<menu id="menu-in-menu" label="Menu In Menu">
|
||||
<menu id="menu-in-menu-in-menu" label="Menu In Menu In Menu">
|
||||
<item label="Move Right">
|
||||
<action name="SendToDesktop" to="right" />
|
||||
</item>
|
||||
</menu>
|
||||
</menu>
|
||||
</menu>
|
||||
<menu id="">
|
||||
|
||||
</menu>
|
||||
|
||||
</openbox_menu>
|
||||
41
tests/modules/services/window-managers/labwc/rc.xml
Normal file
41
tests/modules/services/window-managers/labwc/rc.xml
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- ### This file was generated with Nix. Don't modify this file directly. -->
|
||||
<labwc_config>
|
||||
<desktops number="10" />
|
||||
<keyboard>
|
||||
<default />
|
||||
<keybind key="W-Return">
|
||||
<action name="Execute" command="alacritty" />
|
||||
</keybind>
|
||||
<keybind key="W-Esc">
|
||||
<action name="Execute" command="foot" />
|
||||
</keybind>
|
||||
<keybind key="W-1">
|
||||
<action name="GoToDesktop" to="1" />
|
||||
</keybind>
|
||||
</keyboard>
|
||||
<mouse>
|
||||
<default />
|
||||
<context name="Root">
|
||||
<mousebind button="Right" action="Press">
|
||||
<action name="ShowMenu" menu="some-custom-menu" />
|
||||
</mousebind>
|
||||
</context>
|
||||
</mouse>
|
||||
<theme>
|
||||
<cornerRadius>8</cornerRadius>
|
||||
<font place="" name="FiraCode" size="11" />
|
||||
<name>nord</name>
|
||||
</theme>
|
||||
<!-- ExtraConfig -->
|
||||
<tabletTool motion="absolute" relativeMotionSensitivity="1.0" />
|
||||
<libinput>
|
||||
<device category="default">
|
||||
<naturalScroll></naturalScroll>
|
||||
<leftHanded></leftHanded>
|
||||
<pointerSpeed></pointerSpeed>
|
||||
<accelProfile></accelProfile>
|
||||
</device>
|
||||
</libinput>
|
||||
|
||||
</labwc_config>
|
||||
Loading…
Add table
Add a link
Reference in a new issue