Skip to content

Commit

Permalink
Merge pull request #200 from mattrose/dbus-options
Browse files Browse the repository at this point in the history
Dbus options
  • Loading branch information
mattrose authored Sep 3, 2020
2 parents 1ad579c + 75d68b8 commit 940b721
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
11 changes: 2 additions & 9 deletions terminator
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ if __name__ == '__main__':

dbg ("%s starting up, version %s" % (APP_NAME, APP_VERSION))

OPTIONS = terminatorlib.optionparse.parse_options()
OPTIONS,dbus_options = terminatorlib.optionparse.parse_options()

TERMINATOR = Terminator()
TERMINATOR.set_origcwd(ORIGCWD)
Expand Down Expand Up @@ -95,14 +95,7 @@ if __name__ == '__main__':
# (the -x argument for example)
if OPTIONS.working_directory is None:
OPTIONS.working_directory = ORIGCWD
optionslist = {}
for opt, val in list(OPTIONS.__dict__.items()):
if type(val) == type([]):
val = ' '.join(val)
if val == True:
val = 'True'
optionslist[opt] = val and '%s'%val or ''
optionslist = dbus.Dictionary(optionslist, signature='ss')
optionslist = dbus.Dictionary(dbus_options, signature='ss')
if OPTIONS.new_tab:
dbg('Requesting a new tab')
ipc.new_tab_cmdline(optionslist)
Expand Down
11 changes: 10 additions & 1 deletion terminatorlib/optionparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,16 @@ def parse_options():

configobj.options_set(options)

optionslist = {}
for opt, val in list(options.__dict__.items()):
if type(val) == type([]):
val = ' '.join(val)
if val == True:
val = 'True'
optionslist[opt] = val and '%s'%val or ''
# optionslist = dbus.Dictionary(optionslist, signature='ss')
if util.DEBUG == True:
dbg('OptionParse::parse_options: command line options: %s' % options)

return(options)

return(options,optionslist)

0 comments on commit 940b721

Please sign in to comment.