[i3] Fixup a few old starter scripts

This commit is contained in:
Sebastian Schulze 2019-07-16 14:06:50 +02:00
parent ba49b46d56
commit 01f86f08db
Signed by: bascht
GPG Key ID: 5BCB1D3B4D38A35A
3 changed files with 37 additions and 29 deletions

View File

@ -1,34 +1,26 @@
#!/bin/bash
set -e
if xrandr | grep "^DP-2-3-8 connected" > /dev/null; then
if xrandr | grep "^eDP-1 connected"; then
xrandr --output eDP-1 --off
fi
if xrandr | grep "^DP-2-3 connected" > /dev/null; then
if xrandr | grep "^DP-2-2 connected"; then
xrandr --output DP-2-2 --primary --mode 3440x1440 --pos 1440x632 --rotate normal
xrandr --output DP-2-2 --primary --mode 3440x1440 --pos 1200x215 --rotate normal --output DP-2-3 --mode 1920x1200 --pos 0x0 --rotate left --output eDP-1 --off
else
echo "Something went horribly wrong!"
fi
if xrandr | grep "^DP-2-3-8 connected"; then
xrandr --output DP-3-8 --mode 2560x1440 --pos 0x0 --rotate left
fi
sleep 0.2
# sleep 0.2
bspc monitor %DP-2-2 -d work web files graphics
bspc monitor %DP-2-3-8 -d comm docs media dump
bspc monitor %DP-2-3 -d comm docs media dump
elif xrandr | grep "^DP-2-2-8 connected"; then
xrandr --output DP-2-2-8 --primary --mode 2560x1440 --pos 0x0 --rotate normal --output eDP-1 --off --output DP-2-1 --off --output DP-2-2 --off --output DP-2-3 --off
sleep 0.2
bspc monitor %DP-2-2-8 -d work web comm docs media files graphics dump
else
if xrandr | grep "^eDP-1 connected"; then
xrandr --output eDP-1 --primary --mode 1920x1080 --pos 0x0 --rotate normal
fi
if xrandr | grep "^DP-2-1 connected"; then
xrandr --output DP-2-1 --off
fi
if xrandr | grep "^DP-2-2 connected"; then
xrandr --output DP-2-2 --off
fi
if xrandr | grep "^DP-2-2 connected"; then
xrandr --output DP-2-2 --off
fi
if xrandr | grep "^DP-2-3-8 connected"; then
xrandr --output DP-3-8 --off
xrandr --output eDP-1 --primary --mode 1920x1080 --pos 0x0 --rotate normal --output DP-2-1 --off --output DP-2-2 --off --output DP-2-3 --off
fi
sleep 0.2
bspc monitor -d work web comm docs media files graphics dump

View File

@ -8,3 +8,5 @@ xinput set-prop "pointer:ELECOM TrackBall Mouse HUGE TrackBall" 'libinput Button
xinput set-prop "pointer:ELECOM TrackBall Mouse HUGE TrackBall" 'libinput Scroll Method Enabled' 0 0 1
xinput set-prop "pointer:ELECOM TrackBall Mouse HUGE TrackBall" "libinput Accel Profile Enabled" 0 1
xinput set-prop "pointer:ELECOM TrackBall Mouse HUGE TrackBall" "libinput Accel Speed" -0.2
setxkbmap -option caps:super

View File

@ -14,11 +14,25 @@ export WS_LABEL
# Check if we're docked in
export BAR_PA_SINK=$(pactl info |grep -oP "^Default Sink: \K.*")
if [[ $HOSTNAME == "zog"* ]]; then
export BAR_ETH_INTERFACE=eno1
export BAR_MODULES="mpd volume memory eth temperature date"
polybar secondary &
if xrandr |grep "HDMI2 connected" > /dev/null; then
export MONITOR=HDMI2
else
export MONITOR=eDP1
fi;
polybar bascht &
if xrandr | grep "^DP-2-3 connected" > /dev/null; then
export BAR_ETH_INTERFACE=enp0s31f6
export BAR_MODULES="mpd volume memory eth wlan temperature date"
unset MONITOR
MONITOR=DP-2-2 polybar bascht &
MONITOR=DP-2-3 polybar secondary &
elif xrandr | grep "^DP-2-2-8 connected" > /dev/null; then
export BAR_MODULES="mpd volume memory wlan temperature date"
unset MONITOR
MONITOR=DP-2-2-8 polybar bascht &
else
MONITOR=eDP-1 polybar bascht &
fi;