title: Ubuntu + i3lock lock on lid close
body: <p>I looking to lock my laptop when i close the lid and can't get this working in Ubuntu 16.04.</p>
  
  <p>I've tried this <a href="https://github.com/ruudud/i3wm-scripts" rel="nofollow noreferrer">https://github.com/ruudud/i3wm-scripts</a></p>
  
  <p>seems that this is the solution most commonly suggested on the internet, but it does not work.</p>
  
  <p>The github repo suggests creating a service called i3lock.service that runs (as far as i can tell) before "sleep.target". Please note that i have no clue what that is, and would appreciate some more info about that.</p>
  
  <p>I'm not sure if i'm supposed to just create the file and it should work or it requires some special privileges for that file or what? 
  More detail on that would be needed.</p>
  
  <p>If this solution is incorrect is it possible to be pointed to a better solution to this problem?</p>
  
  <p>Thank you in advance :)</p>