Compare commits
No commits in common. "6b501030e58bc15036b7c28e42f31cdfd7b411e2" and "68b9ec4a18a7821e1f1f31c82e45a5604f42171d" have entirely different histories.
6b501030e5
...
68b9ec4a18
2 changed files with 14 additions and 11 deletions
|
|
@ -1,3 +1,8 @@
|
||||||
|
# set a fancy prompt (non-color, unless we know we "want" color)
|
||||||
|
case "$TERM" in
|
||||||
|
xterm-color|*-256color) color_prompt=yes;;
|
||||||
|
esac
|
||||||
|
|
||||||
function __set_prompt() {
|
function __set_prompt() {
|
||||||
local branch
|
local branch
|
||||||
branch=$(git branch --show-current 2>/dev/null)
|
branch=$(git branch --show-current 2>/dev/null)
|
||||||
|
|
@ -18,6 +23,12 @@ function __set_prompt() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
PROMPT_COMMAND=__set_prompt
|
if [ "$color_prompt" = yes ]; then
|
||||||
|
PROMPT_COMMAND=__set_prompt
|
||||||
|
else
|
||||||
|
PS1='\w\$ '
|
||||||
|
fi
|
||||||
|
|
||||||
|
unset color_prompt
|
||||||
|
|
||||||
printf '\033[3 q'
|
printf '\033[3 q'
|
||||||
|
|
|
||||||
12
home.nix
12
home.nix
|
|
@ -41,7 +41,7 @@
|
||||||
colors.primary.background = "#000000";
|
colors.primary.background = "#000000";
|
||||||
font.size = 11;
|
font.size = 11;
|
||||||
terminal.shell = {
|
terminal.shell = {
|
||||||
program = "${pkgs.bash}/bin/bash";
|
program = "/bin/bash";
|
||||||
args = [ "-l" "-c" "tmux attach || tmux" ];
|
args = [ "-l" "-c" "tmux attach || tmux" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
@ -110,19 +110,11 @@
|
||||||
#############################################################################
|
#############################################################################
|
||||||
programs.bash = {
|
programs.bash = {
|
||||||
enable = true;
|
enable = true;
|
||||||
initExtra = builtins.readFile ./dotfiles/bash_prompt + ''
|
initExtra = builtins.readFile ./dotfiles/bash_prompt;
|
||||||
|
|
||||||
function gcam() { git commit -a -m "$1"; }
|
|
||||||
function dt() { nohup "$@" </dev/null >/dev/null 2>&1 & disown; }
|
|
||||||
function mkcdir() { mkdir "$1" && cd "$1"; }
|
|
||||||
function csa() { cd $1 && ls -a; }
|
|
||||||
function cs() { cd $1 && ls; }
|
|
||||||
'';
|
|
||||||
shellAliases = {
|
shellAliases = {
|
||||||
c = "clear";
|
c = "clear";
|
||||||
gm = "git checkout master && git pull";
|
gm = "git checkout master && git pull";
|
||||||
count = "ls -1 | wc -l";
|
count = "ls -1 | wc -l";
|
||||||
nrs = "sudo nixos-rebuild switch --flake . --impure";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue