2024-03-18 10:26:41 -05:00
|
|
|
# Stuff be used in init for any shell
|
|
|
|
|
|
|
|
# docker/podman stuff
|
2023-10-12 09:59:07 -05:00
|
|
|
#alias docker="sudo docker"
|
2024-03-18 10:26:41 -05:00
|
|
|
alias docker="podman"
|
|
|
|
alias dcompose="docker compose up -d --remove-orphans"
|
|
|
|
alias ddu="docker compose down && dcompose"
|
2023-10-12 09:59:07 -05:00
|
|
|
alias adb="sudo adb" # Needed on Fedora, not on Debian, IDK about other distros
|
|
|
|
|
2023-10-08 22:26:07 -05:00
|
|
|
alias ls="ls --color=auto -CF"
|
|
|
|
alias ll="ls -l"
|
|
|
|
alias la="ls -a"
|
2023-11-20 00:48:36 -06:00
|
|
|
|
2024-03-18 10:26:41 -05:00
|
|
|
# kitty stuff
|
2023-11-20 00:48:36 -06:00
|
|
|
alias icat="kitten icat"
|
2024-03-18 10:26:41 -05:00
|
|
|
alias s="kitten ssh"
|
2024-03-06 20:18:13 -06:00
|
|
|
|
2024-03-18 10:26:41 -05:00
|
|
|
# NixOS
|
2024-03-07 12:00:47 -06:00
|
|
|
alias nrs="sudo NIXPKGS_ALLOW_INSECURE=1 nixos-rebuild switch --upgrade-all"
|
|
|
|
alias nrb="sudo NIXPKGS_ALLOW_INSECURE=1 nixos-rebuild build --upgrade-all"
|
|
|
|
alias nrs-rb="sudo NIXPKGS_ALLOW_INSECURE=1 nixos-rebuild switch --upgrade-all --rollback"
|
|
|
|
alias nrb-rb="sudo NIXPKGS_ALLOW_INSECURE=1 nixos-rebuild build --upgrade-all --rollback"
|
|
|
|
alias hms="NIXPKGS_ALLOW_INSECURE=1 home-manager switch"
|
|
|
|
alias hmb="NIXPKGS_ALLOW_INSECURE=1 home-manager build"
|
2024-03-18 10:26:41 -05:00
|
|
|
|
2024-03-18 18:40:51 -05:00
|
|
|
|
|
|
|
|
2024-03-18 10:26:41 -05:00
|
|
|
# git
|
|
|
|
alias git-us="git submodule update --init --recursive"
|
2024-03-18 18:40:51 -05:00
|
|
|
|
|
|
|
# switch between SSH and HTTPS remotes
|
|
|
|
alias git-remote-switch="python3 -c \"import subprocess
|
|
|
|
|
|
|
|
remote = subprocess.getoutput('git branch -vv')
|
|
|
|
remote = remote[remote.find('[') + 1 : remote.find('/')]
|
|
|
|
old_url = subprocess.getoutput(f'git remote get-url {remote}')
|
|
|
|
|
|
|
|
if old_url.startswith('https://'):
|
|
|
|
new_url = old_url[8:]
|
|
|
|
new_url = new_url[: new_url.find('/')] + ':' + new_url[new_url.find('/') + 1 :]
|
|
|
|
new_url = f'git@{new_url}'
|
|
|
|
else:
|
|
|
|
new_url = old_url[4:]
|
|
|
|
new_url = new_url.replace(':', '/')
|
|
|
|
new_url = f'https://{new_url}'
|
|
|
|
|
|
|
|
exit(subprocess.getstatusoutput(f'git remote set-url {remote} {new_url}')[0])\""
|