Update
This commit is contained in:
117
home/system/wlogout/default.nix
Normal file
117
home/system/wlogout/default.nix
Normal file
@@ -0,0 +1,117 @@
|
||||
{ config, pkgs, ... }: {
|
||||
|
||||
programs.wlogout = {
|
||||
enable = true;
|
||||
layout = [
|
||||
{
|
||||
label = "lock";
|
||||
action = "${pkgs.hyprlock}/bin/hyprlock";
|
||||
text = "Lock";
|
||||
keybind = "l";
|
||||
}
|
||||
{
|
||||
label = "hibernate";
|
||||
action = "systemctl hibernate";
|
||||
text = "Hibernate";
|
||||
keybind = "h";
|
||||
}
|
||||
{
|
||||
label = "logout";
|
||||
action = "killall -9 Hyprland sleep 2";
|
||||
text = "Exit";
|
||||
keybind = "e";
|
||||
}
|
||||
{
|
||||
label = "shutdown";
|
||||
action = "systemctl poweroff";
|
||||
text = "Shutdown";
|
||||
keybind = "s";
|
||||
}
|
||||
{
|
||||
label = "suspend";
|
||||
action = "systemctl suspend";
|
||||
text = "Suspend";
|
||||
keybind = "u";
|
||||
}
|
||||
{
|
||||
label = "reboot";
|
||||
action = "systemctl reboot";
|
||||
text = "Reboot";
|
||||
keybind = "r";
|
||||
}
|
||||
];
|
||||
|
||||
style = ''
|
||||
* {
|
||||
font-family: "${config.theme.font}";
|
||||
background-image: none;
|
||||
transition: 20ms;
|
||||
}
|
||||
|
||||
window {
|
||||
background-color: rgba(12,12,12,0.5);
|
||||
}
|
||||
|
||||
button {
|
||||
color: #${config.theme.colors.fg};
|
||||
font-size:20px;
|
||||
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
background-size: 25%;
|
||||
|
||||
border: 3px solid #${config.theme.colors.bg};
|
||||
background-color: #${config.theme.colors.bg};
|
||||
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
|
||||
}
|
||||
|
||||
button:focus,
|
||||
button:active {
|
||||
color: #${config.theme.colors.primary-fg};
|
||||
background-color: #${config.theme.colors.primary-bg};
|
||||
border: 3px solid #${config.theme.colors.primary-bg};
|
||||
}
|
||||
|
||||
/*
|
||||
-----------------------------------------------------
|
||||
Buttons
|
||||
-----------------------------------------------------
|
||||
*/
|
||||
|
||||
#lock,#logout,#suspend,#hibernate,#shutdown,#reboot {
|
||||
margin: 10px;
|
||||
border-radius: ${toString config.theme.rounding}px;
|
||||
}
|
||||
|
||||
#lock {
|
||||
background-image: image(url("icons/lock.png"));
|
||||
}
|
||||
|
||||
#logout {
|
||||
background-image: image(url("icons/logout.png"));
|
||||
}
|
||||
|
||||
#suspend {
|
||||
background-image: image(url("icons/suspend.png"));
|
||||
}
|
||||
|
||||
#hibernate {
|
||||
background-image: image(url("icons/hibernate.png"));
|
||||
}
|
||||
|
||||
#shutdown {
|
||||
background-image: image(url("icons/shutdown.png"));
|
||||
}
|
||||
|
||||
#reboot {
|
||||
background-image: image(url("icons/reboot.png"));
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
||||
xdg.configFile."wlogout/icons" = {
|
||||
recursive = false;
|
||||
source = ./icons;
|
||||
};
|
||||
|
||||
}
|
||||
BIN
home/system/wlogout/icons/hibernate.png
Normal file
BIN
home/system/wlogout/icons/hibernate.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.6 KiB |
BIN
home/system/wlogout/icons/lock.png
Normal file
BIN
home/system/wlogout/icons/lock.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.9 KiB |
BIN
home/system/wlogout/icons/logout.png
Normal file
BIN
home/system/wlogout/icons/logout.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.6 KiB |
BIN
home/system/wlogout/icons/reboot.png
Normal file
BIN
home/system/wlogout/icons/reboot.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.9 KiB |
BIN
home/system/wlogout/icons/shutdown.png
Normal file
BIN
home/system/wlogout/icons/shutdown.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.0 KiB |
BIN
home/system/wlogout/icons/suspend.png
Normal file
BIN
home/system/wlogout/icons/suspend.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.4 KiB |
Reference in New Issue
Block a user