Optimize Zsh and scripts for Termux

This commit is contained in:
the_4n0nym0u53 2022-01-23 19:26:28 +01:00
parent 9598e8ba09
commit f3038f239a
No known key found for this signature in database
GPG Key ID: 35EE09F5481049BB
6 changed files with 11 additions and 8 deletions

View File

@ -1,7 +1,11 @@
#!/bin/dash
[ "$(lsb_release -si)" = "Artix" ] && paru
[ "$(lsb_release -si)" = "Fedora" ] && sudo dnf upgrade
if [ "$(uname -o)" = "Android" ]; then
pkg upgrade
elif [ "$(uname -o)" = "GNU/Linux" ]; then
[ "$(lsb_release -si)" = "Artix" ] && paru
[ "$(lsb_release -si)" = "Fedora" ] && sudo dnf upgrade
fi
command -v flatpak >/dev/null 2>&1 && { echo; flatpak update; }
command -v npm >/dev/null 2>&1 && { echo; npm up -g; }

View File

@ -8,6 +8,6 @@ function kill_services {
pkill "^pipewire$"
}
[[ $(uname -o) != "Android" ]] && [[ $(lsb_release -si) == "Artix" ]] && [[ $(tty) == "/dev/tty1" ]] &&
[[ $(uname -o) == "GNU/Linux" ]] && [[ $(lsb_release -si) == "Artix" ]] && [[ $(tty) == "/dev/tty1" ]] &&
kill_services >/dev/null
unfunction kill_services

View File

@ -1,4 +1,4 @@
if [[ $(uname -o) != "Android" ]] && [[ $(lsb_release -si) == "Artix" ]] && [[ $(tty) == "/dev/tty1" ]]; then
if [[ $(uname -o) == "GNU/Linux" ]] && [[ $(lsb_release -si) == "Artix" ]] && [[ $(tty) == "/dev/tty1" ]]; then
export $(gnome-keyring-daemon --start)
export XDG_CURRENT_DESKTOP="Unity"
export GTK_USE_PORTAL=1

View File

@ -3,7 +3,7 @@ export PATH="$PATH:$HOME/.local/bin"
(( ${+commands[go]} )) && export PATH="$PATH:$(go env GOPATH)/bin"
# Essentials
export LANG="en_DK.UTF-8"
[[ $(uname -o) == "Android" ]] && export LANG="en_US.UTF-8" || export LANG="en_DK.UTF-8"
export PAGER="less"
export EDITOR="nano"
(( ${+commands[vim]} )) && export EDITOR="vim"

View File

@ -1,4 +1,3 @@
# Common aliases
alias btctl="bluetoothctl"
alias cl="clear"
alias cp="cp -i"
@ -19,7 +18,7 @@ if [[ $(uname -o) == "Android" ]]; then
alias l="exa -aFhl --color=always --git --icons"
alias la="exa -Fhl --color=always --git --icons"
alias ll="exa -aaFghl --color=always --git --icons"
else
elif [[ $(uname -o) == "GNU/Linux" ]]; then
alias exa="exa -aFhl --color=always --git --icons"
alias l="lsd -hlA --color=always"
alias la="lsd -hl --color=always"

View File

@ -1,4 +1,4 @@
if [[ $(uname -o) != "Android" ]]; then
if [[ $(uname -o) == "GNU/Linux" ]]; then
export GPG_TTY=$TTY
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
gpgconf --launch gpg-agent