This commit is contained in:
cnst
2024-06-21 17:44:02 +02:00
parent f9b2c71463
commit 9794839977
17 changed files with 634 additions and 62 deletions

View File

@@ -0,0 +1,30 @@
#!/usr/bin/env sh
# set variables
wLayout="$HOME/.config/wlogout/layout_2"
wlTmplt="$HOME/.config/wlogout/style_2.css"
# set font size
fntSize=`gsettings get org.gnome.desktop.interface font-name | sed "s/'//g" | awk '{print $2}'`
export fntSize=$(( fntSize * 2 ))
# set scaling as per monitor res
res=`cat /sys/class/drm/*/modes | head -1 | cut -d 'x' -f 2`
case $1 in
1) wlColms=1
export mgn=$(( res * 10 / 100 ))
export hvr=$(( res * 5 / 100 )) ;;
2) wlColms=5
export mgn=$(( res * 8 / 100 ))
export mgn2=$(( res * 65 / 100 ))
export hvr=$(( res * 3 / 100 ))
export hvr2=$(( res * 60 / 100 )) ;;
*) echo "Error: invalid parameter passed..."
exit 1 ;;
esac
# eval config files
wlStyle=`envsubst < $wlTmplt`
# launch wlogout
wlogout -b $wlColms -c 0 -r 0 --layout $wLayout --css <(echo "$wlStyle") --protocol layer-shell