Compare commits

..

3 commits

2 changed files with 11 additions and 14 deletions

View file

@ -1,8 +1,3 @@
# 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)
@ -23,12 +18,6 @@ function __set_prompt() {
fi fi
} }
if [ "$color_prompt" = yes ]; then
PROMPT_COMMAND=__set_prompt PROMPT_COMMAND=__set_prompt
else
PS1='\w\$ '
fi
unset color_prompt
printf '\033[3 q' printf '\033[3 q'

View file

@ -41,7 +41,7 @@
colors.primary.background = "#000000"; colors.primary.background = "#000000";
font.size = 11; font.size = 11;
terminal.shell = { terminal.shell = {
program = "/bin/bash"; program = "${pkgs.bash}/bin/bash";
args = [ "-l" "-c" "tmux attach || tmux" ]; args = [ "-l" "-c" "tmux attach || tmux" ];
}; };
}; };
@ -110,11 +110,19 @@
############################################################################# #############################################################################
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";
}; };
}; };