dotfiles/.config/fish/config.fish

73 lines
1.9 KiB
Fish
Raw Permalink Normal View History

2021-05-28 11:29:20 +02:00
set fish_greeting ''
2020-04-24 14:57:16 +02:00
#set -x XDG_CURRENT_DESKTOP=kde
if test ! $DISPLAY && test $XDG_VTNR -eq 1
exec startx
end
# LANG
set -x LANG en_US.UTF-8
# PATH
2021-05-28 11:29:20 +02:00
#set -x PATH "$PATH:"(ruby -e 'puts Gem.user_dir')"/bin" # Ruby
2020-04-24 14:57:16 +02:00
set -x PATH "$PATH:$HOME/.composer/vendor/bin" # Composer
set -x PATH "$HOME/dev/android/platform-tools:$HOME/dev/android/bin:$PATH" # Android platform tools
set -x PATH "$PATH:$HOME/.rvm/bin" # Ruby rvm
2021-05-28 11:29:20 +02:00
set -x PATH "$HOME/.node_modules/bin:$PATH"
set -x PATH "node_modules/.bin:$PATH"
set -x npm_config_prefix ~/.node_modules
set -x NODE_PATH ~/.node_modules/lib/node_modules
2020-04-24 14:57:16 +02:00
# Editor
set -x EDITOR micro
set -x VISUAL $EDITOR
## Aliases ##
2021-05-28 11:29:20 +02:00
alias l='ls -la --group-directories-first'
2020-04-24 14:57:16 +02:00
alias dotgit='git --git-dir=$HOME/dotfiles/ --work-tree=$HOME'
alias syslog="sudo journalctl -f | ccze -A"
function journal -w 'systemctl status'
journalctl -f -u $argv | ccze -A
end
alias nano=micro
# Random chars
function rndanchars
openssl rand -base64 $1 | sed ':a;N;$!ba;s/\n//g' | sed 's/[+\/=]//g' | head -c $1
end
# FFMPEG
function convert-tomov
ffmpeg -i "$1" -c:v dnxhd -c:a pcm_s24le -profile:v dnxhr_hq "$2"
end
function convert-tomp4
ffmpeg -i "$1" -q:v 1 -q:a 1 -c:v libx264 -pix_fmt yuv420p -profile:v high -movflags faststart -c:a aac -ar 48000 -b:a 384000 "$2"
end
function convert-todavinci
2021-05-28 11:29:20 +02:00
echo "> $argv[2].davinci.mov"
set rate ""
set args $argv[3..-1]
if test $argv[3] = "-r"
set rate -r $argv[4]
set args $argv[5..-1]
end
ffmpeg $rate -i "$argv[1]" $args -q:v 1 -q:a 1 -map 0 -c:v mpeg4 -c:a pcm_s24le "$argv[2].davinci.mov"
2020-04-24 14:57:16 +02:00
end
# Example: `pngs-to-mov "%04d" 60 render` renders images with format 0000.png at 60 fps to render.mov
function pngs-to-mov
ffmpeg -r $2 -i "$1.png" -c:v qtrle "$3.mov"
end
function convert-toformat-simple
ffmpeg -i "$1" -q:v 1 -q:a 0 -map 0 -c:v libx265 -c:a copy -c:s copy "$2"
end