summaryrefslogtreecommitdiffstats
path: root/.local
diff options
context:
space:
mode:
Diffstat (limited to '.local')
-rwxr-xr-x.local/bin/bell3
-rwxr-xr-x.local/bin/set-title30
2 files changed, 33 insertions, 0 deletions
diff --git a/.local/bin/bell b/.local/bin/bell
new file mode 100755
index 0000000..7d6b529
--- /dev/null
+++ b/.local/bin/bell
@@ -0,0 +1,3 @@
+#/bin/sh --
+
+tput bel
diff --git a/.local/bin/set-title b/.local/bin/set-title
new file mode 100755
index 0000000..34caa8a
--- /dev/null
+++ b/.local/bin/set-title
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+exec < /dev/tty
+
+if tput hs
+then
+ tsl="$(tput tsl)"
+ fsl="$(tput fsl)"
+ hs=1
+else
+ case ${TERM} in
+ xterm*|rxvt*)
+ tsl="$(printf "\x1b]0;")"
+ fsl="$(printf "\a")"
+ hs=1
+ ;;
+ screen*)
+ tsl="$(printf "\x1b_")"
+ fsl="$(printf "\x1b\\")"
+ hs=1
+ ;;
+ esac
+fi
+
+if test "$hs" = 1
+then
+ printf "%s" "$tsl"
+ printf "%s" "$@"
+ printf "%s" "$fsl"
+fi