From e8bb43c01ea8529af8d1bb30d21f8caff220ccaa Mon Sep 17 00:00:00 2001 From: Austen Adler Date: Sun, 26 Oct 2014 10:35:33 -0400 Subject: [PATCH] Removed screenrc. Added xinerama.sh for multiple monitor over vnc. Greatly improved sync.sh on Mac and Linux --- scripts/sync.sh | 33 ++++++++++++++++++--------------- shells/screenrc | 1 - xinerama.sh | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 67 insertions(+), 16 deletions(-) delete mode 100644 shells/screenrc create mode 100644 xinerama.sh diff --git a/scripts/sync.sh b/scripts/sync.sh index 8aaa950..53f0ac1 100755 --- a/scripts/sync.sh +++ b/scripts/sync.sh @@ -51,42 +51,45 @@ while getopts ":hbsdclw" VALUE "$@"; do if [ "$VALUE" = "c" ] ; then echo "Syncing config files" if which trash >/dev/null; then - trash ~/.gitconfig ~/.vimrc ~/.vimperatorrc ~/.vimperator/colors/vimPgray.vimp ~/.vimperator/info/sync/quickmarks ~/.bashrc ~/.pylintrc ~/.zshrc ~/.i3/config ~/.i3/sleep.sh ~/.i3/wall.sh ~/.Xmodmap ~/.xsession ~/.screenrc ~/.Xresources ~/.tmux.conf + trash ~/.gitconfig ~/.vimrc ~/.vimperatorrc ~/.vimperator/colors/vimPgray.vimp ~/.bashrc ~/.pylintrc ~/.zshrc ~/.tmux.conf else - rm ~/.gitconfig ~/.vimrc ~/.vimperatorrc ~/.vimperator/colors/vimPgray.vimp ~/.vimperator/info/sync/quickmarks ~/.bashrc ~/.pylintrc ~/.zshrc ~/.i3/config ~/.i3/sleep.sh ~/.i3/wall.sh ~/.Xmodmap ~/.xsession ~/.screenrc ~/.Xresources ~/.tmux.conf + rm ~/.gitconfig ~/.vimrc ~/.vimperatorrc ~/.vimperator/colors/vimPgray.vimp ~/.bashrc ~/.pylintrc ~/.zshrc ~/.tmux.conf fi + # Install on all systems ln -s $ABSPATH/tmux/tmux.conf ~/.tmux.conf ln -s $ABSPATH/python/pylintrc ~/.pylintrc ln -s $ABSPATH/vim/vimrc ~/.vimrc ln -s $ABSPATH/vimperator/vimperatorrc ~/.vimperatorrc mkdir -p ~/.vimperator/colors ln -s $ABSPATH/vimperator/vimPgray.vimp ~/.vimperator/colors/vimPgray.vimp - mkdir -p ~/.vimperator/info/sync/quickmarks - ln -s $ABSPATH/vimperator/quickmarks ~/.vimperator/info/sync/quickmarks ln -s $ABSPATH/git/gitconfig ~/.gitconfig ln -s $ABSPATH/shells/bashrc ~/.bashrc - if [ ! -f ~/.oh-my-zsh/oh-my-zsh.sh ] ; then - curl -L http://install.ohmyz.sh | sh - fi if [ ! -d ~/.fzf ] ; then git clone https://github.com/junegunn/fzf.git ~/.fzf ~/.fzf/install fi + ln -s $ABSPATH/shells/zshrc ~/.zshrc if [ ! -d ~/.antigen ] ; then git clone https://github.com/zsh-users/antigen ~/.antigen fi - ln -s $ABSPATH/shells/zshrc ~/.zshrc - ln -s $ABSPATH/shells/screenrc ~/.screenrc + # Install antigen bundles + zsh -c "source ~/.zshrc;exit" if [ "$(uname)" != "Darwin" ]; then + if which trash >/dev/null; then + trash ~/.i3/config ~/.i3/sleep.sh ~/.i3/wall.sh ~/.Xmodmap ~/.xsession ~/.Xresources + else + rm ~/.i3/config ~/.i3/sleep.sh ~/.i3/wall.sh ~/.Xmodmap ~/.xsession ~/.Xresources + fi + # Don't install on Mac ln -s $ABSPATH/shells/Xresources ~/.Xresources xrdb -merge ~/.Xresources + ln -s $ABSPATH/i3/config ~/.i3/config + ln -s $ABSPATH/i3/wall.sh ~/.i3/wall.sh + ln -s $ABSPATH/i3/sleep.sh ~/.i3/sleep.sh + ln -s $ABSPATH/i3/Xmodmap ~/.Xmodmap + ln -s $ABSPATH/i3/xsession ~/.xsession + mkdir -p ~/.i3 fi - mkdir -p ~/.i3 - ln -s $ABSPATH/i3/config ~/.i3/config - ln -s $ABSPATH/i3/wall.sh ~/.i3/wall.sh - ln -s $ABSPATH/i3/sleep.sh ~/.i3/sleep.sh - ln -s $ABSPATH/i3/Xmodmap ~/.Xmodmap - ln -s $ABSPATH/i3/xsession ~/.xsession fi if [ "$VALUE" = "l" ] ; then echo "Linking standard directories..." diff --git a/shells/screenrc b/shells/screenrc deleted file mode 100644 index 3337674..0000000 --- a/shells/screenrc +++ /dev/null @@ -1 +0,0 @@ -startup_message off diff --git a/xinerama.sh b/xinerama.sh new file mode 100644 index 0000000..90a85b3 --- /dev/null +++ b/xinerama.sh @@ -0,0 +1,49 @@ +#3 monitors +x11vnc -clip 1280x800+640+0 -xrandr -forever +x11vnc -clip 1280x800+1920+0 -xrandr -forever +x11vnc -clip 1366x768+3840+800 -xrandr -forever + +xrandr --newmode "1280x800_60.00" 83.50 1280 1352 1480 1680 800 803 809 831 -hsync +vsync +xrandr --newmode "1368x768_60.00" 85.25 1368 1440 1576 1784 768 771 781 798 -hsync +vsync + +xrandr --addmode VIRTUAL1 1280x800_60.00 +xrandr --addmode VIRTUAL2 1280x800_60.00 +xrandr --addmode VIRTUAL3 1368x768_60.00 + +xrandr --output VIRTUAL1 --mode 1280x800_60.00 --above HDMI3 +xrandr --output VIRTUAL3 --mode 1368x768_60.00 --right-of HDMI1 +xrandr --output VIRTUAL2 --mode 1280x800_60.00 --above HDMI1 +xrandr --output VIRTUAL1 --pos 640x0 +xrandr --output VIRTUAL3 --pos 3840x800 + +export DISPLAY=:0.0&&xtightvncviewer 10.0.1.201:0 -fullscreen +while true; do xset dpms force on;sleep 601;done +xset dpms 0 0 0 + +xrandr --output VIRTUAL1 --off +xrandr --output VIRTUAL2 --off +xrandr --output VIRTUAL3 --off + + +#2 monitors + + +x11vnc -clip 1280x800+640+0 -xrandr -forever +x11vnc -clip 1280x800+1920+0 -xrandr -forever + +xrandr --newmode "1280x800_60.00" 83.50 1280 1352 1480 1680 800 803 809 831 -hsync +vsync + +xrandr --addmode VIRTUAL1 1280x800_60.00 +xrandr --addmode VIRTUAL2 1280x800_60.00 + +xrandr --output VIRTUAL1 --mode 1280x800_60.00 --above HDMI3 +xrandr --output VIRTUAL2 --mode 1280x800_60.00 --above HDMI1 +xrandr --output VIRTUAL1 --pos 640x0 + +export DISPLAY=:0.0&&xtightvncviewer 10.0.1.201:0 -fullscreen +while true; do xset dpms force on;sleep 601;done +xset dpms 0 0 0 + +xrandr --output VIRTUAL1 --off +xrandr --output VIRTUAL2 --off +xrandr --output VIRTUAL3 --off