Switch to a multihost/home-manager setup
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
set -gx fish_greeting
|
||||
|
||||
function a
|
||||
for arg in $argv
|
||||
if string match -q '*/' $arg
|
||||
mkdir -p $arg
|
||||
else
|
||||
mkdir -p (dirname $arg)
|
||||
touch $arg
|
||||
end
|
||||
end
|
||||
end
|
||||
function y
|
||||
set tmp (mktemp -t "yazi-cwd.XXXXXX")
|
||||
yazi $argv --cwd-file="$tmp"
|
||||
if set cwd (command cat -- "$tmp"); and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ]
|
||||
builtin cd -- "$cwd"
|
||||
end
|
||||
end
|
||||
function editor
|
||||
set pos (cat ~/dotfiles/.pos)
|
||||
y $pos
|
||||
if test -e ./p.vim
|
||||
nvim -S ./p.vim
|
||||
else
|
||||
nvim
|
||||
end
|
||||
echo $PWD > ~/dotfiles/.pos
|
||||
end
|
||||
@@ -0,0 +1,20 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
programs.fish = {
|
||||
enable = true;
|
||||
|
||||
shellAliases = {
|
||||
ls = "eza -TlL 2 --git --no-permissions --no-user --no-time --icons=always --group-directories-first";
|
||||
lss = "eza -TlL 1 --git --no-permissions --no-user --no-time --icons=always --group-directories-first";
|
||||
lsa = "eza -TlaL 1 --git --no-permissions --no-user --no-time --icons=always --group-directories-first";
|
||||
sls = "sudo eza -TlL 2 --git --no-permissions --no-user --no-time --icons=always --group-directories-first";
|
||||
s = "python3 -m http.server 8080";
|
||||
vi = "nvim";
|
||||
vim = "nvim";
|
||||
g = "gitui"
|
||||
};
|
||||
|
||||
interactiveShellInit = builtins.readFile ./config.fish;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user