Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions FusionIcon/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
Expand All @@ -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:
Expand Down
13 changes: 7 additions & 6 deletions FusionIcon/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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':
Expand All @@ -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)
Expand Down Expand Up @@ -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):

Expand Down