powerline improvements

This commit is contained in:
Sean Buckley 2020-09-25 19:30:24 -04:00
parent 29b5f72080
commit c86ad3041e
3 changed files with 29 additions and 4 deletions

View file

@ -46,6 +46,9 @@
'') '')
]; ];
environment.variables.PLGO_HOSTNAMEFG = "0";
environment.variables.PLGO_HOSTNAMEBG = "114";
programs.bash.interactiveShellInit = '' programs.bash.interactiveShellInit = ''
stty -ixon stty -ixon
echo $XDG_SESSION_TYPE echo $XDG_SESSION_TYPE
@ -58,12 +61,12 @@
' '
function _update_ps1() { function _update_ps1() {
PS1="\n$(${pkgs.powerline-go}/bin/powerline-go \ PS1="\n$(${pkgs.callPackage ../pkgs/powerline-go-updated { }}/bin/powerline-go \
-mode=flat \ -mode=flat \
-colorize-hostname \ -colorize-hostname \
-cwd-mode=dironly \ -cwd-mode=dironly \
-modules=user,host,cwd,nix-shell,git,jobs \ -modules=user,host,cwd,nix-shell,git,jobs \
# -git-assume-unchanged-size 0 \ -git-assume-unchanged-size 0 \
)$ " )$ "
} }
PROMPT_COMMAND="_update_ps1; $PROMPT_COMMAND" PROMPT_COMMAND="_update_ps1; $PROMPT_COMMAND"

View file

@ -43,7 +43,5 @@
opengl.driSupport32Bit = true; opengl.driSupport32Bit = true;
}; };
fonts.fonts = [ pkgs.powerline-fonts ];
boot.loader.timeout = null; boot.loader.timeout = null;
} }

View file

@ -0,0 +1,24 @@
{ stdenv, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
pname = "powerline-go";
version = "1.17.0";
src = fetchFromGitHub {
owner = "justjanne";
repo = pname;
rev = "d520fde89ba2d3d13d27e345e99aa23c958ac2dd";
sha256 = "0g0rnx7czhfs9vw9qmrzf7qz9g8f8agslv6k353dl8l83c1inisr";
};
vendorSha256 = "0dkgp9vlb76la0j439w0rb548qg5v8648zryk3rqgfhd4qywlk11";
doCheck = false;
meta = with stdenv.lib; {
description = "A Powerline like prompt for Bash, ZSH and Fish";
license = licenses.gpl3;
platforms = platforms.unix;
maintainers = with maintainers; [ sifmelcara ];
};
}