[Feature] Module for screen session
andrzejnovak opened this issue Β· comments
It would be very convenient to have :)
I have not tested this fully, but you can use the STY
environment variable for this where the screen session name/id is stored.
function _update_ps1() {
PS1="$($GOPATH/bin/powerline-go -error $? -jobs $(jobs -p | wc -l) \
-cwd-mode plain \
-colorize-hostname \
-numeric-exit-codes \
-shell-var STY \
-shell-var-no-warn-empty \
-modules time,venv,user,host,shell-var,cwd,perms,git,hg,jobs,exit )"
}
-shell-var STY
displays the screen session name/id-shell-var-no-warn-empty
does show nothing if the variable does not exist-modules [..] shell-var
includes the variable in the output
Without screen:
see: #276
Inside a screen session:
@CWempe I've put a PR for this some time back, but nice to know it could also be solved without. The one downside for me is that including both id and name is fairly long
I agree. A dedicated module would be best.
I do not like the bright yellow either. π
Maybe you could add an option to your PR to show/hide the id?
I barely use screen, but maybe it would make sense for some users to also see the id if there are multiple screen sessions with the same name.
I don't know if anybody would need this. π
Can you pass options to modules or would it have to be a separate module?
Admittedly I don't know if anyone uses screen with just the number id's,
Can you pass options to modules or would it have to be a separate module?
I don't know. I assumed so. π
Aren't there other powerline-go arguments that are specific to modules?
Admittedly I don't know if anyone uses screen with just the number id's,
No, but there might be cases where there are two sessions named1234.test
and5678.test
.
So you would need the id to differentiate there sessions.
But maybe nobody cares.
You can still implement this after somebody asks for this feature. π