Krolyxon
Commit dfc725a

Branches

Refs →

aurora.configshellaliasrc

59 lines · 1.8 KB · Bourne Again Shell (bash)

1#!/bin/sh
2
3# Use neovim for vim if present
4[ -x "$(command -v nvim)" ] && alias vim="nvim" vimdiff="nvim -d"
5
6alias \
7 ls='ls -hN --group-directories-first --color=auto' \
8 lsa='ls -lAhN --group-directories-first --color=auto' \
9 nb="newsboat" \
10 sxiv="nsxiv" \
11 hst="history 1 -1 | cut -c 8- | sort | uniq | fzf | tr -d '\n' | wl-copy" \
12
13# Verbosity and settings that you pretty much just always are going to want.
14alias \
15 cp="cp -iv" \
16 mv="mv -iv" \
17 rm="rm -vI" \
18 yt="yt-dlp --embed-metadata -i -o '%(title)s.%(ext)s'" \
19 yta="yt -x -f bestaudio/best" \
20 ytbdl="yt-dlp -f bestvideo+bestaudio -o '%(title)s.%(ext)s' --external-downloader=aria2c" \
21 ytdl="yt-dlp -f best -o '%(title)s.%(ext)s' --external-downloader=aria2c" \
22 tsm="transmission-remote" \
23 tsmd="transmission-daemon"
24
25 # yt="yt-dlp --embed-metadata -i -o '%(title)s.%(ext)s' --external-downloader=aria2c" \
26
27alias on="tmux new-session -s notes -c ~/dox/brain 'nvim .'"
28alias todo="nvim ~/dox/brain/Todo.md"
29
30# Colorize commands when possible.
31alias \
32 grep="grep --color=auto" \
33 diff="diff --color=auto" \
34 ip="ip -color=auto"
35
36
37# git aliases
38alias \
39 ga='git add' \
40 gc='git commit' \
41 gp='git push' \
42 gC='git clone'
43
44ec() {find ~/.config \( -type f -o -type l \) | fzf | xargs -r $EDITOR}
45es() { cd ~/.local/bin; $EDITOR $(fzf) ;}
46ef() {fzf | xargs -r -I % $EDITOR % ;}
47of() {fzf | xargs -r -I % xdg-open % ; }
48colors() {
49 for COLOR in {1..255}; do
50 echo -en "\e[38;5;${COLOR}m"
51 echo -n "${COLOR} "
52 done
53 echo
54}
55# movie() {
56# filename="$(find ~/movies/ -type f -regex ".*\.\(mkv\|mp4\|mpeg\|avi\|mov\|webm\)" -printf "%f\n" | fzf)"
57# filepath="$(find ~/movies/ -type f -regex ".*\.\(mkv\|mp4\|mpeg\|avi\|mov\|webm\)")"
58# mpv "$(grep "$filename" <<< "$filepath")"
59# }