Exemplo n.º 1
0
def unmount():
    vols = "/Volumes"
    for name in os.listdir(vols):
        if name == "Macintosh HD":
            continue
        path = join(vols, name)
        if os.path.isdir(path):
            run(["diskutil", "unmount", path])
Exemplo n.º 2
0
def fantastical(*words):
    run([expand_path("~/bin/fantastical.sh")] + list(words))
Exemplo n.º 3
0
def dvorak():
    run('keyboardSwitcher select Dvorak')
Exemplo n.º 4
0
def qwerty():
    run('keyboardSwitcher select U.S.')
Exemplo n.º 5
0
def chrome(*URIs):
    URIs = [URI for URI in URIs if URI != "-"]
    URLs = [commander.helpers.add_protocol(URI) for URI in URIs]
    run(["open", "-a", "Google Chrome"] + URLs)
Exemplo n.º 6
0
def okc(clip_profile):
    profile = profile_URL(clip_profile)
    if profile:
        run(["open", "-a", "Safari", profile])
Exemplo n.º 7
0
def firefox(*URIs):
    URIs = [URI for URI in URIs if URI != "-"]
    URLs = [commander.helpers.add_protocol(URI) for URI in URIs]
    run(["open", "-a", "firefox"] + URLs)
Exemplo n.º 8
0
def notes():
    run(
        ["/usr/local/Caskroom/google-chrome/latest/Google Chrome.app/Contents/MacOS/Google Chrome",
        "--incognito",
        expand_path("~/projects/dotfiles/notes.html")]
        )
Exemplo n.º 9
0
def editor(path):
    path = expand_path(path)
    run(["/usr/local/bin/atom", path])
Exemplo n.º 10
0
def calc():
    run("open -a Calculator")
Exemplo n.º 11
0
def te():
    # helpers.run is a convenient way to run command line stuff
    # It can take a string or a list of string arguments
    run("open -a Textedit")