From 01f86f08db0ea60ef7b70285c9ae41168861f05c Mon Sep 17 00:00:00 2001 From: Sebastian Schulze Date: Tue, 16 Jul 2019 14:06:50 +0200 Subject: [PATCH] [i3] Fixup a few old starter scripts --- home/bin/i3-displayconfig | 38 +++++++++++++++----------------------- home/bin/i3-inputconfig | 2 ++ home/bin/i3-polybar | 26 ++++++++++++++++++++------ 3 files changed, 37 insertions(+), 29 deletions(-) diff --git a/home/bin/i3-displayconfig b/home/bin/i3-displayconfig index 208d873..5e00dca 100755 --- a/home/bin/i3-displayconfig +++ b/home/bin/i3-displayconfig @@ -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 diff --git a/home/bin/i3-inputconfig b/home/bin/i3-inputconfig index b627ce3..7998ad8 100755 --- a/home/bin/i3-inputconfig +++ b/home/bin/i3-inputconfig @@ -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 diff --git a/home/bin/i3-polybar b/home/bin/i3-polybar index 5a5c345..c7aea61 100755 --- a/home/bin/i3-polybar +++ b/home/bin/i3-polybar @@ -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; + +