diff options
author | 2017-02-28 19:57:25 +0100 | |
---|---|---|
committer | 2017-02-28 19:57:25 +0100 | |
commit | 0890a915daf92ef2e37bb28be3d887e699ec1de2 (patch) | |
tree | 785bfa9d2eded39c3df72f00071d1abedb5cec90 /contrib/fjresize.py | |
parent | remove redundancy (diff) | |
parent | profile merges (diff) | |
download | firejail-0890a915daf92ef2e37bb28be3d887e699ec1de2.tar.gz firejail-0890a915daf92ef2e37bb28be3d887e699ec1de2.tar.zst firejail-0890a915daf92ef2e37bb28be3d887e699ec1de2.zip |
Merge pull request #2 from netblue30/master
merge upstream
Diffstat (limited to 'contrib/fjresize.py')
-rwxr-xr-x | contrib/fjresize.py | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/contrib/fjresize.py b/contrib/fjresize.py new file mode 100755 index 000000000..52b289159 --- /dev/null +++ b/contrib/fjresize.py | |||
@@ -0,0 +1,25 @@ | |||
1 | #!/usr/bin/env python | ||
2 | |||
3 | import sys | ||
4 | import fjdisplay | ||
5 | import subprocess | ||
6 | |||
7 | usage = """usage: fjresize.py firejail-name displaysize | ||
8 | resize firejail xephyr windows. | ||
9 | fjdisplay.py with no other arguments will list running named firejails with displays. | ||
10 | fjresize.py with only a firejail name will list valid resolutions. | ||
11 | names can be shortend as long its unambiguous. | ||
12 | note: you may need to move the xephyr window for the resize to take effect | ||
13 | example: | ||
14 | fjresize.py browser 1280x800 | ||
15 | """ | ||
16 | |||
17 | |||
18 | if len(sys.argv) == 2: | ||
19 | out = subprocess.check_output(['xrandr','--display',fjdisplay.getdisplay(sys.argv[1])]) | ||
20 | print(out) | ||
21 | elif len(sys.argv) == 3: | ||
22 | out = subprocess.check_output(['xrandr','--display',fjdisplay.getdisplay(sys.argv[1]),'--output','default','--mode',sys.argv[2]]) | ||
23 | print(out) | ||
24 | else: | ||
25 | print(usage) \ No newline at end of file | ||