Modules/Fish: Only enable nnn functions if nnn.enabled
This commit is contained in:
@ -46,7 +46,8 @@ in {
|
||||
programs.fish = {
|
||||
enable = true;
|
||||
|
||||
functions = {
|
||||
functions = lib.mergeAttrsList [
|
||||
(lib.optionalAttrs config.modules.nnn.enable {
|
||||
nnncd = {
|
||||
wraps = "nnn";
|
||||
description = "support nnn quit and change directory";
|
||||
@ -83,7 +84,8 @@ in {
|
||||
end
|
||||
'';
|
||||
};
|
||||
};
|
||||
})
|
||||
];
|
||||
|
||||
plugins = [
|
||||
# Oh-my-fish plugins are stored in their own repositories, which
|
||||
@ -137,8 +139,6 @@ in {
|
||||
blk = batify "lsblk -o NAME,LABEL,UUID,FSTYPE,SIZE,FSUSE%,MOUNTPOINT,MODEL";
|
||||
grep = "grep --color=auto -E"; # grep with extended regex
|
||||
watch = "watch -d -c -n 0.5";
|
||||
n = "nnncd -a"; # Doesn't work with abbrify because I have nnn.override?
|
||||
np = "nnncd -a -P p";
|
||||
ssh = "kitty +kitten ssh";
|
||||
|
||||
# Systemd
|
||||
@ -148,16 +148,6 @@ in {
|
||||
uniterrors = "journalctl -xb --unit=";
|
||||
useruniterrors = "journalctl -xb --user-unit=";
|
||||
|
||||
# NFS shares
|
||||
msusenet = "sudo mount.nfs4 192.168.86.20:/mnt/WD\\ Blue\\ Stripe\\ 2T/Usenet /media/Stash-Usenet";
|
||||
mspicture = "sudo mount.nfs4 192.168.86.20:/mnt/WD\\ Blue\\ Stripe\\ 2T/Picture /media/Stash-Picture";
|
||||
msvideo = "sudo mount.nfs4 192.168.86.20:/mnt/WD\\ Blue\\ Stripe\\ 2T/Video /media/Stash-Video";
|
||||
msclips = "sudo mount.nfs4 192.168.86.20:/mnt/WD\\ Blue\\ Stripe\\ 2T/Clips /media/Stash-Clips";
|
||||
mmovie = "sudo mount.nfs4 192.168.86.20:/mnt/SG\\ Exos\\ Mirror\\ 18TB/Movie /media/Movie";
|
||||
mshow = "sudo mount.nfs4 192.168.86.20:/mnt/SG\\ Exos\\ Mirror\\ 18TB/Show /media/Show";
|
||||
mmusic = "sudo mount.nfs4 192.168.86.20:/mnt/SG\\ Exos\\ Mirror\\ 18TB/Music /media/Music";
|
||||
musenet = "sudo mount.nfs4 192.168.86.20:/mnt/SG\\ Exos\\ Mirror\\ 18TB/Usenet /media/Usenet";
|
||||
|
||||
# Disassemble
|
||||
disassemble = "objdump -d -S -M intel";
|
||||
}
|
||||
@ -198,6 +188,10 @@ in {
|
||||
|
||||
(abbrify pkgs.lazygit {lg = "lazygit";})
|
||||
|
||||
# Doesn't work with abbrify because I have nnn.override...
|
||||
(lib.optionalAttrs config.modules.nnn.enable {n = "nnncd -a";})
|
||||
(lib.optionalAttrs config.modules.nnn.enable {np = "nnncd -a -P p";})
|
||||
|
||||
(abbrify pkgs.ranger {r = "ranger --choosedir=$HOME/.rangerdir; set LASTDIR (cat $HOME/.rangerdir); cd $LASTDIR";})
|
||||
|
||||
(abbrify pkgs.rsync {
|
||||
|
Reference in New Issue
Block a user