diff --git a/mantablockscreen b/mantablockscreen index a116c03..cf46144 100755 --- a/mantablockscreen +++ b/mantablockscreen @@ -5,6 +5,11 @@ cachepath=$HOME/.cache/mantablockscreen cropuser=$cachepath/$USER-pic-crop.png fullname=`getent passwd $USER | cut -d ":" -f 5` full_alias="${fullname} (${USER})" +if [[ -n $fullname ]]; then + full_alias="${fullname} (${USER})" +else + full_alias=$USER +fi width=$(xrandr --query | grep ' connected' | grep -o '[0-9][0-9]*x[0-9][0-9]*[^ ]*' | sed -r 's/^[^0-9]*([0-9]+x[0-9]+).*$/\1/' |cut -d "x" -f 1) height=$(xrandr --query | grep ' connected' | grep -o '[0-9][0-9]*x[0-9][0-9]*[^ ]*' | sed -r 's/^[^0-9]*([0-9]+x[0-9]+).*$/\1/' |cut -d "x" -f 2)