home-config/bashrc

4b0f0837a7d25e3b84dc3d75f8c51866ac2fcf14 · 2.0 KB · 54 lines raw

1 # Bash initialization for interactive non-login shells and
2 # for remote shells (info "(bash) Bash Startup Files").
3
4 # Export 'SHELL' to child processes. Programs such as 'screen'
5 # honor it and otherwise use /bin/sh.
6 export SHELL
7
8 if [[ $- != *i* ]]
9 then
10 # We are being invoked from a non-interactive shell. If this
11 # is an SSH session (as in "ssh host command"), source
12 # /etc/profile so we get PATH and other essential variables.
13 [[ -n "$SSH_CLIENT" ]] && source /etc/profile
14
15 # Don't do anything else.
16 return
17 fi
18
19 # Source the system-wide file.
20 source /etc/bashrc
21
22 # Activate vim mode >:)
23 set -o vi
24 set show-mode-in-prompt on
25
26 # Adjust the prompt depending on whether we're in 'guix environment'.
27 if [ -n "$GUIX_ENVIRONMENT" ]
28 then
29 PS1='\u@\h \w [env]\$ '
30 else
31 PS1='\u@\h \w\$ '
32 fi
33 alias ls='ls -p --color=auto'
34 alias ll='ls -l'
35 alias grep='grep --color=auto'
36
37 # Ryan's custom stuff
38 alias quit='exit'
39 export EDITOR=nvim
40 alias cat='bat --paging=never'
41 alias ds='sudo -E guix system -L ~/.config/guix/modules reconfigure ~/.config/guix/$(hostname).scm'
42 alias dh='guix home -L ~/.config/guix/modules reconfigure ~/.config/guix/home-config/home-configuration.scm && home-manager switch'
43 alias gc='git -C ~/.config/guix add . && git -C ~/.config/guix commit && git -C ~/.config/guix push all && curl --fail-early --connect-timeout 2 -d "Guix repo updated, re-deploy!" https://ntfy.in.rschanz.org/guix_deployments'
44 alias cg='git -C ~/.config/guix pull'
45 alias cgh='git -C ~/.config/guix pull stationeryh main'
46 alias gencs="awk 'BEGIN {print \"# Crib Sheet\"} /<!-- START CS -->/,/<!-- END CS -->/ {if (! /<!-- START CS -->/ && ! /<!-- END CS -->/) print; if (/<!-- END CS -->/) print \"\"}' notes.mkd | pandoc -f gfm -t pdf | zathura -"
47 export XDG_DATA_DIRS=$XDG_DATA_DIRS:/var/lib/flatpak/exports/share:/home/ryan/.local/share/flatpak/exports/share
48
49 # GPG SETUP FOR SSH
50 #export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
51 #gpgconf --launch gpg-agent
52 export GPG_TTY=$(tty)
53
54 eval "$(zoxide init bash)"