diff --git a/FusionIcon/data.py b/FusionIcon/data.py index c2db641..ef58c7f 100644 --- a/FusionIcon/data.py +++ b/FusionIcon/data.py @@ -81,8 +81,8 @@ 'KWin4', 'kde', None, None), 'xfwm4': - ('xfwm4', ['xfwm4'], - 'Xfwm4', 'xfce', ['noreplace'], ['killall', 'xfwm4']), + ('xfwm4', ['xfwm4', '--replace'], + 'Xfwm4', 'xfce', None, None), 'openbox': ('openbox', ['openbox', '--replace'], @@ -104,16 +104,16 @@ #decorator # base command, full command line, -# label, desktop environment +# label, desktop environment, proc name decorators = { 'emerald': ('emerald', 'emerald --replace', - 'Emerald', None), + 'Emerald', None, 'emerald'), 'gwd': ('gtk-window-decorator', 'gtk-window-decorator --replace', - 'GTK+ Window Decorator', 'mate'), + 'GTK+ Window Decorator', 'mate', 'gtk-window-deco'), } #option: diff --git a/FusionIcon/util.py b/FusionIcon/util.py index bfedf72..35da2bd 100644 --- a/FusionIcon/util.py +++ b/FusionIcon/util.py @@ -161,7 +161,7 @@ def start(self): time.sleep(1) if self.active and self.old and 'noreplace' in self[self.active].flags: - run(['killall', self[self.old].base], 'call') + run(['pkill', self[self.old].base], 'call') time.sleep(1) if self.active == 'compiz': @@ -172,9 +172,9 @@ def start(self): if options[option].switch is not None: compiz_command.append(options[option].switch) - kill_list = ['killall'] + kill_list = ['pkill'] for decorator in decorators: - kill_list.append(decorators[decorator].base) + kill_list.append(decorators[decorator].proc) run(kill_list, 'call') time.sleep(0.5) @@ -209,12 +209,13 @@ def __init__(self, name, decorators, installed): self.command = installed.decorators[name][1] self.label = installed.decorators[name][2] self.desktop = installed.decorators[name][3] + self.proc = installed.decorators[name][4] def kill_others(self): - killall = ['killall'] + pkill = ['pkill'] for decorator in [x for x in self.decorators if x != self.name]: - killall.append(self.decorators[decorator].base) - run(killall, 'call') + pkill.append(self.decorators[decorator].proc) + run(pkill, 'call') class CompizDecorators(dict):