aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/fjresize.py
diff options
context:
space:
mode:
authorLibravatar SYN-cook <SYN-cook@users.noreply.github.com>2017-02-28 19:57:25 +0100
committerLibravatar GitHub <noreply@github.com>2017-02-28 19:57:25 +0100
commit0890a915daf92ef2e37bb28be3d887e699ec1de2 (patch)
tree785bfa9d2eded39c3df72f00071d1abedb5cec90 /contrib/fjresize.py
parentremove redundancy (diff)
parentprofile merges (diff)
downloadfirejail-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-xcontrib/fjresize.py25
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
3import sys
4import fjdisplay
5import subprocess
6
7usage = """usage: fjresize.py firejail-name displaysize
8resize firejail xephyr windows.
9fjdisplay.py with no other arguments will list running named firejails with displays.
10fjresize.py with only a firejail name will list valid resolutions.
11names can be shortend as long its unambiguous.
12note: you may need to move the xephyr window for the resize to take effect
13example:
14 fjresize.py browser 1280x800
15"""
16
17
18if len(sys.argv) == 2:
19 out = subprocess.check_output(['xrandr','--display',fjdisplay.getdisplay(sys.argv[1])])
20 print(out)
21elif 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)
24else:
25 print(usage) \ No newline at end of file