]> git.phdru.name Git - dotfiles.git/commitdiff
.screenrc: Remove ti/te and run screen wrapped with tput calls
authorOleg Broytman <phd@phdru.name>
Tue, 11 Dec 2018 13:02:02 +0000 (16:02 +0300)
committerOleg Broytman <phd@phdru.name>
Tue, 11 Dec 2018 13:02:02 +0000 (16:02 +0300)
.screenrc
bin/screen [new file with mode: 0755]

index db73a6ad1054369b787c10142ac279043e76d91f..1b17439f2c91aecbe15585e3ea1090bf2bd46763 100644 (file)
--- a/.screenrc
+++ b/.screenrc
@@ -84,7 +84,7 @@ termcapinfo xterm 'is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l'
 
 # Do not use the alternate screen at all
 # run `tput smcup; screen -S test; tput rmcup`
-#termcapinfo xterm*|rxvt* 'ti=:te='
+termcapinfo xterm*|rxvt* 'ti=:te='
 
 # Enable non-blocking mode to better cope with flaky ssh connections.
 defnonblock 5
diff --git a/bin/screen b/bin/screen
new file mode 100755 (executable)
index 0000000..b2fbe11
--- /dev/null
@@ -0,0 +1,9 @@
+#! /bin/sh
+
+if [ "$1" = "-ls" -o "$1" = "--list" ]; then
+   list=true
+fi
+
+test "$list" = true || tput smcup
+/usr/bin/screen "$@"
+test "$list" = true || tput rmcup