diff options
| -rw-r--r-- | bashrc.d/prompt | 2 | ||||
| -rw-r--r-- | shellrc.d/alias | 4 | ||||
| -rw-r--r-- | shellrc.d/dev | 9 | ||||
| -rw-r--r-- | shellrc.d/git | 1 | ||||
| -rw-r--r-- | zshrc.d/prompt | 2 |
5 files changed, 14 insertions, 4 deletions
diff --git a/bashrc.d/prompt b/bashrc.d/prompt index b039243..5acf584 100644 --- a/bashrc.d/prompt +++ b/bashrc.d/prompt @@ -3,7 +3,7 @@ PS1='$( if [ "$(id -u)" -eq "0" ]; then echo -n "\[\e[1;31m\]\u@\h:\[\e[1;34m\]\W\[\e[1;31m\]\$\[\e[0m\] " -elif [ -n "${IN_NIX_SHELL}" ]; then +elif [ -n "${IN_NIX_SHELL}${GUIX_ENVIRONMENT}" ]; then echo -n "\[\e[1;33m\]\u@\h:\[\e[1;34m\]\W\[\e[1;33m\]\$\[\e[0m\] " else echo -n "\[\e[1;32m\]\u@\h:\[\e[1;34m\]\W\[\e[1;32m\]\$\[\e[0m\] " diff --git a/shellrc.d/alias b/shellrc.d/alias index c84c83a..83acb00 100644 --- a/shellrc.d/alias +++ b/shellrc.d/alias @@ -5,6 +5,7 @@ alias ll='ls -lh' alias df='df -h' alias du='du -h' alias grep='grep --color=auto' +alias info='info --vi-keys' alias ip='ip -c' alias gdb='gdb -q' alias cgdb='cgdb -q' @@ -29,6 +30,9 @@ if pidof systemd >/dev/null 2>/dev/null; then alias jrn='journalctl' alias ujrn='jrn --user' fi +if pidof systemd-networkd >/dev/null 2>/dev/null; then + alias nctl='sudo networkctl' +fi if command -v sdcv 2>/dev/null >&2; then alias sdcv='sdcv -c' diff --git a/shellrc.d/dev b/shellrc.d/dev index 74d692b..c394a8a 100644 --- a/shellrc.d/dev +++ b/shellrc.d/dev @@ -61,6 +61,11 @@ if command -v bear >/dev/null; then bear --output build/compile_commands.json --append -- make "$@" } + bmmake() { + mkdir -p build + bear --output build/compile_commands.json --append -- make "-j$(($(nproc) * 2))" "-l$(nproc)" "$@" + } + alias mbmake='bmake -j$(($(nproc) * 2)) -l$(nproc)' fi @@ -75,11 +80,11 @@ nvim_config() ( if command -v nix 2>/dev/null >&2; then nrun() { - nix run . -- "$@" + nix run .?submodules=1# -- "$@" } nrun_() { local package="$1" shift - nix run ".#$package" -- "$@" + nix run ".?submodules=1#$package" -- "$@" } fi diff --git a/shellrc.d/git b/shellrc.d/git index 15b949a..18b3b79 100644 --- a/shellrc.d/git +++ b/shellrc.d/git @@ -47,6 +47,7 @@ gitbmerge() ( fi git merge --ff-only "$branch" \ && git push \ + && sleep 1 \ && git branch -d "$branch" \ && { if [ -n "$upstream" ]; then git push origin :"$branch"; fi; } ) diff --git a/zshrc.d/prompt b/zshrc.d/prompt index b2e155b..77276c1 100644 --- a/zshrc.d/prompt +++ b/zshrc.d/prompt @@ -5,7 +5,7 @@ command -v prompt >/dev/null && prompt off if [ "$UID" -eq 0 ]; then NCOLOR="red" -elif [ -n "$IN_NIX_SHELL" ]; then +elif [ -n "${IN_NIX_SHELL}${GUIX_ENVIRONMENT}" ]; then NCOLOR="yellow" else NCOLOR="green" |
