1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-11-08 11:36:05 +01:00

wleave: init (#7835)

This commit is contained in:
jaredmontoya 2025-09-19 17:43:34 +02:00 committed by GitHub
parent efcba687d3
commit 55b1f5b7b1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 274 additions and 0 deletions

View file

@ -0,0 +1,6 @@
{ lib, pkgs, ... }:
lib.optionalAttrs pkgs.stdenv.hostPlatform.isLinux {
wleave-styling = ./styling.nix;
wleave-layout-single = ./layout-single.nix;
wleave-layout-multiple = ./layout-multiple.nix;
}

View file

@ -0,0 +1 @@
{"buttons":[{"action":"systemctl poweroff","keybind":"s","label":"shutdown","text":"Shutdown"},{"action":"systemctl hibernate","height":0.5,"keybind":"h","label":"hibernate","text":"Hibernate","width":0.5},{"action":"systemctl suspend","circular":true,"keybind":"u","label":"suspend","text":"Suspend"},{"action":"swaymsg exit","keybind":"e","label":"exit","text":"Exit"},{"action":"systemctl reboot","keybind":"r","label":"reboot","text":"Reboot"},{"action":"gtklock","keybind":"l","label":"lock","text":"Lock"}],"buttons-per-row":"3","no-version-info":true}

View file

@ -0,0 +1,64 @@
{ config, ... }:
{
config = {
home.stateVersion = "22.11";
programs.wleave = {
package = config.lib.test.mkStubPackage { outPath = "@wleave@"; };
enable = true;
settings = {
no-version-info = true;
buttons-per-row = "3";
buttons = [
{
label = "shutdown";
action = "systemctl poweroff";
text = "Shutdown";
keybind = "s";
}
{
label = "hibernate";
action = "systemctl hibernate";
text = "Hibernate";
keybind = "h";
height = 0.5;
width = 0.5;
}
{
label = "suspend";
action = "systemctl suspend";
text = "Suspend";
keybind = "u";
circular = true;
}
{
label = "exit";
action = "swaymsg exit";
text = "Exit";
keybind = "e";
}
{
label = "reboot";
action = "systemctl reboot";
text = "Reboot";
keybind = "r";
}
{
label = "lock";
action = "gtklock";
text = "Lock";
keybind = "l";
}
];
};
};
nmt.script = ''
assertPathNotExists home-files/.config/wleave/style.css
assertFileContent \
home-files/.config/wleave/layout.json \
${./layout-multiple-expected.json}
'';
};
}

View file

@ -0,0 +1 @@
{"buttons":[{"action":"systemctl poweroff","keybind":"s","label":"shutdown","text":"Shutdown"}]}

View file

@ -0,0 +1,26 @@
{ config, ... }:
{
config = {
home.stateVersion = "22.11";
programs.wleave = {
package = config.lib.test.mkStubPackage { outPath = "@wleave@"; };
enable = true;
settings.buttons = [
{
label = "shutdown";
action = "systemctl poweroff";
text = "Shutdown";
keybind = "s";
}
];
};
nmt.script = ''
assertPathNotExists home-files/.config/wleave/style.css
assertFileContent \
home-files/.config/wleave/layout.json \
${./layout-single-expected.json}
'';
};
}

View file

@ -0,0 +1,16 @@
* {
border: none;
border-radius: 0;
font-family: Source Code Pro;
font-weight: bold;
color: #abb2bf;
font-size: 18px;
min-height: 0px;
}
window {
background: #16191C;
color: #aab2bf;
}
#window {
padding: 0 0px;
}

View file

@ -0,0 +1,36 @@
{ config, ... }:
{
config = {
home.stateVersion = "22.11";
programs.wleave = {
package = config.lib.test.mkStubPackage { outPath = "@wleave@"; };
enable = true;
style = ''
* {
border: none;
border-radius: 0;
font-family: Source Code Pro;
font-weight: bold;
color: #abb2bf;
font-size: 18px;
min-height: 0px;
}
window {
background: #16191C;
color: #aab2bf;
}
#window {
padding: 0 0px;
}
'';
};
nmt.script = ''
assertPathNotExists home-files/.config/wleave/layout.json
assertFileContent \
home-files/.config/wleave/style.css \
${./styling-expected.css}
'';
};
}