#!/bin/bash # # ~/.bash_aliases # # Better defaults alias ls="ls -hvF --group-directories --color=auto" alias rm="rm -iv" # # NEW COMMANDS # command -v eza &>/dev/null && alias ls="eza --group-directories-first" # file tree command -v tree &>/dev/null && alias tree="tree --dirsfirst" # ascii text command -v figlet &>/dev/null && alias ascii="figlet -f standard" # pdf command -v zathura &>/dev/null && alias pdf="zathura" # dictionary command -v sdcv &>/dev/null && alias dict="sdcv" # image viewer command -v swayimg &>/dev/null && alias img="swayimg" # keys command -v xkbcli &>/dev/null && alias keys="xkbcli interactive-wayland" # Git if command -v git &>/dev/null; then alias gs="git status" alias gl="git log" alias gll="git log --all" alias gd="git diff" alias gds="git diff --staged" alias gu="git add --update" fi # tmux if comand -v tmux &>/dev/null; then function tmux() { if [ "$#" -eq 0 ]; then command tmux new-session -s "TMUX" else command tmux "$@" fi } fi # podman if command -v podman &>/dev/null; then alias pd="podman" alias pdi="podman images ls" fi # ssh if command -v ssh-agent &>/dev/null; then function ssh-on() { ssh-agent -k &>/dev/null eval $(ssh-agent) [ "$#" -eq 0 ] && duration=0 ssh-add -t "$duration" } function ssh-off() { ssh-agent -k } fi