1234567891011121314151617181920212223242526272829303132333435 |
- #!/bin/bash
- # This script invokes the screensaver and puts the pc to sleep.
- # Copyright (C) 2017 Fabrizio Romano Genovese <egonigredo@gmail.com>
- # This copyrighted material is made available to anyone wishing to use,
- # modify, copy, or redistribute it subject to the terms and conditions of
- # the GNU General Public License v.2, or (at your option) any later version.
- #
- # This program is distributed in the hope that it will be useful, but WITHOUT
- # ANY WARRANTY expressed or implied, including the implied warranties of
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
- # Public License for more details.
- # You should have received a copy of the
- # GNU General Public License along with this program; if not,
- # see <http://www.gnu.org/licenses/>
- # Put this file in /etc/acpi/actions/. Do not forget to give
- # sudo chmod +x sleep.sh
- # to make it executable.
- # ALL THE COMMANDS IN THE SCRIPT HAVE TO BE GIVEN VIA su -c BECAUSE OF QUBESOS WEIRDNESS.
- # IN OTHER SYSTEMS EVERYTHING IS MAYBE EASIER.
- # Modify the username to suit yours!
- user=Nigredo
- screensaver=i3-blur
-
- sudo -u $user -H sh -c "DISPLAY=:0 $screensaver"
- systemctl suspend
|