summary refs log tree commit diff
path: root/.zsh
diff options
context:
space:
mode:
Diffstat (limited to '.zsh')
-rw-r--r--.zsh/title.zsh26
1 files changed, 26 insertions, 0 deletions
diff --git a/.zsh/title.zsh b/.zsh/title.zsh
new file mode 100644
index 00000000..b0d7ad70
--- /dev/null
+++ b/.zsh/title.zsh
@@ -0,0 +1,26 @@
+function _title {
+  echo -en "\033]0;$@\a"
+}
+
+function title {
+  if [ -n "$1" ]; then
+    _title_custom=1
+    _title $@
+  else
+    unset _title_custom
+    _title_precmd
+  fi
+}
+
+function _title_preexec {
+  [ -z "$_title_custom" ] && _title "$1"
+}
+
+function _title_precmd {
+  [ -z "$_title_custom" ] && _title zsh
+}
+
+typeset -ga preexec_functions
+typeset -ga precmd_functions
+preexec_functions+='_title_preexec'
+precmd_functions+='_title_precmd'
f unregisteredJune McEnroe 2019-10-24Set client-side origin to irc.invalidJune McEnroe 2019-10-24Factor out client-side origin nameJune McEnroe 2019-10-24Intercept all CAP commands from clientsJune McEnroe 2019-10-24Ignore further CAP ENDJune McEnroe 2019-10-24Implement client CAP for server-timeJune McEnroe 2019-10-24Implement ringWriteJune McEnroe 2019-10-24Make clientFormat publicJune McEnroe 2019-10-24Make serverFormat publicJune McEnroe 2019-10-24Rename some thingsJune McEnroe 2019-10-23Add ISUPPORT draft to STANDARDSJune McEnroe 2019-10-23Track own originJune McEnroe 2019-10-23Track channels and sync ISUPPORTJune McEnroe 2019-10-23Track nick changesJune McEnroe 2019-10-23Rename Command to MessageJune McEnroe 2019-10-23Synchronize state after client registrationJune McEnroe 2019-10-23Send to server if client has no needsJune McEnroe 2019-10-23Implement some amount of client connectionJune McEnroe 2019-10-23Set clients non-blockingJune McEnroe 2019-10-23Clean up state.c and factor out parsingJune McEnroe 2019-10-23Respond to pingsJune McEnroe 2019-10-23Add verbose flagJune McEnroe 2019-10-23Set NOSIGPIPE on server connectionJune McEnroe 2019-10-23Set an initial loop capJune McEnroe 2019-10-23Fix rest parsingJune McEnroe 2019-10-23Add dynamic poll listJune McEnroe 2019-10-23Don't assume commands have targets and handle ERRORJune McEnroe 2019-10-23Clean up state somewhatJune McEnroe 2019-10-23Actually send the buffer...June McEnroe 2019-10-23Add stateJune McEnroe