diff options
Diffstat (limited to 'contrib/fjresize.py')
-rwxr-xr-x | contrib/fjresize.py | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/contrib/fjresize.py b/contrib/fjresize.py index 4eb33f120..95b76259d 100755 --- a/contrib/fjresize.py +++ b/contrib/fjresize.py | |||
@@ -6,20 +6,26 @@ import subprocess | |||
6 | 6 | ||
7 | usage = """usage: fjresize.py firejail-name displaysize | 7 | usage = """usage: fjresize.py firejail-name displaysize |
8 | resize firejail xephyr windows. | 8 | resize firejail xephyr windows. |
9 | fjdisplay.py with no other arguments will list running named firejails with displays. | 9 | fjdisplay.py with no other arguments will list running named firejails with |
10 | displays. | ||
10 | fjresize.py with only a firejail name will list valid resolutions. | 11 | fjresize.py with only a firejail name will list valid resolutions. |
11 | names can be shortened as long its unambiguous. | 12 | names can be shortened as long as it's unambiguous. |
12 | note: you may need to move the xephyr window for the resize to take effect | 13 | note: you may need to move the xephyr window for the resize to take effect |
13 | example: | 14 | example: |
14 | fjresize.py browser 1280x800 | 15 | fjresize.py browser 1280x800 |
15 | """ | 16 | """ |
16 | 17 | ||
17 | |||
18 | if len(sys.argv) == 2: | 18 | if len(sys.argv) == 2: |
19 | out = subprocess.check_output(['xrandr','--display',fjdisplay.getdisplay(sys.argv[1])]) | 19 | out = subprocess.check_output( |
20 | ['xrandr', '--display', | ||
21 | fjdisplay.getdisplay(sys.argv[1])]) | ||
20 | print(out) | 22 | print(out) |
21 | elif len(sys.argv) == 3: | 23 | elif len(sys.argv) == 3: |
22 | out = subprocess.check_output(['xrandr','--display',fjdisplay.getdisplay(sys.argv[1]),'--output','default','--mode',sys.argv[2]]) | 24 | out = subprocess.check_output([ |
25 | 'xrandr', '--display', | ||
26 | fjdisplay.getdisplay(sys.argv[1]), '--output', 'default', '--mode', | ||
27 | sys.argv[2] | ||
28 | ]) | ||
23 | print(out) | 29 | print(out) |
24 | else: | 30 | else: |
25 | print(usage) | 31 | print(usage) |