- Save the two files below. I put them in '~/.scripts'
- Modify the configuration in konsole-watcher.sh to your liking
- Modify the location of konsole-watcher.sh in konsole-watcher-autostart.sh if you chose to put it somewhere besides ~/.scripts
- Create the directory ~/.konsole (or other location you chose for the save file)
- Create a symlink to konsole-watcher-autostart.sh in '~/.config/autostart-scripts
- or open System Settings > Startup and Shutdown and add a script to the Script Files (it does the same thing as creating the symlink)
- You might want to add a menu entry as well in case KDE autostart doesn't work for some reason
- Automatically saves your current Konsole sessions with their working directories every 15 seconds (or other default you set)
- Automatically starts Konsole when you log in with tabs for each or the sessions you had open previously
Updated konsole-watcher.sh so it doesn't overwrite the file when there are no konsole sessions running and added a date to the file comment.