예제 #1
0
#!/bin/python
import os, sys
from libinstall import PackageInstaller, FileInstaller
dir = os.path.dirname(__file__)

PackageInstaller.try_install('mpd')
PackageInstaller.try_install('mpc')

FileInstaller.create_symlink(os.path.join(dir, 'config'), '~/.config/mpd')
FileInstaller.create_dir('~/.config/mpd/playlists')
for file in ['database', 'log', 'pid', 'state', 'sticker.sql']:
    FileInstaller.create_file('~/.config/mpd/' + file)
예제 #2
0
#!/bin/python
import os
from libinstall import FileInstaller, PackageInstaller
dir = os.path.dirname(__file__)

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()
PackageInstaller.try_install(choice)

for folder in ['undo', 'backup', 'swap', 'spell']:
    FileInstaller.create_dir('~/.vim/' + folder)

FileInstaller.create_symlink(os.path.join(dir, 'spell/pl.utf-8.add'),
                             '~/.vim/spell/')
FileInstaller.create_symlink(os.path.join(dir, 'spell/en.utf-8.add'),
                             '~/.vim/spell/')
FileInstaller.create_symlink(os.path.join(dir, 'vundle'), '~/.vim/vundle')
FileInstaller.create_symlink(os.path.join(dir, '.vimrc'), '~/')

if FileInstaller.has_executable('devenv'):
    FileInstaller.copy_file(os.path.join(dir, '.vimrc'), '~/.vsvimrc')
예제 #3
0
#!/bin/python
import os
from libinstall import FileInstaller, PackageInstaller
dir = os.path.dirname(__file__)

if not FileInstaller.has_executable('vifm'):
    PackageInstaller.try_install('vifm')
FileInstaller.create_dir('~/.config/vifm')
FileInstaller.create_symlink(os.path.join(dir, 'vifmrc'),
                             '~/.config/vifm/vifmrc')
FileInstaller.create_symlink(os.path.join(dir, 'colors'),
                             '~/.config/vifm/colors')
예제 #4
0
#!/bin/python
import os
from libinstall import FileInstaller, PackageInstaller
dir = os.path.dirname(__file__)

if not FileInstaller.has_executable('vifm'):
    PackageInstaller.try_install('vifm')
FileInstaller.create_dir('~/.config/vifm')
FileInstaller.create_symlink(os.path.join(dir, 'vifmrc'), '~/.config/vifm/vifmrc')
FileInstaller.create_symlink(os.path.join(dir, 'colors'), '~/.config/vifm/colors')
예제 #5
0
#!/bin/python
import os, glob
from libinstall import FileInstaller, PackageInstaller, run_verbose

dir = os.path.dirname(__file__)

PackageInstaller.try_install('xorg-font-utils')
PackageInstaller.try_install('ttf-dejavu')
PackageInstaller.try_install('ttf-symbola')
PackageInstaller.try_install('ttf-font-awesome')
PackageInstaller.try_install('ttf-ipa-mona')

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

    FileInstaller.create_dir(fonts_dir)
    for font_path in glob.glob(os.path.join(dir, '*.ttf')):
        FileInstaller.create_symlink(font_path, fonts_dir + '/')

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

if FileInstaller.has_executable('fc-cache'):
    FileInstaller.create_symlink(os.path.join(dir, 'fonts.conf'),
                                 '~/.config/fontconfig/')
    run_verbose(['fc-cache'])
예제 #6
0
#!/bin/python
import os
from libinstall import FileInstaller, PackageInstaller
dir = os.path.dirname(__file__)

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()
PackageInstaller.try_install(choice)

for folder in ['undo', 'backup', 'swap', 'spell']:
    FileInstaller.create_dir('~/.vim/' + folder)

FileInstaller.create_symlink(os.path.join(dir, 'spell/pl.utf-8.add'), '~/.vim/spell/')
FileInstaller.create_symlink(os.path.join(dir, 'spell/en.utf-8.add'), '~/.vim/spell/')
FileInstaller.create_symlink(os.path.join(dir, 'vundle'), '~/.vim/vundle')
FileInstaller.create_symlink(os.path.join(dir, '.vimrc'), '~/')

if FileInstaller.has_executable('devenv'):
    FileInstaller.copy_file(os.path.join(dir, '.vimrc'), '~/.vsvimrc')