aboutsummaryrefslogtreecommitdiffhomepage
path: root/firectl.py
diff options
context:
space:
mode:
authorRahiel Kasim <rahiel@protonmail.ch>2016-01-06 21:53:08 +0100
committerRahiel Kasim <rahiel@protonmail.ch>2016-01-06 21:53:08 +0100
commit83b51ed4a2ce04a30be0b4edf2e85a243264224b (patch)
tree21591cb7b83e15fd158fe1dcaac7abd252cdd847 /firectl.py
parentf0723d0c255ffe41ab6a7ca2ca06f435be2ede5e (diff)
remove uninstalled programs from the config, update readme
Diffstat (limited to 'firectl.py')
-rw-r--r--firectl.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/firectl.py b/firectl.py
index 9208a2f..b7285a4 100644
--- a/firectl.py
+++ b/firectl.py
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
-__version__ = "0.2.4"
+__version__ = "0.2.5"
import os
from difflib import get_close_matches
@@ -179,5 +179,11 @@ def status():
def restore():
"""Re-enable firejail profiles for when desktop files get updated."""
header, conf = get_config()
+
+ # clean config from enabled programs removed from the system
+ removed = [c for c in conf if c not in installed]
+ remove_config(removed)
+ [conf.remove(c) for c in removed]
+
if len(conf) > 0:
enable.callback(conf, update_config=False)