diff --git a/zshrc.org b/zshrc.org index 498cf07..624a430 100644 --- a/zshrc.org +++ b/zshrc.org @@ -110,6 +110,30 @@ Each environment has slightly different setups, which will be tangled to differe } #+end_src *** konsole helpers + #+begin_src sh + function set-terminal-title() { + echo -en "\e]2;$@\a" + } + + function get-konsole-title() { + qdbus "${KONSOLE_DBUS_SERVICE}" "${KONSOLE_DBUS_SESSION}" tabTitleFormat 0 + } + + function set-konsole-title() { + qdbus "${KONSOLE_DBUS_SERVICE}" "${KONSOLE_DBUS_SESSION}" setTabTitleFormat 0 $1 + } + + function set-konsole-pomo-title() { + previous_title=$(get-konsole-title) + set-konsole-title "pomodoro + "; + } + + function restore-konsole-title() { + set-konsole-title ${previous_title} + } + + #+end_src *** emacs helpers #+begin_src sh :tangle ".zshrc"