Skip to content

Instantly share code, notes, and snippets.

@davewongillies
Last active February 2, 2019 17:53
Show Gist options
  • Select an option

  • Save davewongillies/94f3acbfa0e5fd0f2cca36e249a31e4a to your computer and use it in GitHub Desktop.

Select an option

Save davewongillies/94f3acbfa0e5fd0f2cca36e249a31e4a to your computer and use it in GitHub Desktop.

Revisions

  1. davewongillies revised this gist Feb 2, 2019. 1 changed file with 5 additions and 5 deletions.
    10 changes: 5 additions & 5 deletions wakelock.service
    Original file line number Diff line number Diff line change
    @@ -1,14 +1,14 @@
    # file /etc/systemd/system/wakelock.service
    # /etc/systemd/system/wakelock.service

    [Unit]
    Description=Lock the screen on resume from suspend
    Before=sleep.target suspend.target

    [Service]
    User=victor
    User=daveg
    Type=forking
    Environment=DISPLAY=:0
    ExecStart=/usr/bin/i3lock
    ExecStart=/usr/bin/i3lock -i /home/daveg/Pictures/thinkpad-black.png -c 000000

    [Install]
    WantedBy=sleep.target
    WantedBy=suspend.target
    WantedBy=sleep.target suspend.target
  2. @victorhaggqvist victorhaggqvist renamed this gist Mar 20, 2015. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions gistfile1.txt → wakelock.service
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,5 @@
    # file /etc/systemd/system/wakelock.service

    [Unit]
    Description=Lock the screen on resume from suspend

  3. @victorhaggqvist victorhaggqvist created this gist Mar 20, 2015.
    12 changes: 12 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    [Unit]
    Description=Lock the screen on resume from suspend

    [Service]
    User=victor
    Type=forking
    Environment=DISPLAY=:0
    ExecStart=/usr/bin/i3lock

    [Install]
    WantedBy=sleep.target
    WantedBy=suspend.target