Skip to content

Instantly share code, notes, and snippets.

@brospars
Created March 21, 2018 08:12
Show Gist options
  • Save brospars/9bcbb56cbb33c33a1ab12e257f17f249 to your computer and use it in GitHub Desktop.
Save brospars/9bcbb56cbb33c33a1ab12e257f17f249 to your computer and use it in GitHub Desktop.
Ubuntu : lock session and go to sleep

This alias lock the session (lightdm) and enter sleep mode

# Lock session and go to sleep
alias bye='function _bye(){ dm-tool lock; sleep 10; sudo pm-suspend;};_bye'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment