mirror of
https://github.com/buckley310/nixos-config.git
synced 2024-12-21 19:24:15 +00:00
remove powerline options
This commit is contained in:
parent
9899935183
commit
1b8574600c
2 changed files with 19 additions and 37 deletions
|
@ -5,8 +5,6 @@
|
||||||
./powerline.nix
|
./powerline.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
sconfig.powerline.enable = lib.mkDefault true;
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
dnsutils
|
dnsutils
|
||||||
du-dust
|
du-dust
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
{ config, pkgs, lib, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
let
|
let
|
||||||
|
|
||||||
cfg = config.sconfig.powerline;
|
|
||||||
|
|
||||||
theme = pkgs.writeText "powerline.json" (builtins.toJSON
|
theme = pkgs.writeText "powerline.json" (builtins.toJSON
|
||||||
{
|
{
|
||||||
BoldForeground = true;
|
BoldForeground = true;
|
||||||
|
@ -12,28 +10,16 @@ let
|
||||||
SeparatorFg = 16;
|
SeparatorFg = 16;
|
||||||
});
|
});
|
||||||
|
|
||||||
in
|
args = [
|
||||||
{
|
|
||||||
options.sconfig.powerline =
|
|
||||||
{
|
|
||||||
enable = lib.mkOption {
|
|
||||||
type = lib.types.bool;
|
|
||||||
default = true;
|
|
||||||
};
|
|
||||||
args = lib.mkOption {
|
|
||||||
type = lib.types.listOf lib.types.str;
|
|
||||||
default = [
|
|
||||||
"-modules=\${remote:+'user,host,'}nix-shell,git,jobs,cwd"
|
"-modules=\${remote:+'user,host,'}nix-shell,git,jobs,cwd"
|
||||||
"-git-assume-unchanged-size 0"
|
"-git-assume-unchanged-size 0"
|
||||||
"-theme ${theme}"
|
"-theme ${theme}"
|
||||||
"-path-aliases '~/git=~/git'"
|
"-path-aliases '~/git=~/git'"
|
||||||
"-jobs $(jobs -p | wc -l)"
|
"-jobs $(jobs -p | wc -l)"
|
||||||
];
|
];
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
|
||||||
|
|
||||||
|
in
|
||||||
|
{
|
||||||
environment.systemPackages = [ pkgs.powerline-go ];
|
environment.systemPackages = [ pkgs.powerline-go ];
|
||||||
|
|
||||||
programs.bash.interactiveShellInit = ''
|
programs.bash.interactiveShellInit = ''
|
||||||
|
@ -41,10 +27,8 @@ in
|
||||||
local remote=y
|
local remote=y
|
||||||
[ "$XDG_SESSION_TYPE" = "x11" ] && unset remote
|
[ "$XDG_SESSION_TYPE" = "x11" ] && unset remote
|
||||||
[ "$XDG_SESSION_TYPE" = "wayland" ] && unset remote
|
[ "$XDG_SESSION_TYPE" = "wayland" ] && unset remote
|
||||||
PS1="$(powerline-go ${toString cfg.args})"
|
PS1="$(powerline-go ${toString args})"
|
||||||
}
|
}
|
||||||
[ "$TERM" = "linux" ] || PROMPT_COMMAND="_update_ps1; $PROMPT_COMMAND"
|
[ "$TERM" = "linux" ] || PROMPT_COMMAND="_update_ps1; $PROMPT_COMMAND"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue