diff --git a/src/xlock b/src/xlock index 82ad26f..db95e80 100644 --- a/src/xlock +++ b/src/xlock @@ -7,13 +7,12 @@ log_b="0"; # returns whether the computer has just booted a few minutes ago -booted(){ - # onboot=`echo "$(cut -d' ' -f1 /proc/uptime) > 1000;" | bc`; - return echo "$(cut -d' ' -f1 /proc/uptime) > 1000;" | bc; +at_boot(){ + echo "$(cut -d' ' -f1 /proc/uptime) > 1000;" | bc; } # lock by default (if not just booted) -if [ "$(booted)" -ne 1 ]; then +if [ "$(at_boot)" -ne 1 ]; then rm "$unlock_f"; fi;