Monitor switching

This commit is contained in:
Simon Vieille 2015-05-12 16:00:07 +02:00
父節點 45734badcb
當前提交 1b348f1b60
共有 2 個檔案被更改,包括 2 行新增2 行删除

查看文件

@ -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,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)