Check-in [04b43d90af]
Overview
| Comment: | Mini plugin to set current working directory on startup. |
|---|---|
| Downloads: | Tarball | ZIP archive | SQL archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
04b43d90afc3e46fdefb84724f82e952 |
| User & Date: | mario on 2016-10-09 12:18:15 |
| Other Links: | manifest | tags |
Context
|
2016-10-18
| ||
| 21:26 | Smaller icon for housemixes plugin check-in: adb4636366 user: mario tags: trunk | |
|
2016-10-09
| ||
| 12:18 | Mini plugin to set current working directory on startup. check-in: 04b43d90af user: mario tags: trunk | |
|
2016-10-08
| ||
| 14:47 | housemixes: set listformat to 'href' instead of pls check-in: 1b5a6c73d3 user: mario tags: trunk | |
Changes
Added contrib/startup_workdir.py version [080458f838].
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# encoding: utf-8
# title: Working directory
# description: Changes to another directory on startup
# version: 0.1
# priority: rare
# depends: streamtuner2 >= 2.1.5
# type: feature
# category: session
# config:
# { name: start_dir, value: /home/$USER/Music, type: string, decription: Switch to this directory. }
#
# Can be used to predefine an alternative start directory,
# which also influences where streamrippers downloads to.
#
# This is somewhat redundant, as you can specify the working
# directory in your Desktop starter already; or set the path
# for streamripper with a parameter.
from config import conf
import os, os.path
# Stop button
class startup_workdir(object):
module = __name__
# button + hook
def __init__(self, parent):
os.chdir(
os.path.expandvars(
os.path.expanduser(
conf.start_dir
)
)
)
|