~mdkcore/dotbins

2559c86b3c5d2fcce5e8bcc102ac40467bf92be6 — Rodrigo Oliveira 1 year, 9 months ago 0471104 master
[power] Use loginctl instead of pm-*
1 files changed, 7 insertions(+), 7 deletions(-)

M power
M power => power +7 -7
@@ 3,22 3,22 @@
action=${1:-hybrid}
delay=3

command='pm-suspend-hybrid'
subcommand="hybrid-sleep"
case $action in
    hybrid)
        ;;
    suspend)
        command='pm-suspend'
        subcommand="suspend"
        ;;
    hibernate)
        command='pm-hibernate'
        subcommand="hibernate"
        ;;
    lock-only)
        command=''
        subcommand=''
        ;;
    *)
        echo "action '$action' not recognized; just locking and clearing"
        command=''
        subcommand=''
        ;;
esac



@@ 31,8 31,8 @@ DISPLAY=$display xlock -mode blank&
# clear cached gpg password
echo RELOADAGENT | gpg-connect-agent

if [ -n "$command" ]
if [ -n "$subcommand" ]
then
    sleep $delay
    sudo "$command"
    loginctl "$subcommand"
fi