Add DPMS functionality to locker; Separate locker time to allow host-specific definitions; Set DMPS features on, but disabled so the locker can use them; Small formatting restructuring
This commit is contained in:
parent
1c587c1c8f
commit
88b9c5b893
29
.xinitrc
29
.xinitrc
|
@ -6,15 +6,13 @@ sysresources=/etc/X11/xinit/.Xresources
|
||||||
sysmodmap=/etc/X11/xinit/.Xmodmap
|
sysmodmap=/etc/X11/xinit/.Xmodmap
|
||||||
|
|
||||||
# merge in defaults and keymaps
|
# merge in defaults and keymaps
|
||||||
|
|
||||||
[ -f $sysresources ] && xrdb -merge $sysresources
|
[ -f $sysresources ] && xrdb -merge $sysresources
|
||||||
[ -f $sysmodmap ] && xmodmap $sysmodmap
|
[ -f $sysmodmap ] && xmodmap $sysmodmap
|
||||||
[ -f "$userresources" ] && xrdb -merge "$userresources"
|
[ -f "$userresources" ] && xrdb -merge "$userresources"
|
||||||
[ -f "$usermodmap" ] && xmodmap "$usermodmap"
|
[ -f "$usermodmap" ] && xmodmap "$usermodmap"
|
||||||
|
|
||||||
|
|
||||||
# start some nice programs
|
# start any default scripts
|
||||||
|
|
||||||
if [ -d /etc/X11/xinit/xinitrc.d ] ; then
|
if [ -d /etc/X11/xinit/xinitrc.d ] ; then
|
||||||
for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
|
for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
|
||||||
[ -x "$f" ] && . "$f"
|
[ -x "$f" ] && . "$f"
|
||||||
|
@ -25,17 +23,29 @@ fi
|
||||||
|
|
||||||
#== Thurstylark additions below ==#
|
#== Thurstylark additions below ==#
|
||||||
|
|
||||||
|
# Default screen locker
|
||||||
|
# Set DPMS timeout to 10 sec, force DPMS off,
|
||||||
|
# lock with i3lock without forking, then when
|
||||||
|
# unlocked, disable DPMS timeout.
|
||||||
|
SCREEN_LOCKER="xset dpms 0 0 10 dpms force off && i3lock --nofork -befc 000000 && xset dmps 0 0 0"
|
||||||
|
# Default screen lock timeout in minutes
|
||||||
|
locktime=30
|
||||||
|
|
||||||
# Start ssh agent
|
# Start ssh agent
|
||||||
eval $(ssh-agent)
|
eval $(ssh-agent)
|
||||||
|
|
||||||
# Automatically lock after 30 minutes using i3lock
|
# If srandrd is installed, start it up
|
||||||
xautolock -time 30 -locker 'i3lock -b -d -c 000000 -e -f' &
|
[ -s /usr/bin/srandrd ] && srandrd ~/.config/srandrd.conf
|
||||||
|
|
||||||
# Thurstybook-specific config:
|
# Thurstybook-specific config:
|
||||||
[ "$(hostname)" == "thurstybook" ] && srandrd ~/.config/srandrd.conf
|
if [ "$(hostname)" == "thurstybook" ]; then
|
||||||
|
true # Add stuff here if I need it
|
||||||
|
fi
|
||||||
|
|
||||||
# dtarchaio-specific config:
|
# dtarchaio-specific config:
|
||||||
if [ "$(hostname)" == "dtarchaio" ]; then
|
if [ "$(hostname)" == "dtarchaio" ]; then
|
||||||
|
# Set screen lock timout to 15 minutes
|
||||||
|
locktime=15
|
||||||
# Set HDMI1 to be right of eDP1
|
# Set HDMI1 to be right of eDP1
|
||||||
xrandr --output eDP1 --auto --output HDMI1 --right-of eDP1
|
xrandr --output eDP1 --auto --output HDMI1 --right-of eDP1
|
||||||
# Set the bell to be different from Matt's
|
# Set the bell to be different from Matt's
|
||||||
|
@ -44,10 +54,15 @@ if [ "$(hostname)" == "dtarchaio" ]; then
|
||||||
xinput --map-to-output $(xinput list --id-only "Advanced Silicon S.A CoolTouch(TM) System") eDP1
|
xinput --map-to-output $(xinput list --id-only "Advanced Silicon S.A CoolTouch(TM) System") eDP1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Automatically lock after $locktime minutes using i3lock
|
||||||
|
xautolock -time $locktime -locker "$SCREEN_LOCKER" -detectsleep &
|
||||||
|
# Set DPMS features on, but disabled
|
||||||
|
xset +dpms dpms 0 0 0
|
||||||
|
|
||||||
# If numlockx is installed, turn numlock on
|
# If numlockx is installed, turn numlock on
|
||||||
[ -s /usr/bin/numlockx ] && numlockx on
|
[ -s /usr/bin/numlockx ] && numlockx on
|
||||||
|
|
||||||
# Set termite up to launch tmux on $mod+Enter in i3
|
# Set st up to launch tmux on $mod+Enter in i3
|
||||||
export TERMINAL=~/.config/i3/launch-st.sh
|
export TERMINAL=~/.config/i3/launch-st.sh
|
||||||
|
|
||||||
# If $1 isn't set, use "i3"
|
# If $1 isn't set, use "i3"
|
||||||
|
|
Loading…
Reference in New Issue