Wednesday, January 31, 2018

Dynamically naming Konsole tabs

So at work I use Fedora 27, and I administer quite a number of Linux servers.. So since I run the Plasma desktop environment (DE) I use the terminal emulator Konsole.  The Konsole window uses tabs.. much like modern internet browsers to help you multitask instead multiple full windows.

So anyway when you open Konsole the opening tab is named with, by default, username and current directory. If you SSH into a remote host the tab name changes to username and remote host.. which is very cool.  However if you further SSH into another host from the first the tab name remains the same as it was.  Which.. for me anyway leads to mass confusion if you have more than a couple tabs open.

So one of the fine folks in teh Fedora User mailing list tossed me a bone today.. I inquired about being able to change the tab name based on remote hostname past the first remote host.  Here's what he gave me:

    chpwd() {
        [[ -t 1 ]] || return
        case $TERM in
            sun-cmd) print -Pn "\e]l%~\e\\"
            ;;
            *xterm*|rxvt|(dt|k|E)term) print -Pn "\e]2;[%m] %~\a"
            ;;
            vt220) print -Pn "\e]2;[%m] %~\a"
            ;;
        esac
    }

    chpwd


So.. I'll admit that I do not quite understand the % or print syntax as of yet.. however adding this tidbit to the end of my .zshrc file then within Konsole changing the tab and remote tab fields to %w did exactly what I wanted to do and more.
The more part meaning that now my tab names also include the username@hostname but also the full path where I am at currently in that remote host.  Honestly its too much info for a small pane.  But it's a damned fine start!


Friday, January 19, 2018

So it's been a while..

Been quite a while, actually, since my last post. Been busier than ever really, with work and home stuff and doing all I can to get out and enjoy Montana.

Back during the summer and fall I try to get out and hike once a week.. whether its Mt. Helena or just out in the woods around the Wickes mine.   Also got to hunt this year, which is always a good time.  Got my first Montana whitetail this year too! (or well technically last year but yeah)



Driving down an unnamed road, because yeah like I'm going to give out my secret hunting spots.. A truck leaving a driveway had the passenger hanging out of the window pointing up and across the road.  I swivel my head to see this big 8 point standing there looking all majestic like.  So TL;DR I was able to sneak within 50 yards and popped him.  Single shot, through and through lungs. He ran maybe 20 yards and fell. The last day of season, the last 20 minutes of daylight :)

Sadly though I did not get to get him with a new scope I got for christmas:



A no-name Amazon purchase, 6-24x52mm.. you can really reach out and see your target.  Mounted on the Ruger American LH bolt-action in a stainless 30-06 package, it was the All Weather model.  And being perfectly honest, I went for the stainless after seeing Glenn Villenue on Life Below Zero's rifle.

Anyway I do have some pictures to post here from the places I've hiked thus far.. so damn beautiful here.  I love it.