diff --git a/TODO b/TODO index cc6f064b..30ae8158 100644 --- a/TODO +++ b/TODO @@ -1,4 +1,4 @@ -* Edit doc/terminatorrc.5 manpage to contain the information about the options +* Edit doc/terminator_config.5 manpage to contain the information about the options * menu entry/keybinding to hightlight a term upon: * command ending diff --git a/doc/terminator.1 b/doc/terminator.1 index 3cb2e4b0..1d176093 100644 --- a/doc/terminator.1 +++ b/doc/terminator.1 @@ -114,7 +114,7 @@ and Move the terminal over the landing terminal. The zone where the terminal will be inserted will be highlighted. .SH "SEE ALSO" -.BR gnome\-terminal(1),terminatorrc(5) +.BR gnome\-terminal(1),terminator_config(5) .SH "AUTHOR" Terminator was written by Chris Jones and others. .PP diff --git a/doc/terminatorrc.5 b/doc/terminator_config.5 similarity index 93% rename from doc/terminatorrc.5 rename to doc/terminator_config.5 index c924bcce..162b73f7 100644 --- a/doc/terminatorrc.5 +++ b/doc/terminator_config.5 @@ -1,12 +1,12 @@ -.TH "TERMINATORRC" "5" "Feb 22, 2008" "Nicolas Valcarcel " "" +.TH "TERMINATOR_CONFIG" "5" "Feb 22, 2008" "Nicolas Valcarcel " "" .SH "NAME" -${XDG_CONFIG_HOME}/terminator/terminatorrc (usually ~/.config/terminator/terminatorrc) -or ~/.terminatorrc \- the config file for terminator terminal emulator. +${XDG_CONFIG_HOME}/terminator/config (usually ~/.config/terminator/config) +\- the config file for terminator terminal emulator. .SH "DESCRIPTION" This manual page documents briefly the .B termiatorrc config file. .PP -\fBterminatorrc\fP is an optional file to configure the terminator terminal emulator. It is used if there is no gconf PROFILE on the system for configuring the options of the terminal(s). +\fBterminator/config\fP is an optional file to configure the terminator terminal emulator. It is used if there is no gconf PROFILE on the system for configuring the options of the terminal(s). .SH "OPTIONS" The options are defined one per line as \fB'OPTION = VALUE'\fR. The options are described below: diff --git a/setup.py b/setup.py index 0f48b134..666fd4e5 100755 --- a/setup.py +++ b/setup.py @@ -75,7 +75,7 @@ setup(name='Terminator', data_files=[ ('share/applications', ['data/terminator.desktop']), ('share/man/man1', ['doc/terminator.1']), - ('share/man/man5', ['doc/terminatorrc.5']), + ('share/man/man5', ['doc/terminator_config.5']), ('share/pixmaps', ['data/icons/48x48/apps/terminator.png']), ('share/icons/hicolor/scalable/apps', glob.glob('data/icons/scalable/apps/*.svg')), ('share/icons/hicolor/16x16/apps', glob.glob('data/icons/16x16/apps/*.png')), diff --git a/terminatorlib/config.py b/terminatorlib/config.py index bd5484e8..d7d9cc1b 100755 --- a/terminatorlib/config.py +++ b/terminatorlib/config.py @@ -37,12 +37,6 @@ import os, sys, re # import unix-lib import pwd -HAS_XDG = True -try: - import xdg.BaseDirectory -except: - HAS_XDG = False - # set this to true to enable debugging output debug = True @@ -152,10 +146,12 @@ class TerminatorConfValuestoreRC (TerminatorConfValuestore): # that can be re-used when rc changes. def __init__ (self): self.type = "RCFile" - if HAS_XDG and xdg.BaseDirectory.load_first_config('terminator'): - self.rcfilename = os.path.join(xdg.BaseDirectory.load_first_config('terminator'), "terminatorrc") - else: - self.rcfilename = os.path.join(os.path.expanduser("~"), ".terminatorrc") + try: + directory = os.environ['XDG_CONFIG_HOME'] + except: + directory = os.path.join (os.path.expanduser("~"), ".config/terminator/") + + self.rcfilename = os.path.join(directory, "config") if os.path.exists (self.rcfilename): rcfile = open (self.rcfilename) @@ -185,7 +181,7 @@ class TerminatorConfValuestoreRC (TerminatorConfValuestore): elif deftype == 'float': self.values[key] = float (value) elif deftype == 'list': - err (_("Reading list values from .terminatorrc is not currently supported")) + err (_("Reading list values from .config/terminator/config is not currently supported")) raise ValueError else: self.values[key] = value