How can I find out if Vim is executed in a login shell? I use the molokai theme for vim which provides really nice colors when I use GVim or a run vim in gnome-terminal, but I tried it in a login shell (after pressing Ctrl + Alt + F1) and it doesn’t look good. What I want to do is to change the theme if I am in a session like this. The vim t_Co variable isn’t useful as in both cases the terminal is reporting 256 colors.
Share
I’ve used this in the past: