Ver código fonte

Set X windows title

George Jones 2 anos atrás
pai
commit
eb5259704c
1 arquivos alterados com 12 adições e 0 exclusões
  1. 12 0
      home/public/snippits/X/set-x-title.sh

+ 12 - 0
home/public/snippits/X/set-x-title.sh

@@ -0,0 +1,12 @@
+function set_xtitle {
+    # set X window title
+    #
+    # Usage:
+    #
+    #   set_xtitle [name]
+    WINDOW_NAME="${1:-`basename $PWD`}"
+    PROMPT_COMMAND="echo -ne \"\033]0;${WINDOW_NAME} $USER@$HOSTNAME:$PWD\007\"";
+}
+
+
+export PROMPT_COMMAND="history -a; history -c; history -r; set_xtitle"