feat(linux): Set up Hyprland

This commit is contained in:
js0ny 2025-01-26 00:23:33 +00:00
parent 346a975e80
commit 49693c7657
20 changed files with 533 additions and 35 deletions

View file

@ -0,0 +1,50 @@
#!/usr/bin/env bash
## wlogout actions
# Ask for confirmation
cdialog () {
yad --title='Confirm?' --borders=15 --center --fixed --undecorated --button=Yes:0 --button=No:1 --text="Are you sure?" --text-align=center
}
if [[ "$1" == '--shutdown' ]]; then
cdialog
if [[ "$?" == 0 ]]; then
systemctl poweroff
else
exit
fi
elif [[ "$1" == '--reboot' ]]; then
cdialog
if [[ "$?" == 0 ]]; then
systemctl reboot
else
exit
fi
elif [[ "$1" == '--hibernate' ]]; then
cdialog
if [[ "$?" == 0 ]]; then
systemctl hibernate
else
exit
fi
elif [[ "$1" == '--lock' ]]; then
~/.config/hypr/scripts/lockscreen
elif [[ "$1" == '--suspend' ]]; then
cdialog
if [[ "$?" == 0 ]]; then
mpc -q pause
amixer set Master mute
~/.config/hypr/scripts/lockscreen
systemctl suspend
else
exit
fi
elif [[ "$1" == '--logout' ]]; then
cdialog
if [[ "$?" == 0 ]]; then
kill -9 -1
else
exit
fi
fi

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7 KiB

View file

@ -0,0 +1,30 @@
{
"label" : "suspend",
"text" : "Suspend",
"action" : "~/.config/hypr/wlogout/actions --suspend",
"keybind" : "u"
}
{
"label" : "logout",
"text" : "Logout",
"action" : "~/.config/hypr/wlogout/actions --logout",
"keybind" : "e"
}
{
"label" : "lock",
"text" : "Lock",
"action" : "~/.config/hypr/wlogout/actions --lock",
"keybind" : "l"
}
{
"label" : "reboot",
"text" : "Reboot",
"action" : "~/.config/hypr/wlogout/actions --reboot",
"keybind" : "r"
}
{
"label" : "shutdown",
"text" : "Shutdown",
"action" : "~/.config/hypr/wlogout/actions --shutdown",
"keybind" : "s"
}

View file

@ -0,0 +1,52 @@
/** ********** Fonts ********** **/
* {
font-family: "JetBrains Mono", "Iosevka Nerd Font", archcraft, sans-serif;
font-size: 14px;
font-weight: bold;
}
/** ********** Main Window ********** **/
window {
background-color: #1E1E2E;
}
/** ********** Buttons ********** **/
button {
background-color: #242434;
color: #FFFFFF;
border: 2px solid #282838;
border-radius: 20px;
background-repeat: no-repeat;
background-position: center;
background-size: 35%;
}
button:focus, button:active, button:hover {
background-color: #89B4FA;
outline-style: none;
}
/** ********** Icons ********** **/
#lock {
background-image: image(url("icons/lock.png"), url("/usr/share/wlogout/icons/lock.png"));
}
#logout {
background-image: image(url("icons/logout.png"), url("/usr/share/wlogout/icons/logout.png"));
}
#suspend {
background-image: image(url("icons/suspend.png"), url("/usr/share/wlogout/icons/suspend.png"));
}
#hibernate {
background-image: image(url("icons/hibernate.png"), url("/usr/share/wlogout/icons/hibernate.png"));
}
#shutdown {
background-image: image(url("icons/shutdown.png"), url("/usr/share/wlogout/icons/shutdown.png"));
}
#reboot {
background-image: image(url("icons/reboot.png"), url("/usr/share/wlogout/icons/reboot.png"));
}