Sign in to follow this  
Followers 0

Bash Alias to Rename a Terminal Window

1 post in this topic



I wanted a quick command to rename `st` (Suckless Terminal) windows in i3wm since sometimes I have a lot of them open at once, tiled all over the screen. Here's what I came up with:

# 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" ]
	alias rename-window='xdotool selectwindow set_window --name'
	alias rename-window='echo "xdotool not found"'



Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
Followers 0