Skip to content

Commit

Permalink
Merge branch 'master' into update-for-external
Browse files Browse the repository at this point in the history
  • Loading branch information
shunk031 authored Mar 6, 2024
2 parents 8cb5c38 + 84671b6 commit 037ccb4
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 5 deletions.
14 changes: 13 additions & 1 deletion home/dot_local/bin/server/aliases.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
#!/usr/bin/env bash

#
# Use nvidia-smi alternative command
#
alias ns="watch -n 4 -cd nvinfo"
alias ls="eza --long --group --header --binary --time-style=long-iso --icons"

#
# Use eza or exa for ls command
#
if command -v "eza" >/dev/null 2>&1; then
my_ls="eza"
else
my_ls="exa"
fi
alias ls="${my_ls} --long --group --header --binary --time-style=long-iso --icons"
21 changes: 17 additions & 4 deletions install/ubuntu/common/eza.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,24 @@ if [ "${DOTFILES_DEBUG:-}" ]; then
set -x
fi

function apt_install_eza() {
sudo apt install -y eza
}

function apt_install_exa() {
sudo apt install -y exa
}

function install_eza() {
wget -qO- https://raw.githubusercontent.com/eza-community/eza/main/deb.asc | sudo tee /etc/apt/trusted.gpg.d/gierens.asc
echo "deb http://deb.gierens.de stable main" | sudo tee /etc/apt/sources.list.d/gierens.list
sudo apt-get update
sudo apt-get install -y eza
sudo mkdir -p /etc/apt/keyrings
wget -qO- https://raw.githubusercontent.com/eza-community/eza/main/deb.asc | sudo gpg --yes --dearmor -o /etc/apt/keyrings/gierens.gpg
echo "deb [signed-by=/etc/apt/keyrings/gierens.gpg] http://deb.gierens.de stable main" | sudo tee /etc/apt/sources.list.d/gierens.list
sudo chmod 644 /etc/apt/keyrings/gierens.gpg /etc/apt/sources.list.d/gierens.list
sudo apt update

if ! apt_install_eza; then
apt_install_exa
fi
}

function uninstall_eza() {
Expand Down

0 comments on commit 037ccb4

Please sign in to comment.