fix ls on macos and other nav, passwdless lf

This commit is contained in:
2026-08-31 19:01:49 -05:00
parent 11ab7440fa
commit 7dde6470a4
3 changed files with 82 additions and 62 deletions
+1 -1
View File
@@ -23,9 +23,9 @@ set ignorecase true
# shortcuts
map gb cd /holocron
map gz cd %{{ [ -d /holocron ] && printf /holocron || printf /media/holocron }}
map gn cd ~/.nix
map gc cd ~/.config
map gv cd /var/lib
# navigation
map [ half-up
+77 -61
View File
@@ -7,6 +7,7 @@
program = "zsh";
cfg = config.dots.${program};
home_dir = config.home.homeDirectory;
isDarwin = pkgs.stdenv.isDarwin;
#sec = sops.secrets;
in {
options.dots.${program} = {
@@ -23,7 +24,6 @@ in {
programs.${program} = {
enable = true;
dotDir = "${config.xdg.configHome}/zsh";
#dotDir = ".config/zsh";
autocd = true;
enableCompletion = true;
@@ -41,77 +41,93 @@ in {
path = "$XDG_STATE_HOME/zsh/history";
};
shellAliases = {
# --- zsh ---
src = "source ${home_dir}/.config/zsh/.zshrc";
shellAliases =
{
# --- zsh ---
src = "source ${home_dir}/.config/zsh/.zshrc";
# --- config editing ---
cfl = "nvim /home/blake/.nix/users/blake/dots/core/lf/lfrc";
cfz = "nvim /home/blake/.nix/users/blake/dots/core/zsh/default.nix";
# --- config editing ---
cfl = "nvim /home/blake/.nix/users/blake/dots/core/lf/lfrc";
cfz = "nvim /home/blake/.nix/users/blake/dots/core/zsh/default.nix";
cfv = "sudo lf /var/lib";
# --- navigation ---
ls = "ls --color=auto --group-directories-first";
ll = "ls -lh --color=auto --group-directories-first";
la = "ls -Alh --color=auto --group-directories-first";
".." = "cd ..";
"..." = "cd ../..";
fs = "du -h | sort -h";
ds = "du -hs";
gn = "cd ${home_dir}/.nix";
woopa = "echo backwhack";
# --- navigation ---
# ls = "ls --color=auto --group-directories-first";
# ll = "ls -lh --color=auto --group-directories-first";
# la = "ls -Alh --color=auto --group-directories-first";
".." = "cd ..";
"..." = "cd ../..";
fs = "du -h | sort -h";
ds = "du -hs";
gn = "cd ${home_dir}/.nix";
woopa = "echo backwhack";
# --- shortcuts ---
vswap = "cd ${home_dir}/.local/state/nvim/swap";
rswap = "rm ${home_dir}/.local/state/nvim/swap/*";
v = "nvim";
sv = "sudo nvim";
vim = "nvim";
mime-type = "xdg-mime query filetype";
mime-default = "xdg-mime query default";
# --- shortcuts ---
vswap = "cd ${home_dir}/.local/state/nvim/swap";
rswap = "rm ${home_dir}/.local/state/nvim/swap/*";
v = "nvim";
sv = "sudo nvim";
vim = "nvim";
mime-type = "xdg-mime query filetype";
mime-default = "xdg-mime query default";
# --- safety ---
cp = "cp -iv";
mv = "mv -iv";
rm = "rm -Iv";
# --- safety ---
cp = "cp -iv";
mv = "mv -iv";
rm = "rm -Iv";
# --- colors ---
grep = "grep --color=auto";
fgrep = "fgrep --color=auto";
egrep = "egrep --color=auto";
# --- colors ---
grep = "grep --color=auto";
fgrep = "fgrep --color=auto";
egrep = "egrep --color=auto";
# --- scripts ---
motd = "sh /etc/motd";
rebuild = "sh ${home_dir}/.nix/bin/rebuild";
perms = "sudo sh ${home_dir}/.nix/bin/fix-perms";
# --- scripts ---
motd = "sh /etc/motd";
rebuild = "sh ${home_dir}/.nix/bin/rebuild";
perms = "sudo sh ${home_dir}/.nix/bin/fix-perms";
# --- git ---
status = "git status";
add = "git add";
commit = "git commit";
push = "git push";
pull = "git pull";
dotfiles = "/usr/bin/git --git-dir=${home_dir}/.dotfiles --work-tree=$HOME";
dtf = "/usr/bin/git --git-dir=${home_dir}/.dotfiles --work-tree=$HOME";
# --- git ---
status = "git status";
add = "git add";
commit = "git commit";
push = "git push";
pull = "git pull";
dotfiles = "/usr/bin/git --git-dir=${home_dir}/.dotfiles --work-tree=$HOME";
dtf = "/usr/bin/git --git-dir=${home_dir}/.dotfiles --work-tree=$HOME";
# nix shit
sec = "sops ${home_dir}/.nix/secrets/secrets.yaml";
# nix shit
sec = "sops ${home_dir}/.nix/secrets/secrets.yaml";
# zfs
dfzfs = "zfs list -r -o name,used,usedsnap,usedds";
# zfs
dfzfs = "zfs list -r -o name,used,usedsnap,usedds";
# --- systemd ---
stat = "sudo systemctl status";
restart = "sudo systemctl restart";
start = "sudo systemctl start";
stop = "sudo systemctl stop";
jou = "sudo journalctl -xeu";
live = "sudo journalctl -o short-iso -n 50 -fu";
# --- systemd ---
stat = "sudo systemctl status";
restart = "sudo systemctl restart";
start = "sudo systemctl start";
stop = "sudo systemctl stop";
jou = "sudo journalctl -xeu";
live = "sudo journalctl -o short-iso -n 50 -fu";
# --- system ---
peace = "systemctl poweroff";
love = "systemctl reboot";
lock = "loginctl lock-session";
};
# --- system ---
peace = "systemctl poweroff";
love = "systemctl reboot";
lock = "loginctl lock-session";
}
# use GNU core utils ls on macos
// (
if isDarwin
then {
ls = "gls --color=auto --group-directories-first";
ll = "gls -lh --color=auto --group-directories-first";
la = "gls -Alh --color=auto --group-directories-first";
}
else {
ls = "gls --color=auto --group-directories-first";
ll = "gls -lh --color=auto --group-directories-first";
la = "gls -Alh --color=auto --group-directories-first";
}
);
initContent = ''