I created (Bionicpup64, running from usb stick) some desktop icons in order to enter selectively a standby mode on my laptop (according to various daily situations: short break, long standby, etc.) The icons are those visible in the attached screenshot (i.e., "sleep", "disk sleep" and "screen off")
The (very simple) code for each of them is:
1) For PC standby (sleep):
Code: Select all
#!/bin/bash
echo mem > /sys/power/state
Code: Select all
#!/bin/bash
notify-send -u critical --expire-time=2500 'OK' 'Putting the disk to sleep...'
sleep 3
hdparm -y /dev/sda
Code: Select all
#!/bin/bash
sleep 1
xset dpms force off
I hope it may be useful for somebody else, I'll listen carefully to any comments!
Fabio