summaryrefslogtreecommitdiff
path: root/app/xlockmore/etc/xtermlock.sh
diff options
context:
space:
mode:
Diffstat (limited to 'app/xlockmore/etc/xtermlock.sh')
-rw-r--r--app/xlockmore/etc/xtermlock.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/app/xlockmore/etc/xtermlock.sh b/app/xlockmore/etc/xtermlock.sh
new file mode 100644
index 000000000..93cc1c16b
--- /dev/null
+++ b/app/xlockmore/etc/xtermlock.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+# Runs xlock displaying to the current X terminal emulator window
+# Works well in xterm, but not so well in terminal emulators like
+# dtterm that have menu bars and other junk.
+#
+# All arguments are passed to xlock.
+
+g=`stty -a |
+ sed -ne's/.* ypixels = \([^;]*\); xpixels = \([^;]*\).*/\2x\1/p'`
+exec xlock -inwindow -parent $WINDOWID +install -geometry $g "$@"