Skip to content

Instantly share code, notes, and snippets.

@chapmajs
Created July 21, 2016 02:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chapmajs/44d1d064d70b34432ccdc006f80f55c1 to your computer and use it in GitHub Desktop.
Save chapmajs/44d1d064d70b34432ccdc006f80f55c1 to your computer and use it in GitHub Desktop.
rename-window command for X11
# I added this snippet to my .bashrc to give me a `rename-window` command when
# using a terminal (`st`, in my case). Invoke as:
#
# `rename-window "the name you desire"`
#
# If you don't have `xdotool` then we alias an echo so we'll know it's not there.
which xdotool >/dev/null 2>&1
if [ "$?" = "0" ]
then
alias rename-window='xdotool selectwindow set_window --name'
else
alias rename-window='echo "xdotool not found"'
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment