Skip to content

Instantly share code, notes, and snippets.

@louwers
Last active February 6, 2016 13:27
Show Gist options
  • Save louwers/f73c5ad6774a282127cb to your computer and use it in GitHub Desktop.
Save louwers/f73c5ad6774a282127cb to your computer and use it in GitHub Desktop.
Clear terminal screen Erlang or Elixir with Ctrl+L
# Sets terminal window title until it is overwritten by $PROMPT_COMMAND (when erl is done).
function erl {
echo -ne "\033]0;erl\007"
/usr/bin/erl "$@"
}

For those who like their Terminal screens clean.

Requirements:

This is just a quick and dirty solution to something that bothered me.

#!/usr/bin/env bash
if [ "$(xdotool search --name --onlyvisible erl)" = "$(xdotool getactivewindow)" ]; then
xdotool type --clearmodifiers 'io:format("\e[H\e[J").'
xdotool key Return
fi
ctrl + ~l
~/.config/sxhkd/scripts/clearerl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment