From ca0e8dcb2277cf5bf54a7298e2580a25c90c0be1 Mon Sep 17 00:00:00 2001 From: gryf Date: Fri, 19 Feb 2021 18:43:22 +0100 Subject: [PATCH] Use urxvt class to run terminal. --- urxvt.py | 36 ++---------------------------------- 1 file changed, 2 insertions(+), 34 deletions(-) diff --git a/urxvt.py b/urxvt.py index 3e1b28e..d0494b5 100755 --- a/urxvt.py +++ b/urxvt.py @@ -328,40 +328,8 @@ def main(): LOG.set_verbose(args.verbose) - command = ['urxvt'] - command.extend(['-icon', os.path.join(os.path.expanduser(ICON_PATH), - args.icon)]) - - if not args.no_perl: - command.append('-pe') - if args.tabbedalt: - command.append('tabbedalt,' + PERLEXT) - else: - command.append(PERLEXT) - - size = args.size - font_faces = _ADDITIONAL_FONTS[:] - if ',' in args.default_font: - f_f = [f.strip() for f in args.default_font.split(',')] - f_f.extend(font_faces) - font_faces = f_f - else: - font_faces.insert(0, args.default_font) - - if args.bitmap: - font_faces.insert(0, DEFAULT_BITMAP) - - # __import__('ipdb').set_trace() - fn = ['-fn', _get_font_list(font_faces, size)] - print(fn) - fb = ['-fb', _get_font_list(font_faces, size, True)] - print(fn) - print(fb) - command.extend(fn) - command.extend(fb) - - LOG.info('%s', command) - subprocess.run(command) + urxvt = Urxvt(args) + urxvt.run() if __name__ == '__main__':