why would you write an own script to sanitize your history manually? that sounds crazy, you can disallow duplicates and blacklist specific commands using normal shell configuration...
This exactly. I honestly don't quite get the need for a terminal multiplexer inside a tiling window manager. I also get along with ctrl-Z + fg for 'detaching'.