Krolyxon
Commit 3235e63

Branches

Refs →

aurora.configshellaliasrc

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