Exemple #1
0
def run():
    util.create_symlink('./locale.conf', '~/.config/')
    for lang in ['en_US', 'pl_PL', 'ja_JP']:
        util.run_verbose([
            'sudo', 'sh', '-c',
            'sed -i "s/#%s.UTF-8/%s.UTF-8/" /etc/locale.gen' % (lang, lang)])
    util.run_verbose(['sudo', 'locale-gen'])
Exemple #2
0
def run():
    packages.try_install('xorg-font-utils')
    packages.try_install('otf-ipafont')
    packages.try_install('ttf-dejavu')
    packages.try_install('ttf-symbola')
    packages.try_install('ttf-font-awesome')
    packages.try_install('ttf-monapo')

    if os.path.exists('/usr/share/fonts'):
        fonts_dir = '~/.local/share/fonts/'

        util.create_dir(fonts_dir)
        for font_path in util.find('./*.ttf'):
            util.create_symlink(font_path, fonts_dir)

        if util.has_executable('mkfontscale'):
            util.run_verbose(['mkfontscale', util.expand_path(fonts_dir)])
        if util.has_executable('mkfontdir'):
            util.run_verbose(['mkfontdir', util.expand_path(fonts_dir)])
        if util.has_executable('xset'):
            util.run_verbose(['xset', '+fp', util.expand_path(fonts_dir)])
            util.run_verbose(['xset', 'fp', 'rehash'])

    if util.has_executable('fc-cache'):
        util.create_symlink('./fonts.conf', '~/.config/fontconfig/')
        util.run_verbose(['fc-cache'])
Exemple #3
0
def run():
    spell_dir = '~/.config/nvim/spell/'
    packages.try_install('neovim-git')

    for name in ['undo', 'backup', 'swap', 'spell']:
        util.create_dir('~/.config/nvim/' + name)

    for path in util.find('./*.vim'):
        util.create_symlink(path, '~/.config/nvim/')
    util.create_symlink('./spell/pl.utf-8.add', spell_dir)
    util.create_symlink('./spell/en.utf-8.add', spell_dir)
    util.download(
        'ftp://ftp.vim.org/pub/vim/runtime/spell/en.utf-8.spl',
        '~/.config/nvim/spell/')
    util.download(
        'ftp://ftp.vim.org/pub/vim/runtime/spell/pl.utf-8.spl',
        '~/.config/nvim/spell/')
    util.download(
        'https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim',
        '~/.config/nvim/autoload/plug.vim')
    util.create_file(
        '~/.config/zsh/editor.sh',
        'export EDITOR=nvim;alias vim=nvim',
        overwrite=True)

    commands = ['PlugInstall']
    for path in util.find(spell_dir):
        if 'add' in path and 'spl' not in path:
            commands.append('mkspell! ' + path)
    util.run_verbose(['nvim'] + sum([['-c', cmd] for cmd in commands], []))
Exemple #4
0
def run():
    packages.try_install('zsh')
    util.create_symlink('./zshrc', '~/.zshrc')
    util.create_symlink('./zprofile', '~/.zprofile')
    util.create_symlink('./zshenv', '~/.zshenv')
    util.create_dir('~/.config/zsh')

    util.run_verbose(['lesskey', '-o', expanduser('~/.less'), '--', './lesskey'])
Exemple #5
0
def run():
    if 'cygwin' in sys.platform:
        packages.try_install('ssh')
    else:
        packages.try_install('openssh')

    util.create_symlink('./ssh', '~/.ssh')
    util.run_verbose(['chmod', '0600', util.abs_path('~/.ssh/config')])
Exemple #6
0
 def install(self, package):
     command = [
         self.executable,
         "install",
         "--user",
         package,
     ]
     return util.run_verbose(command)
Exemple #7
0
def run():
    os.chdir('/tmp')
    util.run_verbose(['git', 'clone', 'https://aur.archlinux.org/cower.git'])
    os.chdir('/tmp/cower')
    util.run_verbose(['makepkg', '-i', '--skippgpcheck'])

    packages.install('expac', method='pacman')

    os.chdir('/tmp')
    util.run_verbose(['git', 'clone', 'https://aur.archlinux.org/pacaur.git'])
    os.chdir('/tmp/pacaur')
    util.run_verbose(['makepkg', '-i', '--skippgpcheck'])
Exemple #8
0
def run():
    spell_dir = '~/.config/vim/spell/'

    choices = [
        'vim',
        'gvim',  # gvim supports for X11 clipboard, but has more dependencies
    ]
    choice = None
    while choice not in choices:
        choice = input('Which package to install? (%s) ' % choices).lower()
    packages.try_install(choice)
    packages.try_install('fzf')

    for name in ['undo', 'backup', 'swap', 'spell', 'autoload']:
        util.create_dir('~/.config/vim/' + name)

    for path in util.find('./../nvim/*.vim'):
        util.create_symlink(path, '~/.config/vim/')
    util.create_symlink('./../nvim/spell/pl.utf-8.add', spell_dir)
    util.create_symlink('./../nvim/spell/en.utf-8.add', spell_dir)
    util.download(
        'ftp://ftp.vim.org/pub/vim/runtime/spell/en.utf-8.spl',
        '~/.config/vim/spell/')
    util.download(
        'ftp://ftp.vim.org/pub/vim/runtime/spell/pl.utf-8.spl',
        '~/.config/vim/spell/')
    util.download(
        'https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim',
        '~/.config/vim/autoload/plug.vim')
    util.create_file(
        '~/.config/zsh/editor.sh', 'export EDITOR=vim', overwrite=True)
    util.create_symlink('~/.config/vim/', '~/.vim')
    util.create_symlink('~/.config/vim/init.vim', '~/.vimrc')

    commands = ['PlugInstall']
    for path in util.find(spell_dir):
        if 'add' in path and 'spl' not in path:
            commands.append('mkspell! ' + path)
    util.run_verbose(['vim'] + sum([['-c', cmd] for cmd in commands], []))
Exemple #9
0
 def install(self, package):
     command = [
         self.executable, 'install', '--cache-dir', self.cache_dir, package]
     if self.use_sudo:
         command = ['sudo', '-S'] + command
     return util.run_verbose(command)
Exemple #10
0
 def install(self, package):
     return util.run_verbose(['yaourt', '-S', package])
Exemple #11
0
 def install(self, package):
     return util.run_verbose(['sudo', '-S', 'pacman', '-S', package])
Exemple #12
0
 def install(self, package):
     return util.run_verbose(['apt-cyg', 'install', package])
Exemple #13
0
 def install(self, package):
     return util.run_verbose(
         ["pacaur", "-S", package, "--noconfirm", "--noedit"]
     )
Exemple #14
0
 def install(self, package):
     return util.run_verbose(["sudo", "-S", "pacman", "-S", package])
Exemple #15
0
 def install(self, package):
     return util.run_verbose(["apt-cyg", "install", package])
Exemple #16
0
def run():
    packages.try_install('xterm')

    util.create_symlink('./Xresources', '~/.config/Xresources')
    util.run_verbose(['xrdb', '-override', expanduser('~/.config/Xresources')])
Exemple #17
0
def run():
    util.create_symlink('./panel', '~/.local/bin/')
    util.run_verbose(['sudo', 'pip', 'install', '-r', 'panel/requirements.txt'])
Exemple #18
0
def run():
    util.create_symlink('./launcher.json', '~/.config/launcher.json')
    os.chdir(util.root_dir / 'opt' / 'launcher')
    util.run_verbose(['pip', 'install', '--user', '--upgrade', '.'])