Browse Source

Monitor switching

master
Simon Vieille 4 years ago
parent
commit
1b348f1b60
2 changed files with 2 additions and 2 deletions
  1. 1
    1
      i3_switch_monitor.sh
  2. 1
    1
      i3_switch_monitor_wrapper.sh

+ 1
- 1
i3_switch_monitor.sh View File

@@ -11,7 +11,7 @@ getMouseX() {
getMouveNextX() {
if [ $(getMouseX) -lt $MONITOR1_WIDTH ]; then
echo $(($MONITOR1_WIDTH + $MONITOR2_WIDTH / 2 - 10))
elif [ $(getMouseX) -lt $(($MONITOR1_WIDTH + $MONITOR2_WIDTH)) ]; then
elif [ -n "$MONITOR3_WIDTH" -a $(getMouseX) -lt $(($MONITOR1_WIDTH + $MONITOR2_WIDTH)) ]; then
echo $(($MONITOR1_WIDTH + $MONITOR2_WIDTH + $MONITOR3_WIDTH / 2 - 10))
else
echo $((MONITOR1_WIDTH / 2 - 10))

+ 1
- 1
i3_switch_monitor_wrapper.sh View File

@@ -1,3 +1,3 @@
#!/bin/sh

exec ~/bin/i3_switch_monitor.sh 1920 1920 1024
exec ~/bin/i3_switch_monitor.sh $(xrandr | grep ' connected' | sed 's/ primary//' | awk '{print $3}' | cut -dx -f1)

Loading…
Cancel
Save