split off terminal utilities
This commit is contained in:
@@ -1,7 +1,12 @@
|
||||
# Shared fish configuration — imported from home/profiles/terminal.nix, so it
|
||||
# runs on every host (mreow, yarn, muffin, and any machine using the portable
|
||||
# homeConfigurations output).
|
||||
#
|
||||
# Desktop/dev-specific aliases (cargo, gcc, wl-clipboard) are added from the
|
||||
# profile that owns their dependencies, not here.
|
||||
{ pkgs, lib, ... }:
|
||||
let
|
||||
eza = "${lib.getExe pkgs.eza} --color=always --group-directories-first";
|
||||
cargo = "${lib.getExe pkgs.cargo}";
|
||||
coreutils = "${pkgs.coreutils}/bin";
|
||||
in
|
||||
{
|
||||
@@ -9,21 +14,17 @@ in
|
||||
enable = true;
|
||||
|
||||
interactiveShellInit = ''
|
||||
#disable greeting
|
||||
# disable greeting
|
||||
set fish_greeting
|
||||
|
||||
#fixes gnupg password entry
|
||||
# fixes gnupg password entry
|
||||
export GPG_TTY=(${coreutils}/tty)
|
||||
|
||||
#pfetch on shell start (disable pkgs because of execution time)
|
||||
# pfetch on shell start (disable pkgs because of execution time)
|
||||
PF_INFO="ascii title os host kernel uptime memory editor wm" ${lib.getExe pkgs.pfetch-rs}
|
||||
'';
|
||||
|
||||
shellAliases = {
|
||||
c = cargo;
|
||||
cr = "${cargo} run";
|
||||
cb = "${cargo} build";
|
||||
|
||||
# from DistroTube's dot files: Changing "ls" to "eza"
|
||||
ls = "${eza} -al";
|
||||
la = "${eza} -a";
|
||||
@@ -38,12 +39,6 @@ in
|
||||
${coreutils}/sort --numeric-sort --key=2 |
|
||||
${coreutils}/cut -c 1-12,41- |
|
||||
${coreutils}/numfmt --field=2 --to=iec-i --suffix=B --padding=7 --round=nearest'';
|
||||
|
||||
# aliases for (I think) macos commands
|
||||
pbcopy = "${pkgs.wl-clipboard}/bin/wl-copy";
|
||||
pbpaste = "${pkgs.wl-clipboard}/bin/wl-paste";
|
||||
|
||||
gcc-native = "${lib.getExe pkgs.gcc} -Q --help=target -mtune=native -march=native | ${lib.getExe pkgs.gnugrep} -E '^\\s+\-(mtune|march)=' | ${coreutils}/tr -d '[:blank:]'";
|
||||
};
|
||||
|
||||
shellInit = ''
|
||||
|
||||
Reference in New Issue
Block a user