[bin] Add scripts for monitor and input detection
This commit is contained in:
parent
6e0f836d5d
commit
4672e710c8
|
@ -0,0 +1,40 @@
|
|||
#!/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-2 connected"; then
|
||||
xrandr --output DP-2-2 --primary --mode 3440x1440 --pos 1440x632 --rotate normal
|
||||
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
|
||||
bspc monitor %DP-2-2 -d work web files graphics
|
||||
bspc monitor %DP-2-3-8 -d comm docs media 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
|
||||
fi
|
||||
sleep 0.2
|
||||
bspc monitor -d work web comm docs media files graphics dump
|
||||
|
||||
|
||||
fi
|
||||
|
||||
~/bin/i3-polybar &
|
||||
feh --randomize --bg-fill ~/Pictures/Wallpapers/
|
|
@ -0,0 +1,10 @@
|
|||
#!/bin/bash
|
||||
|
||||
xinput set-prop $(xinput |grep -oP "TouchPad.*id=\K[0-9]+") "libinput Natural Scrolling Enabled" 1
|
||||
xinput set-prop "pointer:Synaptics TM3381-002" "libinput Natural Scrolling Enabled" 1
|
||||
xinput set-prop $(xinput |grep -oP "HUGE.*id=\K[0-9]+"|head -n 1) "libinput Natural Scrolling Enabled" 1
|
||||
xinput set-button-map $(xinput |grep -oP "HUGE.*id=\K[0-9]+"|head -n 1) 1 10 3 4 5 6 7 8 9 2 11 12
|
||||
xinput set-prop "pointer:ELECOM TrackBall Mouse HUGE TrackBall" 'libinput Button Scrolling Button' 12
|
||||
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
|
Loading…
Reference in New Issue