more updates
This commit is contained in:
parent
5dd0007c04
commit
1abf6914e9
12
scripts/disp
12
scripts/disp
|
@ -4,6 +4,16 @@ exists() {
|
|||
xrandr | grep ' connected' | grep "${1}" | wc -l
|
||||
}
|
||||
|
||||
# commands
|
||||
|
||||
[ "$1" = "big" ] && \
|
||||
xrandr --output LVDS1 --off && \
|
||||
exit 0 || exit 1
|
||||
|
||||
[ "$1" = "small" ] && \
|
||||
xrandr --output HDMI2 --off && \
|
||||
exit 0 || exit 1
|
||||
|
||||
# usual setup: thinkpad x220 on dock connected to external
|
||||
# monitor
|
||||
|
||||
|
@ -23,7 +33,7 @@ exists() {
|
|||
|
||||
[ $(exists "HDMI2") -eq 0 ] && \
|
||||
[ $(exists "LVDS1") -gt 0 ] && \
|
||||
xrandr --output LVDS1 --auto && \
|
||||
xrandr --output HDMI2 --off && \
|
||||
exit 0 || exit 1
|
||||
|
||||
exit 1
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
#!/bin/sh
|
||||
|
||||
WALLDIR="${HOME}/.share/wallpapers"
|
||||
TEEFILE="${WALLDIR}/hist"
|
||||
BASECMD="feh --bg-fill"
|
||||
|
||||
generate_wall () {
|
||||
GENWALL=$( \
|
||||
ls $WALLDIR | \
|
||||
grep "." | \
|
||||
shuf -n 1
|
||||
)
|
||||
GENWALL="${WALLDIR}/${GENWALL}"
|
||||
|
@ -30,7 +32,7 @@ if check "xrandr"; then
|
|||
for i in $(seq 1 $displays); do
|
||||
wall ${tmp}
|
||||
tmp=${GENWALL}
|
||||
echo ${GENWALL} ${i}
|
||||
echo ${GENWALL} ${i} | tee $TEEFILE
|
||||
cmd="${cmd} ${GENWALL}"
|
||||
done
|
||||
eval ${BASECMD} ${cmd}
|
||||
|
|
Loading…
Reference in New Issue