Last active
May 24, 2020 23:05
-
-
Save petrohs/ad8e28781bcf19e70d1adcfb9d32ac9c to your computer and use it in GitHub Desktop.
_xlock.bash¦ Script para personalizar el bloqueo de pantalla.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
ayuda () { echo ' | |
#=============================================================================== | |
# USO: _xlock | |
# | |
# DESCRIPCION: Parametros personalizados para xlock | |
# OPCIONES: --- | |
# DEPENDENCIAS: xscreensaver | |
# xset | |
# BUGS: --- | |
# NOTAS: --- | |
# VERSIONES: 20130830 0.0.6 PetrOHS musica. | |
# 20130518 0.0.5 PetrOHS ajustes. | |
# 20130517 0.0.4 PetrOHS Ya no existe xlock. | |
# 20101227 0.0.3 PetrOHS Apagar pantalla. | |
# 20090226 0.0.2 PetrOHS Ajustes. | |
# 20090225 0.0.1 PetrOHS Creacion. | |
#=============================================================================== | |
' | more;} | |
#ayuda | |
if [ "$1" = "-h" -o "$1" = "--help" ] | |
then | |
ayuda; | |
exit 1; | |
fi | |
#pausa la musica | |
#moc | |
mocp -P | |
#vlc | |
dbus-send --print-reply --session --dest=org.mpris.MediaPlayer2.vlc /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Pause | |
#cmus | |
cmus-remote -u | |
#pantalla oscura | |
xset dpms force suspend | |
#bloquea | |
ps -fea | grep xscreensaver | grep -v grep > /dev/null | |
if [[ $? -ne 0 ]] | |
then | |
xscreensaver & | |
sleep 10 | |
fi | |
xscreensaver-command -lock | |
#"" | |
exit 0; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment