예제 #1
0
#!/usr/bin/python
# -*- coding: utf-8 -*-
import dottools as dt

dt.cmd('git config --global user.name "Jean Disset"')
dt.cmd('git config --global user.email "*****@*****.**"')
dt.cmd('git config --global push.default matching')
dt.cmd('git config --global alias.st "status"')
dt.cmd('git config --global alias.co "checkout"')
dt.cmd('git config --global alias.lg "log - -color - -graph - -pretty=format: \'% Cred % h % Creset - %C(yellow) % d % Creset % s % Cgreen( % cr) % C(bold blue) < %an > %Creset\' --abbrev-commit"')
예제 #2
0
#!/usr/bin/python
# -*- coding: utf-8 -*-
import dottools as dt
print dt.colors.HEADER, '------ Going to install zsh + oh my zsh + tmux------', dt.colors.ENDC
dt.cmd('apt-get install zsh tmux stow')
with dt.cd('~/'):
    dt.cmd('sh -c "$(wget https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"')
profile = open("~/.profile", "a+")
lastline = profile.readlines()[-1]
if lasline != "zsh":
    profile.write("zsh")
dt.cmd('stow zsh')
dt.cmd('stow tmux')
예제 #3
0
#!/usr/bin/python
# -*- coding: utf-8 -*-
import dottools as dt

print dt.colors.HEADER, '------ Going to install neovim ------', dt.colors.ENDC
dt.cmd('apt-get install -y libtool autoconf automake cmake libncurses5-dev g++ pkg-config stow')
if dt.queryYN("Download & compile neovim?"):
    print 'Downloading neovim'
    dt.cmd('rm master.zip*')
    dt.cmd('wget https://github.com/neovim/neovim/archive/master.zip')
    stdout.write('Unziping')
    dt.cmd('unzip master.zip')
    print 'compiling...'
    with dt.cd('neovim-master'):
        dt.cmd('make - j')
        dt.cmd('cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr/')
        dt.cmd('make install')
    stdout.write('Cleanup & alternatives setup')
    dt.cmd('rm -rf neovim-master')
    dt.cmd('update-alternatives --install /usr/bin/vi vi /usr/bin/nvim 60')
    dt.cmd('update-alternatives --config vi')
    dt.cmd('update-alternatives --install /usr/bin/vim vim /usr/bin/nvim 60')
    dt.cmd('update-alternatives --config vim')
    dt.cmd('update-alternatives --install /usr/bin/editor editor /usr/bin/nvim 60')
    dt.cmd('update-alternatives --config editor')
if dt.queryYN("Install neovim plugins dependencies?"):
    dt.cmd('apt-get install python-dev python-pip python3-dev python3-pip')
    dt.cmd('pip install autopep8')
    dt.cmd('pip install neovim')
dt.cmd('stow nvim')