mirror of
https://github.com/js0ny/dotfiles.git
synced 2025-12-21 16:53:00 +00:00
feat(linux): Set up Hyprland
This commit is contained in:
parent
346a975e80
commit
49693c7657
20 changed files with 533 additions and 35 deletions
50
platforms/linux/wlogout/actions
Normal file
50
platforms/linux/wlogout/actions
Normal 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
|
||||
BIN
platforms/linux/wlogout/icons/hibernate.png
Normal file
BIN
platforms/linux/wlogout/icons/hibernate.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.4 KiB |
BIN
platforms/linux/wlogout/icons/lock.png
Normal file
BIN
platforms/linux/wlogout/icons/lock.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.5 KiB |
BIN
platforms/linux/wlogout/icons/logout.png
Normal file
BIN
platforms/linux/wlogout/icons/logout.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.8 KiB |
BIN
platforms/linux/wlogout/icons/reboot.png
Normal file
BIN
platforms/linux/wlogout/icons/reboot.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.8 KiB |
BIN
platforms/linux/wlogout/icons/shutdown.png
Normal file
BIN
platforms/linux/wlogout/icons/shutdown.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.7 KiB |
BIN
platforms/linux/wlogout/icons/suspend.png
Normal file
BIN
platforms/linux/wlogout/icons/suspend.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7 KiB |
30
platforms/linux/wlogout/layout
Normal file
30
platforms/linux/wlogout/layout
Normal 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"
|
||||
}
|
||||
52
platforms/linux/wlogout/style.css
Normal file
52
platforms/linux/wlogout/style.css
Normal 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"));
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue