added hyprlock, wlogout, and wlogout script.
This commit is contained in:
24
env/.config/wlogout/layout
vendored
Normal file
24
env/.config/wlogout/layout
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"label" : "shutdown",
|
||||
"action" : "poweroff",
|
||||
"text" : "Shutdown",
|
||||
"keybind" : "s"
|
||||
}
|
||||
{
|
||||
"label" : "reboot",
|
||||
"action" : "reboot",
|
||||
"text" : "Reboot",
|
||||
"keybind" : "r"
|
||||
}
|
||||
{
|
||||
"label" : "logout",
|
||||
"action" : "loginctl kill-session $XDG_SESSION_ID",
|
||||
"text" : "Logout",
|
||||
"keybind" : "e"
|
||||
}
|
||||
{
|
||||
"label" : "lock",
|
||||
"action" : "hyprlock",
|
||||
"text" : "Lock",
|
||||
"keybind" : "l"
|
||||
}
|
||||
52
env/.config/wlogout/style.css
vendored
Normal file
52
env/.config/wlogout/style.css
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
/* ----------- 💫 https://github.com/JaKooLit 💫 -------- */
|
||||
@define-color foreground #be9eda;
|
||||
@define-color color6 #834ABD;
|
||||
|
||||
window {
|
||||
font-family: b612;
|
||||
font-size: 16pt;
|
||||
color: @foreground; /* text */
|
||||
background-color: rgba(24, 27, 32, 0.2);
|
||||
}
|
||||
|
||||
button {
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
background-size: 20%;
|
||||
background-color: transparent;
|
||||
animation: gradient_f 20s ease-in infinite;
|
||||
transition: all 0.3s ease-in;
|
||||
box-shadow: 0 0 10px 2px transparent;
|
||||
border-radius: 36px;
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
button:focus {
|
||||
box-shadow: none;
|
||||
background-size : 20%;
|
||||
}
|
||||
|
||||
button:hover {
|
||||
background-size: 50%;
|
||||
box-shadow: 0 0 10px 3px rgba(0,0,0,.4);
|
||||
background-color: @color6;
|
||||
color: transparent;
|
||||
transition: all 0.3s cubic-bezier(.55, 0.0, .28, 1.682), box-shadow 0.5s ease-in;
|
||||
}
|
||||
|
||||
#lock {
|
||||
background-image: image(url("/usr/share/wlogout/icons/lock.png"), url("/usr/local/share/wlogout/icons/lock.png"));
|
||||
}
|
||||
|
||||
#logout {
|
||||
background-image: image(url("/usr/share/wlogout/icons/logout.png"), url("/usr/local/share/wlogout/icons/logout.png"));
|
||||
}
|
||||
|
||||
#shutdown {
|
||||
background-image: image(url("/usr/share/wlogout/icons/shutdown.png"), url("/usr/local/share/wlogout/icons/shutdown.png"));
|
||||
}
|
||||
|
||||
#reboot {
|
||||
background-image: image(url("/usr/share/wlogout/icons/reboot.png"), url("/usr/local/share/wlogout/icons/reboot.png"));
|
||||
}
|
||||
|
||||
15
env/.config/wlogout/wlogout.sh
vendored
Executable file
15
env/.config/wlogout/wlogout.sh
vendored
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
# https://github.com/zDyanTB/HyprNova/blob/master/.config/hypr/scripts/wlogout.sh
|
||||
A_1080=1000
|
||||
B_1080=1000
|
||||
|
||||
# Check if wlogout is already running
|
||||
if pgrep -x "wlogout" > /dev/null; then
|
||||
pkill -x "wlogout"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Detect monitor resolution and scaling factor
|
||||
resolution=$(hyprctl -j monitors | jq -r '.[] | select(.focused==true) | .height / .scale' | awk -F'.' '{print $1}')
|
||||
hypr_scale=$(hyprctl -j monitors | jq -r '.[] | select(.focused==true) | .scale')
|
||||
wlogout --protocol layer-shell -b 4 -T $(awk "BEGIN {printf \"%.0f\", $A_1080 * 1080 * $hypr_scale / $resolution}") -B $(awk "BEGIN {printf \"%.0f\", $B_1080 * 1080 * $hypr_scale / $resolution}") &
|
||||
Reference in New Issue
Block a user