99 lines
4.3 KiB
Nix
99 lines
4.3 KiB
Nix
{ config, pkgs, ... }:
|
|
{
|
|
home.shellAliases = {
|
|
top = "btm --battery";
|
|
linkbox = "ln -s (pwd) ~/box/";
|
|
rloft = "tmux source-file ~/.config/tmux/rloft.conf";
|
|
liftbox = "ssh tstraube@login.server.uni-frankfurt.de \"rm -r box/*\" && scp -vr ~/box/ tstraube@login.server.uni-frankfurt.de:box/";
|
|
ktiubox = "rsync -vaL --delete ~/box/ root@ktiu.net:/var/www/html/box/";
|
|
ymd = "date +'%Y-%m-%d'";
|
|
pulluni = "ssh tstraube@login.server.uni-frankfurt.de \"cd uni-tstraube && git pull\"";
|
|
pullstat = "tar czf - -C ~/teach/2025_statistik/skript/public/ . | ssh tstraube@login.server.uni-frankfurt.de 'tar xzf - -C ~/public_html/c/stat25'";
|
|
pullgrid = "ssh till@geocom.uni-frankfurt.de \"cd /var/www/grid && git pull\"";
|
|
buildfk = "curl -X POST -d '{}' https://api.netlify.com/build_hooks/65dc8705b91d7cbaf0a1e1b5";
|
|
showbox = "chromium-browser -app=https://user.uni-frankfurt.de/~tstraube/box";
|
|
showc = "chromium-browser -app=https://user.uni-frankfurt.de/~tstraube/c/";
|
|
castget = "castget -prvC ~/.config/castget/castget.conf";
|
|
castsync = "rsync -va --remove-source-files --progress --stats ~/.local/share/podcasts/ /run/media/till/CLIP\\ JAM/Podcasts/";
|
|
musicsync = "rsync -va --ignore-existing --progress --stats ~/media/music/sync/ /run/media/till/CLIP\\ JAM/Music/";
|
|
cb = "cd $(sed 's|^file://||' /home/till/.config/gtk-3.0/bookmarks | fzf --height 10% --reverse)";
|
|
univpn = "secret-tool lookup server uni-frankfurt.de account tstraube | sudo openconnect --config=/home/till/.config/openconnect/config --passwd-on-stdin";
|
|
v = "nvim";
|
|
r = "R --no-save --no-restore";
|
|
R = "R --no-save --no-restore";
|
|
cdg = "cd \$(git rev-parse --show-toplevel)";
|
|
map = "telnet mapscii.me";
|
|
weather = "curl wttr.in/frankfurt";
|
|
};
|
|
programs.fish = {
|
|
enable = true;
|
|
interactiveShellInit = "fish_add_path ${config.xdg.dataHome}/npm/packages/bin";
|
|
shellAbbrs = {
|
|
openconnect = "openconnect --config=/home/till/.config/openconnect/config";
|
|
};
|
|
shellInit = ''
|
|
set -gx EDITOR "nvim"
|
|
set -gx VISUAL "nvim"
|
|
|
|
function fish_greeting; end
|
|
|
|
function pod --description 'Full service podcast refresh'
|
|
castget
|
|
udisksctl mount -b /dev/disk/by-label/CLIP\\x20JAM
|
|
musicsync
|
|
castsync
|
|
udisksctl unmount -b /dev/disk/by-label/CLIP\\x20JAM
|
|
end
|
|
|
|
function startrloft --description 'Starts R with custom environment'
|
|
set -lx R_ENVIRON_USER "~/.config/rloft/RLoft_environ"
|
|
R -q
|
|
end
|
|
|
|
function vd --wraps vim --description 'vim with date in filename'
|
|
nvim (ymd)_$argv.md
|
|
end
|
|
|
|
function note --description 'Create a new note'
|
|
if count $argv > /dev/null
|
|
nvim -c "call CreateNote('$argv')"
|
|
else
|
|
nvim ~/notes/(ls ~/notes/ | fzf)
|
|
end
|
|
end
|
|
|
|
function lipsum --description 'Create placeholder text'
|
|
nix-shell -p perl536Packages.TextLorem --run 'lorem '(echo $argv)
|
|
end
|
|
|
|
set -U fish_prompt_pwd_dir_length 0
|
|
|
|
function fish_prompt --description "Write out the prompt"
|
|
echo -s (set_color green) (whoami) (set_color brblack) @ (set_color yellow) (hostname) (set_color brblack) : (prompt_pwd) '$ ' (set_color normal)
|
|
end
|
|
|
|
function fish_right_prompt --description "Display info to the right of the prompt"
|
|
echo -s (__fish_git_prompt)
|
|
end
|
|
|
|
function fish_mode_prompt; end
|
|
|
|
set fish_cursor_default line blink
|
|
|
|
set __fish_git_prompt_showdirtystate 'yes'
|
|
set __fish_git_prompt_showstashstate 'yes'
|
|
set __fish_git_prompt_showuntrackedfiles 'yes'
|
|
set __fish_git_prompt_showupstream 'yes'
|
|
set __fish_git_prompt_color_upstream_ahead green
|
|
set __fish_git_prompt_color_upstream_behind red
|
|
set __fish_git_prompt_char_dirtystate '*'
|
|
set __fish_git_prompt_char_stagedstate '→'
|
|
set __fish_git_prompt_char_untrackedfiles '☡'
|
|
set __fish_git_prompt_char_stashstate '↩'
|
|
set __fish_git_prompt_char_upstream_ahead '+'
|
|
set __fish_git_prompt_char_upstream_behind '-'
|
|
|
|
test -f '/home/till/.config/netlify/helper/path.fish.inc' && source '/home/till/.config/netlify/helper/path.fish.inc'
|
|
'';
|
|
};
|
|
}
|