Now uses CapsLock to avoid blanking screen on fs
This commit is contained in:
parent
760c53b472
commit
7959ca01ba
1
.mkshrc
1
.mkshrc
|
@ -18,6 +18,7 @@ export ANDROID_MOUNTPOINT="$HOME/Android"
|
|||
export BRIGHTNESS="0.9"
|
||||
export SUDO_ASKPASS="/usr/bin/x11-ssh-askpass"
|
||||
export TRASH="$HOME/.local/trash"
|
||||
export DEVICES_FOLDER="/media"
|
||||
|
||||
# custom prompt see http://comments.gmane.org/gmane.os.miros.mksh/126
|
||||
# USER
|
||||
|
|
1
.profile
1
.profile
|
@ -19,3 +19,4 @@ export ANDROID_MOUNTPOINT="$HOME/Android"
|
|||
export BRIGHTNESS="0.9"
|
||||
export SUDO_ASKPASS="/usr/bin/x11-ssh-askpass"
|
||||
export TRASH="$HOME/.local/trash"
|
||||
export DEVICES_FOLDER="/media"
|
||||
|
|
4
.xinitrc
4
.xinitrc
|
@ -4,9 +4,9 @@ mksh $SCRIPTS/set-random-wallpaper.sh &
|
|||
redshift &
|
||||
workrave &
|
||||
unclutter --jitter 100 -b
|
||||
mksh $TSCRIPTS/brightness.sh
|
||||
# mksh $TSCRIPTS/brightness.sh
|
||||
xscreensaver -no-splash &
|
||||
mksh $SCRIPTS/xscreensaverstopper.sh &
|
||||
mksh $SCRIPTS/xscreensaverstopper.sh > $HOME/xscreensaverstopper.log 2>&1 &
|
||||
setxkbmap gb
|
||||
|
||||
# RUN WM
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# XScreenSaver Preferences File
|
||||
# Written by xscreensaver-demo 5.42 for initega on Mon Jul 8 14:01:31 2019.
|
||||
# Written by xscreensaver-demo 5.42 for initega on Thu Jul 25 16:07:00 2019.
|
||||
# https://www.jwz.org/xscreensaver/
|
||||
|
||||
timeout: 0:05:00
|
||||
|
|
1
.zshrc
1
.zshrc
|
@ -100,6 +100,7 @@ export ANDROID_MOUNTPOINT="$HOME/Android"
|
|||
export BRIGHTNESS="0.9"
|
||||
export SUDO_ASKPASS="/usr/bin/x11-ssh-askpass"
|
||||
export TRASH="$HOME/.local/trash"
|
||||
export DEVICES_FOLDER="/media"
|
||||
|
||||
#
|
||||
# ALIASES
|
||||
|
|
|
@ -0,0 +1,56 @@
|
|||
#!/bin/sh
|
||||
# xscreensaverstopper.sh
|
||||
|
||||
# This script is licensed under GNU GPL version 2.0 or above
|
||||
|
||||
# Uses elements from lightsOn.sh
|
||||
# Copyright (c) 2011 iye.cba at gmail com
|
||||
# url: https://github.com/iye/lightsOn
|
||||
# This script is licensed under GNU GPL version 2.0 or above
|
||||
|
||||
# Description: Restarts xscreensaver's idle countdown while
|
||||
# full screen applications are running.
|
||||
# Checks every 30 seconds to see if a full screen application
|
||||
# has focus, if so then the xscreensaver is told to restart
|
||||
# its idle countdown.
|
||||
|
||||
|
||||
# enumerate all the attached screens
|
||||
tmp_file="/tmp/xscreensaverstopper$(date +%s)"
|
||||
xvinfo | sed -n 's/^screen #\([0-9]\+\)$/\1/p' > $tmp_file
|
||||
displays=""
|
||||
while read id
|
||||
do
|
||||
displays="$displays $id"
|
||||
done< $tmp_file
|
||||
|
||||
checkFullscreen()
|
||||
{
|
||||
|
||||
# loop through every display looking for a fullscreen window
|
||||
for display in $displays
|
||||
do
|
||||
#get id of active window and clean output
|
||||
activ_win_id=`DISPLAY=:0.${display} xprop -root _NET_ACTIVE_WINDOW | \
|
||||
cut -c 41-49`
|
||||
# activ_win_id="$(echo "$activ_win_id" | cut -c 41-49 )"
|
||||
|
||||
# Check if Active Window (the foremost window) is in fullscreen state
|
||||
isActivWinFullscreen=`DISPLAY=:0.${display} xprop -id $activ_win_id | \
|
||||
grep _NET_WM_STATE_FULLSCREEN`
|
||||
if [ -n "$isActivWinFullscreen" -a -z "${isActivWinFullscreen##*NET_WM_STATE_FULLSCREEN*}" ]; then
|
||||
# xscreensaver-command -deactivate
|
||||
# xscreensaver-command -exit
|
||||
# xscreensaver-command -restart
|
||||
xdotool key Caps_Lock && xdotool key Caps_Lock
|
||||
# else
|
||||
# xscreensaver -no-splash &
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
while sleep $(( 30 )); do
|
||||
checkFullscreen
|
||||
done
|
||||
|
||||
exit 0
|
Loading…
Reference in New Issue