Krolyxon
Commit 5445e7b

Branches

Refs →

dotfiles-x11.configshellaliasrc

58 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 dots='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME' \
10 lf="lfub" \
11 nb="newsboat" \
12 sxiv="nsxiv" \
13 hst="history 1 -1 | cut -c 8- | sort | uniq | fzf | tr -d '\n' | xclip -sel c" \
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="cd ~/dox/brain; nvim ."
30
31# Colorize commands when possible.
32alias \
33 grep="grep --color=auto" \
34 diff="diff --color=auto" \
35 ip="ip -color=auto"
36
37
38# git aliases
39alias \
40 ga='git add' \
41 gc='git commit' \
42 gp='git push'
43
44ec() {find ~/.config -type f | fzf | xargs -r $EDITOR ;}
45es() { cd ~/.local/bin; $EDITOR $(fzf) ;}
46ef() {fzf | xargs -r -I % $EDITOR % ;}
47colors() {
48 for COLOR in {1..255}; do
49 echo -en "\e[38;5;${COLOR}m"
50 echo -n "${COLOR} "
51 done
52 echo
53}
54# movie() {
55# filename="$(find ~/movies/ -type f -regex ".*\.\(mkv\|mp4\|mpeg\|avi\|mov\|webm\)" -printf "%f\n" | fzf)"
56# filepath="$(find ~/movies/ -type f -regex ".*\.\(mkv\|mp4\|mpeg\|avi\|mov\|webm\)")"
57# mpv "$(grep "$filename" <<< "$filepath")"
58# }