fix(bat): auto-theme on darwin

This commit is contained in:
winston 2023-02-15 06:40:45 +01:00
parent 1b3f1ec57b
commit bdfb8ad3cf
Signed by: winston
GPG key ID: 3786770EDBC2B481

View file

@ -86,11 +86,11 @@ in {
}
];
shellAliases = {
# switch between yubikeys for the same GPG key
cat =
if isDarwin
then "bat --theme=\$(defaults read -globalDomain AppleInterfaceStyle &> /dev/null && echo default || echo GitHub)"
then "bat --theme=\$(defaults read -globalDomain AppleInterfaceStyle &> /dev/null && echo Catppuccin-mocha || echo Catppuccin-latte)"
else "bat";
# switch between yubikeys for the same GPG key
switch_yubikeys = "gpg-connect-agent \"scd serialno\" \"learn --force\" /bye";
};
history = {