Skip to content

Instantly share code, notes, and snippets.

View michelesr's full-sized avatar

Michele Sorcinelli michelesr

View GitHub Profile
@michelesr
michelesr / vlc-inhibit-screensaver.sh
Created March 24, 2019 20:42
Script to inhibit xscreensaver when VLC is playing
#!/bin/bash
SLEEP_TIME=${1:-4m}
while true; do
if [[ $(qdbus org.mpris.MediaPlayer2.vlc /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlaybackStatus) == 'Playing' ]]; then
# tell xscreensaver to pretend there has been user activity
xscreensaver-command -deactivate
fi
sleep ${SLEEP_TIME}
done
I0526 12:01:28.722410 270 loader.go:242] Config loaded from file /tmp/.kube/config
I0526 12:01:28.722930 270 round_trippers.go:264] GET https://192.168.7.60:8443/oapi
I0526 12:01:28.722944 270 round_trippers.go:271] Request Headers:
I0526 12:01:28.722951 270 round_trippers.go:274] Accept: application/json, */*
I0526 12:01:28.722957 270 round_trippers.go:274] User-Agent: oc/v1.1.4 (linux/amd64) openshift/3941102
I0526 12:01:28.722964 270 round_trippers.go:274] Authorization: Bearer jxtjZKCU-3BJG0OhhZvieFfKQw65j2ucisUNNHANGRc
I0526 12:01:28.990112 270 round_trippers.go:289] Response Status: 200 OK in 267 milliseconds
I0526 12:01:28.990134 270 round_trippers.go:292] Response Headers:
I0526 12:01:28.990140 270 round_trippers.go:295] Date: Thu, 26 May 2016 12:01:28 GMT
I0526 12:01:28.990146 270 round_trippers.go:295] Content-Length: 93