bash - determining directory and its path in focused window (linux) -
so design quite few webpages , quite annoyed time construct default head title body tags etc, , have general templates , wondering how create script in bash 1. determine directory open in focused window , 2. copy whichever template template directory have made if want blank php file basic html tags or html file basic required tags can copied on effortlessly simple shortcut can map. i know how in except determining directory of open file window(the gui not terminal) , haven't had luck googling idea, appreciated you can tty of window, , use send command. i've heard of tool called "ttyecho" though i've never used it, supposedly can used send command different pty (another window).