Commit fb792426 authored by Jacek Sowiński's avatar Jacek Sowiński

Don't concatenate column layout configs

Use only one layout file. Following precedence is applied:

1. Local (i.e. $PWD/topydo_columns.ini or $PWD/topydo_columns.conf or
   $PWD/.topydo_columns)
2. User's home (i.e. $HOME/.topydo_columns or
   $HOME/.config/topydo/columns)
3. System-wide (i.e. /etc/topydo_columns.conf)
parent 735e748d
...@@ -41,15 +41,18 @@ def columns(): ...@@ -41,15 +41,18 @@ def columns():
cp = configparser.RawConfigParser(defaults) cp = configparser.RawConfigParser(defaults)
files = [ files = [
"/etc/topydo_columns.conf",
home_config_path('.config/topydo/columns'),
home_config_path('.topydo_columns'),
".topydo_columns",
"topydo_columns.conf",
"topydo_columns.ini", "topydo_columns.ini",
"topydo_columns.conf",
".topydo_columns",
home_config_path('.topydo_columns'),
home_config_path('.config/topydo/columns'),
"/etc/topydo_columns.conf",
] ]
cp.read(files) for filename in files:
if cp.read(filename):
break
column_list = [] column_list = []
for column in cp.sections(): for column in cp.sections():
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment