refactoring shell stuff

This commit is contained in:
Matt Nish-Lapidus 2025-07-01 12:19:01 -04:00
parent b2ce760a59
commit 8f62ae3202
8 changed files with 86 additions and 83 deletions

View file

@ -1,18 +1,16 @@
{ config, lib, pkgs, ... }:
{
home.packages = with pkgs; [
fishPlugins.foreign-env
fishPlugins.fzf-fish
fishPlugins.bass
fishPlugins.autopair
fishPlugins.colored-man-pages
];
programs.fish = {
enable = true;
shellAliases = {
"em" = "emacsclient -n -r";
"emm" = "emacsclient -nw";
"mkdir" = "mkdir -pv";
"gtr" = "gtrash restore";
"rmr" = "gtrash restore";
"rm" = "gtrash put";
"lg" = "lazygit";
"cat" = "bat --plain";
};
# change fzf variable search to C-M-v
interactiveShellInit = ''
@ -31,4 +29,14 @@
}
];
};
home.file.".config/fish/functions" = {
source = ./functions;
recursive = true;
};
home.file.".config/fish/completions" = {
source = ./completions;
recursive = true;
};
}

View file

@ -2,8 +2,6 @@
$env.config.completions.external.completer = $fish_completer
$env.LS_COLORS = (vivid generate one-dark)
def --env doomup [...args] {
doom sync ...$args
doom gc
@ -13,3 +11,11 @@ def --env doomup [...args] {
def --env lla [...args] {
ls -alm ...$args | select name size type mode
}
# def --env pullall [] {
# }
def pdf-compress [...args] {
gs -sDEVICE=pdfwrite -dPDFSETTINGS=/printer -dNOPAUSE -dBATCH -sOutputFile=output.pdf $args
}

View file

@ -4,22 +4,14 @@
programs.nushell = {
enable = true;
shellAliases = {
"em" = "emacsclient -n -r";
"ls" = "ls -m";
"ll" = "ls -m";
"la" = "ls -am";
"lz" = "eza -l";
"lza" = "eza -al";
"emm" = "emacsclient -nw";
"gtr" = "gtrash restore";
"rmr" = "gtrash restore";
"rm" = "gtrash put";
"lg" = "lazygit";
"cat" = "bat --plain";
"y" = "wezterm --config-file ~/.config/wezterm/launcher.lua start --always-new-process --cwd (pwd) yazi &";
"sbcl" = "rlwrap sbcl";
"yabup" = "yabridgectl sync --prune";
"y" = "job spawn { wezterm --config-file ~/.config/wezterm/launcher.lua start --always-new-process --cwd (pwd) yazi }";
};
# configFile.source = ./config.nu;
configFile.source = ./config.nu;
loginFile.text = ''
${pkgs.figlet}/bin/figlet -f ($env.HOME)/.local/share/flf/wavy.flf (hostname)
'';