Optimize Zsh and scripts for Termux
This commit is contained in:
parent
9598e8ba09
commit
f3038f239a
|
@ -1,7 +1,11 @@
|
||||||
#!/bin/dash
|
#!/bin/dash
|
||||||
|
|
||||||
|
if [ "$(uname -o)" = "Android" ]; then
|
||||||
|
pkg upgrade
|
||||||
|
elif [ "$(uname -o)" = "GNU/Linux" ]; then
|
||||||
[ "$(lsb_release -si)" = "Artix" ] && paru
|
[ "$(lsb_release -si)" = "Artix" ] && paru
|
||||||
[ "$(lsb_release -si)" = "Fedora" ] && sudo dnf upgrade
|
[ "$(lsb_release -si)" = "Fedora" ] && sudo dnf upgrade
|
||||||
|
fi
|
||||||
|
|
||||||
command -v flatpak >/dev/null 2>&1 && { echo; flatpak update; }
|
command -v flatpak >/dev/null 2>&1 && { echo; flatpak update; }
|
||||||
command -v npm >/dev/null 2>&1 && { echo; npm up -g; }
|
command -v npm >/dev/null 2>&1 && { echo; npm up -g; }
|
||||||
|
|
|
@ -8,6 +8,6 @@ function kill_services {
|
||||||
pkill "^pipewire$"
|
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
|
kill_services >/dev/null
|
||||||
unfunction kill_services
|
unfunction kill_services
|
||||||
|
|
|
@ -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 $(gnome-keyring-daemon --start)
|
||||||
export XDG_CURRENT_DESKTOP="Unity"
|
export XDG_CURRENT_DESKTOP="Unity"
|
||||||
export GTK_USE_PORTAL=1
|
export GTK_USE_PORTAL=1
|
||||||
|
|
|
@ -3,7 +3,7 @@ export PATH="$PATH:$HOME/.local/bin"
|
||||||
(( ${+commands[go]} )) && export PATH="$PATH:$(go env GOPATH)/bin"
|
(( ${+commands[go]} )) && export PATH="$PATH:$(go env GOPATH)/bin"
|
||||||
|
|
||||||
# Essentials
|
# 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 PAGER="less"
|
||||||
export EDITOR="nano"
|
export EDITOR="nano"
|
||||||
(( ${+commands[vim]} )) && export EDITOR="vim"
|
(( ${+commands[vim]} )) && export EDITOR="vim"
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
# Common aliases
|
|
||||||
alias btctl="bluetoothctl"
|
alias btctl="bluetoothctl"
|
||||||
alias cl="clear"
|
alias cl="clear"
|
||||||
alias cp="cp -i"
|
alias cp="cp -i"
|
||||||
|
@ -19,7 +18,7 @@ if [[ $(uname -o) == "Android" ]]; then
|
||||||
alias l="exa -aFhl --color=always --git --icons"
|
alias l="exa -aFhl --color=always --git --icons"
|
||||||
alias la="exa -Fhl --color=always --git --icons"
|
alias la="exa -Fhl --color=always --git --icons"
|
||||||
alias ll="exa -aaFghl --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 exa="exa -aFhl --color=always --git --icons"
|
||||||
alias l="lsd -hlA --color=always"
|
alias l="lsd -hlA --color=always"
|
||||||
alias la="lsd -hl --color=always"
|
alias la="lsd -hl --color=always"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
if [[ $(uname -o) != "Android" ]]; then
|
if [[ $(uname -o) == "GNU/Linux" ]]; then
|
||||||
export GPG_TTY=$TTY
|
export GPG_TTY=$TTY
|
||||||
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
|
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
|
||||||
gpgconf --launch gpg-agent
|
gpgconf --launch gpg-agent
|
||||||
|
|
Loading…
Reference in a new issue