2023-05-01 09:48:31 +02:00
|
|
|
{ config, ... }:
|
|
|
|
|
|
|
|
{
|
|
|
|
programs.fish = {
|
|
|
|
enable = true;
|
2023-05-07 13:10:24 +02:00
|
|
|
interactiveShellInit =
|
|
|
|
(builtins.readFile ./config/fish/conf.d/interactive.fish);
|
2023-05-01 09:48:31 +02:00
|
|
|
shellAliases = {
|
2023-05-01 12:33:50 +02:00
|
|
|
# open emacs in terminal
|
|
|
|
emacs = "emacs --no-window-system";
|
|
|
|
# colored wget output
|
2023-05-01 09:48:31 +02:00
|
|
|
wget = "wget -c";
|
2023-05-01 12:33:50 +02:00
|
|
|
# copy terminfo to remote server with kitty
|
|
|
|
sshkp = "kitty +kitten ssh use-python";
|
|
|
|
sshk = "kitty +kitten ssh";
|
|
|
|
# colored ls output
|
|
|
|
ls = "ls --color=auto";
|
|
|
|
# kill all wine processes
|
2023-05-07 13:10:24 +02:00
|
|
|
killwine =
|
|
|
|
"ls -l /proc/*/exe 2>/dev/null | grep -E 'wine(64)?-preloader|wineserver' | perl -pe 's;^.*/proc/(d+)/exe.*$;$1;g;' | xargs -n 1 kill";
|
2023-05-01 12:33:50 +02:00
|
|
|
# colored grep output
|
|
|
|
grep = "grep --color=auto";
|
|
|
|
# yt-dlp aliases
|
|
|
|
# best audio
|
|
|
|
yta-best = "yt-dlp -f bestaudio --extract-audio ";
|
|
|
|
# best video
|
|
|
|
ytv-best = "yt-dlp -f bestvideo+bestaudio ";
|
|
|
|
# download video including metadata from youtube
|
2023-05-07 13:10:24 +02:00
|
|
|
ytv-metadata = ''
|
|
|
|
yt-dlp -f bestvideo+bestaudio --add-metadata --parse-metadata "%(title)s:%(meta_title)s" --parse-metadata "%(uploader)s:%(meta_artist)s" --write-info-json --write-thumbnail --embed-thumbnail --embed-subs --sub-langs "en.*" --merge-output-format mkv '';
|
2023-05-01 12:33:50 +02:00
|
|
|
# activate venv called "venv" in the local directory
|
|
|
|
activate = "source venv/bin/activate.fish";
|
|
|
|
# lsblk including file system type
|
2023-05-07 13:10:24 +02:00
|
|
|
lsblkf =
|
|
|
|
"lsblk -o NAME,LABEL,RM,SIZE,RO,TYPE,FSTYPE,MOUNTPOINTS,MODEL,UUID";
|
2023-05-01 12:33:50 +02:00
|
|
|
# color ip command
|
|
|
|
ip = "ip -c";
|
2023-05-01 09:48:31 +02:00
|
|
|
};
|
|
|
|
functions = {
|
2023-05-07 13:10:24 +02:00
|
|
|
fish_prompt =
|
|
|
|
(builtins.readFile ./config/fish/functions/fish_prompt.fish);
|
2023-05-01 09:48:31 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|