summaryrefslogtreecommitdiff
path: root/mate-terminal.wrapper
diff options
context:
space:
mode:
authorScott Balneaves <[email protected]>2013-05-01 09:15:58 -0500
committerScott Balneaves <[email protected]>2013-05-01 09:15:58 -0500
commitf3374b0c06a6e287e3ee8c68471fcab8150c2318 (patch)
tree50ffe89f6d5ecdc1349648f14b7cd0721c4234ce /mate-terminal.wrapper
parentb2bc45fbca9a5f46517fb3298c5ab8fa22fd4b97 (diff)
downloadmate-terminal-f3374b0c06a6e287e3ee8c68471fcab8150c2318.tar.bz2
mate-terminal-f3374b0c06a6e287e3ee8c68471fcab8150c2318.tar.xz
Wrapper for Issue #9
Diffstat (limited to 'mate-terminal.wrapper')
-rwxr-xr-xmate-terminal.wrapper44
1 files changed, 44 insertions, 0 deletions
diff --git a/mate-terminal.wrapper b/mate-terminal.wrapper
new file mode 100755
index 0000000..4d528c9
--- /dev/null
+++ b/mate-terminal.wrapper
@@ -0,0 +1,44 @@
+#!/usr/bin/env python
+
+import sys
+import os
+import subprocess
+
+newargs = ['mate-terminal']
+oldargs = sys.argv[1:]
+
+while True:
+ try:
+ arg = oldargs.pop(0)
+
+ if arg == '-display':
+ os.environ['DISPLAY'] = oldargs.pop(0)
+ elif arg == '-name':
+ newargs.append('--window-with-profile=' + oldargs.pop(0))
+ elif arg == '-n':
+ sys.stderr.write('Set an icon in your profile')
+ elif arg == '-T' or arg == '-title':
+ newargs.append('-t')
+ newargs.append(oldargs.pop(0))
+ elif arg == '-ls' or arg == '+ls':
+ sys.stderr.write('Login shell not supported. Set in your profile.')
+ elif arg == '-geometry':
+ newargs.append('--geometry=' + oldargs.pop(0))
+ elif arg == '-fn':
+ newargs.append('--font=' + oldargs.pop(0))
+ elif arg == '-fg':
+ newargs.append('--foreground=' + oldargs.pop(0))
+ elif arg == '-bg':
+ newargs.append('--background=' + oldargs.pop(0))
+ elif arg == '-tn':
+ newargs.append('--termname=' + oldargs.pop(0))
+ elif arg == '-h' or arg == '--help':
+ newargs.append('--help')
+ elif arg == '-e':
+ newargs.append('-x')
+ newargs += oldargs
+ break
+ except IndexError:
+ break
+
+subprocess.call(newargs)