Добавлена поддержка палитры Matugen для Wlogout + рефактор скрипта его запуска

This commit is contained in:
retrilzzy committed 2025-11-09 23:43:49 +05:00
1 parent 8b6f980991
commit bc021553e0
3 files changed
+9 -35

No files matched your search

@@ -10,43 +10,20 @@ fi
confDir="${XDG_CONFIG_HOME:-$HOME/.config}"
# Style selection
[ -z "${1}" ] || wlogoutStyle="${1}"
wLayout="${confDir}/wlogout/layout_${wlogoutStyle}"
wlTmplt="${confDir}/wlogout/style_${wlogoutStyle}.css"
if [ ! -f "${wLayout}" ] || [ ! -f "${wlTmplt}" ]; then
echo "ERROR: Config ${wlogoutStyle} not found..."
wlogoutStyle=1
wLayout="${confDir}/wlogout/layout_${wlogoutStyle}"
wlTmplt="${confDir}/wlogout/style_${wlogoutStyle}.css"
fi
wLayout="${confDir}/wlogout/layout"
wlTmplt="${confDir}/wlogout/style.css"
# Detect monitor resolution
x_mon=$(hyprctl -j monitors | jq '.[] | select(.focused==true) | .width')
y_mon=$(hyprctl -j monitors | jq '.[] | select(.focused==true) | .height')
hypr_scale=$(hyprctl -j monitors | jq '.[] | select(.focused == true) | .scale' | sed 's/\.//')
# Scale config layout and style
case "${wlogoutStyle}" in
1)
wlColms=6
export mgn=$((y_mon * 38 / hypr_scale))
export hvr=$((y_mon * 33 / hypr_scale))
;;
2)
wlColms=2
export x_mgn=$((x_mon * 38 / hypr_scale))
export y_mgn=$((y_mon * 28 / hypr_scale))
export x_hvr=$((x_mon * 35 / hypr_scale))
export y_hvr=$((y_mon * 23 / hypr_scale))
;;
esac
wlColms=6
export mgn=$((y_mon * 38 / hypr_scale))
export hvr=$((y_mon * 33 / hypr_scale))
# Scale font size
export fntSize=$((y_mon * 2 / 100))
export BtnCol="white" # Default button color
# Evaluate hypr border radius
hypr_border="$(hyprctl -j getoption decoration:rounding | jq '.int')"
export hypr_border
@@ -1,6 +1,6 @@
{
"label": "lock",
"action": "~/.config/retrilz-scripts/current-wall.sh && loginctl lock-session",
"action": "loginctl lock-session",
"text": "Lock",
"keybind": "l"
}
@@ -14,7 +14,7 @@
{
"label": "suspend",
"action": "~/.config/retrilz-scripts/current-wall.sh && systemctl suspend",
"action": "systemctl suspend",
"text": "Suspend",
"keybind": "s"
}
@@ -28,7 +28,7 @@
{
"label": "hibernate",
"action": "~/.config/retrilz-scripts/current-wall.sh && systemctl hibernate",
"action": "systemctl hibernate",
"text": "Hibernate",
"keybind": "h"
}
@@ -1,6 +1,4 @@
@define-color wl-bg rgba(0, 0, 0, 0.3);
@define-color wl-button-bg rgb(33, 33, 33);
@define-color wl-button-fg rgba(200, 200, 200, 1.0);
@import "$HOME/.config/wlogout/colors.css";
* {
@@ -59,7 +57,6 @@ button:hover#poweroff {
border-radius: ${active_rad}px;
margin : ${hvr}px 0px ${hvr}px 0px;
}
button:hover#hibernate {
border-radius: ${active_rad}px;
margin : ${hvr}px 0px ${hvr}px 0px;