From 89a14170c0b5f401a1da987999e065333a217ebc Mon Sep 17 00:00:00 2001 From: Quentin Duchemin Date: Mon, 14 Jan 2019 15:44:04 +0100 Subject: [PATCH] Add external screen to laptop Also switch to nvidia driver + Bumblebee to nouveau with PRIME. Too annoying to use external screen otherwise --- .config/i3/config.laptop | 3 ++- .config/polybar/scripts/launch_polybar.sh.laptop | 12 +++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.config/i3/config.laptop b/.config/i3/config.laptop index 47fee37..f3cc8f5 100644 --- a/.config/i3/config.laptop +++ b/.config/i3/config.laptop @@ -171,10 +171,11 @@ smart_gaps on # Set mouse acceleration exec_always --no-startup-id xinput set-prop 'FocalTechPS/2 FocalTech Touchpad' 'libinput Accel Speed' 0.8 +exec_always --no-startup-id xinput set-prop 'Microsoft Microsoft 3-Button Mouse with IntelliEye(TM)' 'libinput Accel Speed' 0.8 # ALSA key binding (media keys do not even have keycode...) bindsym XF86AudioRaiseVolume exec --no-startup-id amixer -D hw:PCH -M sset Master 5%+ -bindsym XF86AudioLowerVolume exec --no-startup-id amixer -D hw:PCH -M sset Master 5%- +bindsym XF86AudioLowerVolume exec --no-startup-id aimxer -D hw:PCH -M sset Master 5%- bindsym XF86AudioMute exec --no-startup-id amixer -D hw:PCH -M sset 'Master' toggle bindsym XF86AudioPlay exec --no-startup-id playerctl play-pause bindsym XF86AudioPrev exec --no-startup-ip playerctl prev diff --git a/.config/polybar/scripts/launch_polybar.sh.laptop b/.config/polybar/scripts/launch_polybar.sh.laptop index a315569..71eed83 100755 --- a/.config/polybar/scripts/launch_polybar.sh.laptop +++ b/.config/polybar/scripts/launch_polybar.sh.laptop @@ -4,11 +4,13 @@ names=("chostybottombar" "chostytopbar") killall -q polybar while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done if type "xrandr"; then - monitors=$(xrandr --query | grep " connected" | cut -d" " -f1) - monarray=($monitors) + monitors=$(xrandr --query | grep " connected" | cut -d" " -f1) + monarray=($monitors) for name in ${names[@]}; do - MONITOR=${monarray[0]} polybar -q --reload ${name} & - done + for mon in ${monarray[@]}; do + MONITOR=${mon} polybar -q --reload ${name} & + done + done else - polybar --reload ${name} & + polybar --reload ${name} & fi \ No newline at end of file