From fbc45f2b9c3e120b2403a965eee4ce2f7b4f783c Mon Sep 17 00:00:00 2001 From: Sam Al-Sapti Date: Sun, 18 Sep 2022 21:04:42 +0200 Subject: [PATCH] Remove Android compatibility --- README.md | 2 +- zsh/.config/zsh/.zlogout | 4 +- zsh/.config/zsh/.zprofile | 4 +- zsh/.config/zsh/.zshenv | 6 +-- zsh/.config/zsh/aliases.zsh | 74 +++++++++++++++++-------------------- zsh/.config/zsh/gpg.zsh | 6 +-- zsh/.config/zsh/history.zsh | 4 +- zsh/README.md | 7 +++- 8 files changed, 50 insertions(+), 57 deletions(-) diff --git a/README.md b/README.md index f8ca572..bc3ad9f 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # My dotfiles This is a collection of some of my dotfiles for my Linux systems. These -work on Artix, Debian, Fedora, Ubuntu and Termux (Android). +work on Artix, Debian, Fedora and Ubuntu. To install: diff --git a/zsh/.config/zsh/.zlogout b/zsh/.config/zsh/.zlogout index eab1c4d..8c724ea 100644 --- a/zsh/.config/zsh/.zlogout +++ b/zsh/.config/zsh/.zlogout @@ -8,6 +8,6 @@ kill_services() { pkill "^pipewire$" } -[[ $(uname -o) == "GNU/Linux" ]] && [[ $(lsb_release -si) == "Artix" ]] && [[ $(tty) == "/dev/tty1" ]] && - kill_services >/dev/null +[[ $(lsb_release -si) == "Artix" ]] && [[ $(tty) == "/dev/tty1" ]] \ + && kill_services >/dev/null unfunction kill_services diff --git a/zsh/.config/zsh/.zprofile b/zsh/.config/zsh/.zprofile index fc33f8a..05b140f 100644 --- a/zsh/.config/zsh/.zprofile +++ b/zsh/.config/zsh/.zprofile @@ -1,7 +1,7 @@ -if [[ $(uname -o) == "GNU/Linux" ]] && [[ $(lsb_release -si) == "Artix" ]] && [[ $(tty) == "/dev/tty1" ]]; then +if [[ $(lsb_release -si) == "Artix" ]] && [[ $(tty) == "/dev/tty1" ]]; then export XDG_CURRENT_DESKTOP="Unity" export GTK_USE_PORTAL=1 export QT_QPA_PLATFORM="wayland" - dbus-launch --sh-syntax --exit-with-session sway &> /dev/null; exit + dbus-launch --sh-syntax --exit-with-session sway &> /dev/null; exit 0 fi diff --git a/zsh/.config/zsh/.zshenv b/zsh/.config/zsh/.zshenv index 93a09e9..62a01d4 100644 --- a/zsh/.config/zsh/.zshenv +++ b/zsh/.config/zsh/.zshenv @@ -3,11 +3,9 @@ export PATH="$HOME/.local/bin:$PATH" (( ${+commands[go]} )) && export PATH="$(go env GOPATH)/bin:$PATH" # Essentials -[[ $(uname -o) == "GNU/Linux" ]] \ - && [[ $(lsb_release -si) != "Debian" ]] \ - && [[ $(lsb_release -si) != "Ubuntu" ]] \ +[[ $(lsb_release -si) != "Debian" ]] && [[ $(lsb_release -si) != "Ubuntu" ]] \ && export LANG="en_DK.UTF-8" \ - || export LANG="en_US.UTF-8" && export TERM="xterm-256color" + || { export LANG="en_US.UTF-8"; export TERM="xterm-256color"; } export PAGER="less" export EDITOR="nano" (( ${+commands[vim]} )) && export EDITOR="vim" diff --git a/zsh/.config/zsh/aliases.zsh b/zsh/.config/zsh/aliases.zsh index 986b3f4..0a0e937 100644 --- a/zsh/.config/zsh/aliases.zsh +++ b/zsh/.config/zsh/aliases.zsh @@ -30,6 +30,12 @@ alias gi="git init" alias gsa="git submodule add" alias gsur="git submodule update --remote" +# Mounting +alias lock="udisksctl lock -b" +alias mount="udisksctl mount -b" +alias unlock="udisksctl unlock -b" +alias unmount="udisksctl unmount -b" + # Misc. (( ${+commands[tmux]} )) \ && alias tmux="tmux -2u" @@ -43,45 +49,31 @@ alias q="exit 0" alias zgrep="zgrep --color=always" # Platform specific -if [[ $(uname -o) == "Android" ]]; then - alias pkgin="pkg install" - alias pkgrm="pkg uninstall --purge" - alias pkgqi="dpkg -s" - alias pkgqs="dpkg -l" - alias pkgsi="pkg info" - alias pkgss="pkg search" -elif [[ $(uname -o) == "GNU/Linux" ]]; then - if [[ $(lsb_release -si) == "Artix" ]]; then - alias code="codium --enable-features=UseOzonePlatform --ozone-platform=wayland" - alias pacin="doas pacman -S" - alias pacls="pacman -Qkl" - alias pacown="pacman -Qo" - alias pacqi="pacman -Qi" - alias pacqs="pacman -Qs" - alias pacrm="doas pacman -Rcnsu" - alias pacsi="pacman -Si" - alias pacss="pacman -Ss" - alias poweroff="doas poweroff" - alias reboot="doas reboot" - alias usb="doas usbctl tmp" - elif [[ $(lsb_release -si) == "Fedora" ]]; then - alias code="codium" - alias dnfin="sudo dnf install" - alias dnfqs="sudo dnf list installed" - alias dnfrm="sudo dnf remove" - alias dnfsi="sudo dnf info" - alias dnfss="sudo dnf search" - elif [[ $(lsb_release -si) == "Debian" ]] || [[ $(lsb_release -si) == "Ubuntu" ]]; then - alias aptin="sudo apt install" - alias aptqi="dpkg -s" - alias aptqs="dpkg -l" - alias aptrm="sudo apt purge" - alias aptsi="apt info" - alias aptss="apt search" - fi - - alias lock="udisksctl lock -b" - alias mount="udisksctl mount -b" - alias unlock="udisksctl unlock -b" - alias unmount="udisksctl unmount -b" +if [[ $(lsb_release -si) == "Artix" ]]; then + alias code="codium --enable-features=UseOzonePlatform --ozone-platform=wayland" + alias pacin="doas pacman -S" + alias pacls="pacman -Qkl" + alias pacown="pacman -Qo" + alias pacqi="pacman -Qi" + alias pacqs="pacman -Qs" + alias pacrm="doas pacman -Rcnsu" + alias pacsi="pacman -Si" + alias pacss="pacman -Ss" + alias poweroff="doas poweroff" + alias reboot="doas reboot" + alias usb="doas usbctl tmp" +elif [[ $(lsb_release -si) == "Fedora" ]]; then + alias code="codium" + alias dnfin="sudo dnf install" + alias dnfqs="sudo dnf list installed" + alias dnfrm="sudo dnf remove" + alias dnfsi="sudo dnf info" + alias dnfss="sudo dnf search" +elif [[ $(lsb_release -si) == "Debian" ]] || [[ $(lsb_release -si) == "Ubuntu" ]]; then + alias aptin="sudo apt install" + alias aptqi="dpkg -s" + alias aptqs="dpkg -l" + alias aptrm="sudo apt purge" + alias aptsi="apt info" + alias aptss="apt search" fi diff --git a/zsh/.config/zsh/gpg.zsh b/zsh/.config/zsh/gpg.zsh index 37da4ea..cf196e2 100644 --- a/zsh/.config/zsh/gpg.zsh +++ b/zsh/.config/zsh/gpg.zsh @@ -1,6 +1,6 @@ -if [[ $(uname -o) == "GNU/Linux" ]] && [[ $(lsb_release -si) != "Debian" ]] && [[ $(lsb_release -si) != "Ubuntu" ]]; then - export GPG_TTY=$TTY - export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket) +if [[ $(lsb_release -si) != "Debian" ]] && [[ $(lsb_release -si) != "Ubuntu" ]]; then + export GPG_TTY="$TTY" + export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)" gpgconf --launch gpg-agent gpg-connect-agent updatestartuptty /bye &> /dev/null fi diff --git a/zsh/.config/zsh/history.zsh b/zsh/.config/zsh/history.zsh index 031e108..42b2594 100644 --- a/zsh/.config/zsh/history.zsh +++ b/zsh/.config/zsh/history.zsh @@ -1,7 +1,7 @@ # History file configuration HISTFILE="$ZDOTDIR/.zsh_history" -HISTSIZE=50000 -SAVEHIST=10000 +HISTSIZE=10000 +SAVEHIST=5000 # History command configuration setopt EXTENDED_HISTORY diff --git a/zsh/README.md b/zsh/README.md index b3e4fef..622336b 100644 --- a/zsh/README.md +++ b/zsh/README.md @@ -1,5 +1,8 @@ # Zsh config -For plugins, this Zsh config uses [Antidote](https://github.com/mattmc3/antidote.git), a minimal and easy to use Zsh plugin manager. +For plugins, this Zsh config uses +[Antidote](https://github.com/mattmc3/antidote.git), a minimal and easy +to use Zsh plugin manager. -Instead of directly using Oh-My-Zsh, we load specific plugins from it. I like to keep it simple. Also, Oh-My-Zsh is slow, this is much faster. +Instead of directly using Oh-My-Zsh, we load specific plugins from it. I +like to keep it simple. Also, Oh-My-Zsh is slow, this is much faster.