Add more checks and fixed old files
This commit is contained in:
parent
994708ec16
commit
f097e7186d
7 changed files with 133 additions and 82 deletions
|
|
@ -2,8 +2,7 @@
|
|||
let
|
||||
strPalette = with pkgs.rice;
|
||||
pkgs.lib.rice.palette.toRgbHex rec {
|
||||
foreground = colorPalette.primary.foreground;
|
||||
background = colorPalette.primary.background;
|
||||
inherit (colorPalette.primary) background foreground;
|
||||
color0 = colorPalette.normal.black;
|
||||
color1 = colorPalette.normal.red;
|
||||
color2 = colorPalette.normal.green;
|
||||
|
|
|
|||
|
|
@ -15,9 +15,9 @@ let
|
|||
lib.concatStringsSep " "
|
||||
[
|
||||
"${pkgs.yad}/bin/yad --question --center --on-top --sticky --timeout=30 --timeout-indicator=bottom"
|
||||
(if isNull title then "" else ''--title "${title}"'')
|
||||
(if isNull image then "" else ''--image "${image}"'')
|
||||
(if isNull text then "" else ''--text "${text}"'')
|
||||
(if title == null then "" else ''--title "${title}"'')
|
||||
(if image == null then "" else ''--image "${image}"'')
|
||||
(if text == null then "" else ''--text "${text}"'')
|
||||
"&& ${cmd}"
|
||||
];
|
||||
systemctl = "${pkgs.systemd}/bin/systemctl";
|
||||
|
|
@ -34,13 +34,13 @@ let
|
|||
|
||||
normal = {
|
||||
foreground = colorPalette.normal.white;
|
||||
background = color.setAlphaRgba alpha (colorPalette.normal.black);
|
||||
background = color.setAlphaRgba alpha colorPalette.normal.black;
|
||||
underline = colorPalette.dark.blue;
|
||||
};
|
||||
|
||||
active = {
|
||||
foreground = colorPalette.bright.white;
|
||||
background = color.setAlphaRgba alpha (colorPalette.normal.black);
|
||||
background = color.setAlphaRgba alpha colorPalette.normal.black;
|
||||
underline = colorPalette.normal.yellow;
|
||||
};
|
||||
|
||||
|
|
@ -50,14 +50,10 @@ let
|
|||
underline = colorPalette.bright.red;
|
||||
};
|
||||
|
||||
alert = colorPalette.bright.red;
|
||||
|
||||
green = colorPalette.normal.green;
|
||||
yellow = colorPalette.normal.yellow;
|
||||
inherit (colorPalette.normal) green red yellow;
|
||||
inherit (color) transparent;
|
||||
orange = colorPalette.bright.red;
|
||||
red = colorPalette.normal.red;
|
||||
|
||||
transparent = color.transparent;
|
||||
alert = orange;
|
||||
};
|
||||
|
||||
commonBar = {
|
||||
|
|
@ -67,8 +63,9 @@ let
|
|||
height = 20;
|
||||
radius = 6.0;
|
||||
fixed-center = false;
|
||||
background = colors.normal.background;
|
||||
foreground = colors.normal.foreground;
|
||||
|
||||
inherit (colors.normal) background foreground;
|
||||
|
||||
line-size = 2;
|
||||
line-color = colors.normal.underline;
|
||||
padding = 0;
|
||||
|
|
@ -306,38 +303,38 @@ in
|
|||
};
|
||||
menu = [
|
||||
[
|
||||
({
|
||||
{
|
||||
text = "";
|
||||
exec = confirm_command {
|
||||
cmd = logout;
|
||||
title = "Logout";
|
||||
text = "Do you want to logout?";
|
||||
};
|
||||
})
|
||||
({
|
||||
}
|
||||
{
|
||||
text = "";
|
||||
exec = confirm_command {
|
||||
cmd = "${systemctl} reboot";
|
||||
title = "Reboot";
|
||||
text = "Do you want to reboot?";
|
||||
};
|
||||
})
|
||||
({
|
||||
}
|
||||
{
|
||||
text = "";
|
||||
exec = confirm_command {
|
||||
cmd = "${systemctl} hibernate";
|
||||
title = "Hibernate";
|
||||
text = "Do you want to hibernate?";
|
||||
};
|
||||
})
|
||||
({
|
||||
}
|
||||
{
|
||||
text = "";
|
||||
exec = confirm_command {
|
||||
cmd = "${shutdown} now";
|
||||
title = "Shutdown";
|
||||
text = "Do you want to shutdown?";
|
||||
};
|
||||
})
|
||||
}
|
||||
]
|
||||
];
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue