コード例 #1
0
#!/bin/python
import os, sys
from libinstall import PackageInstaller, FileInstaller, run_verbose
dir = os.path.dirname(__file__)

PackageInstaller.try_install('wget')
PackageInstaller.try_install('curl')
if 'cygwin' in sys.platform:
    PackageInstaller.try_install('ssh')
else:
    PackageInstaller.try_install('openssh')

FileInstaller.create_symlink(os.path.join(dir, '.ssh'), '~/')

run_verbose(['chmod', '0600', os.path.expanduser('~/.ssh/config')])
コード例 #2
0
#!/bin/python
import os
from libinstall import FileInstaller, PackageInstaller
dir = os.path.dirname(__file__)

PackageInstaller.try_install('luajit')
PackageInstaller.try_install('mpv-git')
FileInstaller.create_symlink(os.path.join(dir, 'config'), '~/.config/mpv')
コード例 #3
0
ファイル: __main__.py プロジェクト: mard/dotfiles
#!/bin/python
import os
from libinstall import FileInstaller, PackageInstaller, run_verbose
dir = os.path.dirname(__file__)

PackageInstaller.try_install('rxvt-unicode-pixbuf')
PackageInstaller.try_install('xorg-fonts-misc')

FileInstaller.create_symlink(os.path.join(dir, 'rxvt-unicode'), '~/.Xresources.d/rxvt-unicode')
run_verbose(['xrdb', '-merge', os.path.expanduser('~/.Xresources.d/rxvt-unicode')])
コード例 #4
0
ファイル: __main__.py プロジェクト: darvelo/rr-dotfiles
#!/usr/bin/python
import os
from libinstall import FileInstaller, PackageInstaller

dir = os.path.dirname(__file__)

PackageInstaller.try_install("rxvt-unicode")
FileInstaller.create_symlink(os.path.join(dir, "Xresources"), "~/.config/Xresources")
FileInstaller.create_symlink(os.path.join(dir, "Xresources-light"), "~/.config/Xresources-light")
FileInstaller.create_symlink(os.path.join(dir, "Xresources-dark"), "~/.config/Xresources-dark")
コード例 #5
0
#!/usr/bin/python
import os
from libinstall import FileInstaller, PackageInstaller
dir = os.path.dirname(__file__)

PackageInstaller.try_install('rxvt-unicode')
FileInstaller.create_symlink(os.path.join(dir, 'Xresources'),
                             '~/.config/Xresources')
FileInstaller.create_symlink(os.path.join(dir, 'Xresources-light'),
                             '~/.config/Xresources-light')
FileInstaller.create_symlink(os.path.join(dir, 'Xresources-dark'),
                             '~/.config/Xresources-dark')
コード例 #6
0
#!/bin/python
import os
from libinstall import PackageInstaller, FileInstaller
dir = os.path.dirname(__file__)

PackageInstaller.try_install('eyecandy', method='pip')
FileInstaller.create_symlink(os.path.join(dir, 'candy.json'), '~/.config/EyeCandy/candy.json')
コード例 #7
0
ファイル: __main__.py プロジェクト: mard/dotfiles
#!/bin/python
import os
from libinstall import FileInstaller, PackageInstaller
dir = os.path.dirname(__file__)

PackageInstaller.try_install('gzdoom')
FileInstaller.create_symlink(os.path.join(dir, 'gzdoom.ini'), '~/.config/gzdoom/gzdoom.ini')

コード例 #8
0
ファイル: __main__.py プロジェクト: mard/dotfiles
#!/bin/python
import os
from libinstall import FileInstaller, PackageInstaller
dir = os.path.dirname(__file__)

PackageInstaller.try_install('slock')

FileInstaller.create_symlink(os.path.join(dir, 'bin/a73'), '~/scripts/bin/a73')
FileInstaller.create_symlink(os.path.join(dir, 'bin/util'), '~/scripts/bin/util')
FileInstaller.create_symlink(os.path.join(dir, 'lib'), '~/scripts/lib')

コード例 #9
0
ファイル: __main__.py プロジェクト: mard/dotfiles
#!/bin/python
import os
from libinstall import FileInstaller, PackageInstaller
dir = os.path.dirname(__file__)

FileInstaller.create_symlink(os.path.join(dir, 'locale.conf'), '~/.config/locale.conf')
FileInstaller.create_symlink(os.path.join(dir, 'user-dirs.dirs'), '~/.config/user-dirs.dirs')
FileInstaller.create_symlink(os.path.join(dir, 'user-dirs.conf'), '~/.config/user-dirs.conf')

コード例 #10
0
ファイル: __main__.py プロジェクト: mard/dotfiles
#!/bin/python
import os
from libinstall import FileInstaller
dir = os.path.dirname(__file__)

FileInstaller.create_symlink(os.path.join(dir, 'minttyrc'), '~/.minttyrc')
コード例 #11
0
ファイル: __main__.py プロジェクト: mard/dotfiles
#!/bin/python
import os
from libinstall import FileInstaller, PackageInstaller
dir = os.path.dirname(__file__)

PackageInstaller.try_install('mpv')
FileInstaller.create_symlink(os.path.join(dir, 'mpv.conf'), '~/.config/mpv/mpv.conf')
FileInstaller.create_symlink(os.path.join(dir, 'input.conf'), '~/.config/mpv/input.conf')

コード例 #12
0
ファイル: __main__.py プロジェクト: darvelo/rr-dotfiles
#!/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')
コード例 #13
0
#!/bin/python
import os, sys
from libinstall import FileInstaller, PackageInstaller
dir = os.path.dirname(__file__)

PackageInstaller.try_install('firefox')
if 'cygwin' in sys.platform:
    FileInstaller.copy_file(os.path.join(dir, '.vimperatorrc'), '~/')
else:
    FileInstaller.create_symlink(os.path.join(dir, '.vimperatorrc'), '~/')
コード例 #14
0
ファイル: __main__.py プロジェクト: mard/dotfiles
#!/bin/python
import os
from libinstall import FileInstaller, PackageInstaller
dir = os.path.dirname(__file__)

PackageInstaller.try_install('tmux')
FileInstaller.create_symlink(os.path.join(dir, 'tmux.conf'), '~/.tmux.conf')
FileInstaller.create_symlink(os.path.join(dir, 'tmux.statusbar'), '~/.tmux.statusbar')
コード例 #15
0
#!/usr/bin/env python3
import os
from libinstall import FileInstaller, PackageInstaller
dir = os.path.dirname(__file__)

PackageInstaller.try_install('python-pyqt5')  # for panel
PackageInstaller.try_install('dmenu')  # program executor
PackageInstaller.try_install('bspwm-git')  # window manager
PackageInstaller.try_install('sxhkd-git')  # hotkey manager
PackageInstaller.try_install('xdo')  # like xdotool, but different
PackageInstaller.try_install('feh')  # wallpaper renderer

PackageInstaller.try_install('psutil', method='pip')  # CPU usage
PackageInstaller.try_install('pyalsaaudio', method='pip')  # system volume
PackageInstaller.try_install('python-mpd2', method='pip')  # mpd interaction
PackageInstaller.try_install('python3-xlib', method='pip')  # window titles

FileInstaller.create_symlink(os.path.join(dir, 'sxhkdrc'),
                             '~/.config/sxhkd/sxhkdrc')
FileInstaller.create_symlink(os.path.join(dir, 'bspwmrc'),
                             '~/.config/bspwm/bspwmrc')
FileInstaller.create_symlink(os.path.join(dir, 'toggle-fullscreen'),
                             '~/.config/bspwm/toggle-fullscreen')
FileInstaller.create_symlink(os.path.join(dir, 'rules'),
                             '~/.config/bspwm/rules')
FileInstaller.create_symlink(os.path.join(dir, 'panel'),
                             '~/.config/bspwm/panel')
コード例 #16
0
ファイル: __main__.py プロジェクト: darvelo/rr-dotfiles
#!/usr/bin/env python3
import os
from libinstall import FileInstaller, PackageInstaller
dir = os.path.dirname(__file__)

PackageInstaller.try_install('python-pyqt5')     # for panel
PackageInstaller.try_install('dmenu')            # program executor
PackageInstaller.try_install('bspwm-git')        # window manager
PackageInstaller.try_install('sxhkd-git')        # hotkey manager
PackageInstaller.try_install('xdo')              # like xdotool, but different
PackageInstaller.try_install('feh')              # wallpaper renderer

PackageInstaller.try_install('psutil', method='pip')       # CPU usage
PackageInstaller.try_install('pyalsaaudio', method='pip')  # system volume
PackageInstaller.try_install('python-mpd2', method='pip')  # mpd interaction
PackageInstaller.try_install('python3-xlib', method='pip') # window titles

FileInstaller.create_symlink(os.path.join(dir, 'sxhkdrc'), '~/.config/sxhkd/sxhkdrc')
FileInstaller.create_symlink(os.path.join(dir, 'bspwmrc'), '~/.config/bspwm/bspwmrc')
FileInstaller.create_symlink(os.path.join(dir, 'toggle-fullscreen'), '~/.config/bspwm/toggle-fullscreen')
FileInstaller.create_symlink(os.path.join(dir, 'rules'), '~/.config/bspwm/rules')
FileInstaller.create_symlink(os.path.join(dir, 'panel'), '~/.config/bspwm/panel')
コード例 #17
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')
コード例 #18
0
ファイル: __main__.py プロジェクト: mard/dotfiles
#!/bin/python
import os
from libinstall import FileInstaller, PackageInstaller
dir = os.path.dirname(__file__)

PackageInstaller.try_install('bash')
FileInstaller.create_symlink(os.path.join(dir, 'bash_profile'), '~/.bash_profile')
FileInstaller.create_symlink(os.path.join(dir, 'bashrc'), '~/.bashrc')
FileInstaller.create_symlink(os.path.join(dir, 'inputrc'), '~/.inputrc')
FileInstaller.create_symlink(os.path.join(dir, 'bash_aliases'), '~/.bash_aliases')

コード例 #19
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')
コード例 #20
0
ファイル: __main__.py プロジェクト: mard/dotfiles
#!/bin/python
import os
from libinstall import FileInstaller, PackageInstaller
dir = os.path.dirname(__file__)

PackageInstaller.try_install('vim')
FileInstaller.create_symlink(os.path.join(dir, 'vimrc'), '~/.vimrc')
FileInstaller.create_symlink(os.path.join(dir, 'vundle'), '~/.vim/vundle')
コード例 #21
0
ファイル: __main__.py プロジェクト: mard/dotfiles
#!/bin/python
import os
from libinstall import FileInstaller, PackageInstaller
dir = os.path.dirname(__file__)

PackageInstaller.try_install('youtube-dl', 'pip')

FileInstaller.create_symlink(os.path.join(dir, 'config'), '~/.config/youtube-dl/config')
コード例 #22
0
ファイル: __main__.py プロジェクト: mard/dotfiles
#!/bin/python
import os
from libinstall import FileInstaller, PackageInstaller
dir = os.path.dirname(__file__)

PackageInstaller.try_install('redshift')

FileInstaller.create_symlink(os.path.join(dir, 'redshift.conf'), '~/.config/redshift.conf')
コード例 #23
0
ファイル: __main__.py プロジェクト: mard/dotfiles
#!/bin/python
import os
from libinstall import FileInstaller, PackageInstaller, run_verbose
dir = os.path.dirname(__file__)

PackageInstaller.try_install('xorg-server')
PackageInstaller.try_install('xorg-xinit')
PackageInstaller.try_install('xorg-xset')
PackageInstaller.try_install('xorg-xrdb')

FileInstaller.create_symlink(os.path.join(dir, 'xinitrc'), '~/.xinitrc')
FileInstaller.create_symlink(os.path.join(dir, 'Xresources'), '~/.Xresources')
FileInstaller.create_symlink(os.path.join(dir, 'imwheelrc'), '~/.imwheelrc')
run_verbose(['xrdb', '-merge', os.path.expanduser('~/.Xresources')])
コード例 #24
0
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'])
コード例 #25
0
#!/bin/sh
import os
from libinstall import FileInstaller, PackageInstaller
dir = os.path.dirname(__file__)

PackageInstaller.try_install('git')
FileInstaller.create_symlink(os.path.join(dir, '.gitconfig'), '~/')
FileInstaller.create_symlink(os.path.join(dir, '.gitignore'), '~/')
コード例 #26
0
#!/bin/python
import os
from libinstall import PackageInstaller, FileInstaller
dir = os.path.dirname(__file__)

PackageInstaller.try_install('htop')
FileInstaller.create_symlink(os.path.join(dir, 'htoprc'), '~/.config/htop/htoprc')
コード例 #27
0
#!/bin/python
import os
from libinstall import FileInstaller, PackageInstaller
dir = os.path.dirname(__file__)

FileInstaller.create_symlink(os.path.join(dir, '.inputrc'), '~/')
FileInstaller.create_symlink(os.path.join(dir, '.minttyrc-dark'), '~/.minttyrc-dark')
FileInstaller.create_symlink(os.path.join(dir, '.minttyrc-light'), '~/.minttyrc-light')
FileInstaller.create_symlink(os.path.join(dir, '.minttyrc-light'), '~/.minttyrc')
コード例 #28
0
ファイル: __main__.py プロジェクト: mard/dotfiles
#!/bin/python
import os
from libinstall import FileInstaller, PackageInstaller
dir = os.path.dirname(__file__)

PackageInstaller.try_install('code')

FileInstaller.create_symlink(os.path.join(dir, 'settings.json'), '~/.config/Code/User/settings.json')
FileInstaller.create_symlink(os.path.join(dir, 'settings.json'), '~/.config/Code - OSS/User/settings.json')
コード例 #29
0
#!/bin/python
import os
from libinstall import FileInstaller, PackageInstaller
dir = os.path.dirname(__file__)

#TODO: rewrite this to my own screenshot solution
PackageInstaller.try_install('escrotum-git')  # to make screenshots

PackageInstaller.try_install('xorg-xsetroot') # to fix the mouse cursor
PackageInstaller.try_install('xorg-xrandr')   # to query monitor information
PackageInstaller.try_install('xdotool')       # for all sort of things
PackageInstaller.try_install('autocutsel')    # synchronize primary and selection clipboards
PackageInstaller.try_install('clipit')        # keep clipboard content even after application closes
PackageInstaller.try_install('compton')       # for shadows, transparency and vsync

FileInstaller.create_symlink(os.path.join(dir, '.xinitrc'), '~/')
FileInstaller.create_symlink(os.path.join(dir, 'compton.conf'), '~/.config/compton.conf')

if FileInstaller.has_executable('zsh'):
    FileInstaller.create_symlink(os.path.join(dir, '.zlogin'), '~/')
コード例 #30
0
ファイル: __main__.py プロジェクト: darvelo/rr-dotfiles
#!/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')
コード例 #31
0
ファイル: __main__.py プロジェクト: mard/dotfiles
#!/bin/python
import os
from libinstall import FileInstaller, PackageInstaller
dir = os.path.dirname(__file__)

PackageInstaller.try_install('ranger')

FileInstaller.create_symlink(os.path.join(dir, 'rc.conf'), '~/.config/ranger/rc.conf')
コード例 #32
0
ファイル: __main__.py プロジェクト: mard/dotfiles
#!/bin/python
import os
from libinstall import FileInstaller, PackageInstaller
dir = os.path.dirname(__file__)

PackageInstaller.try_install('mpv')

FileInstaller.create_symlink(os.path.join(dir, 'config'), '~/.config/mpi')
FileInstaller.create_symlink(os.path.join(dir, 'mpi'), '~/scripts/bin/mpi')
FileInstaller.create_symlink(os.path.join(dir, 'mpi.desktop'), '~/.local/share/applications/mpi.desktop')