Even even faster
This commit is contained in:
parent
b96a0a0358
commit
a406bb543c
|
@ -8,6 +8,6 @@ kill_services() {
|
||||||
pkill "^pipewire$"
|
pkill "^pipewire$"
|
||||||
}
|
}
|
||||||
|
|
||||||
[[ $(lsb_release -si) == "Artix" ]] && [[ $(tty) == "/dev/tty1" ]] \
|
[[ $(lsb_release -si) == "Artix" ]] && [[ $(tty) == "/dev/tty1" ]] &&
|
||||||
&& kill_services >/dev/null
|
kill_services >/dev/null
|
||||||
unfunction kill_services
|
unfunction kill_services
|
||||||
|
|
|
@ -3,9 +3,9 @@ export PATH="$HOME/.local/bin:$PATH"
|
||||||
(( ${+commands[go]} )) && export PATH="$(go env GOPATH)/bin:$PATH"
|
(( ${+commands[go]} )) && export PATH="$(go env GOPATH)/bin:$PATH"
|
||||||
|
|
||||||
# Essentials
|
# Essentials
|
||||||
[[ $(lsb_release -si) != "Debian" ]] && [[ $(lsb_release -si) != "Ubuntu" ]] \
|
[[ $(lsb_release -si) =~ "^Debian|Ubuntu$" ]] &&
|
||||||
&& export LANG="en_DK.UTF-8" \
|
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 PAGER="less"
|
||||||
export EDITOR="nano"
|
export EDITOR="nano"
|
||||||
(( ${+commands[vim]} )) && export EDITOR="vim"
|
(( ${+commands[vim]} )) && export EDITOR="vim"
|
||||||
|
|
|
@ -17,7 +17,8 @@ static_file="$ZDOTDIR/.zsh_plugins.zsh"
|
||||||
|
|
||||||
# Clone antidote if necessary and generate a static plugin file
|
# Clone antidote if necessary and generate a static plugin file
|
||||||
if [[ ! $static_file -nt $plugins_txt ]]; then
|
if [[ ! $static_file -nt $plugins_txt ]]; then
|
||||||
[[ -e $antidote_dir ]] || git clone --depth=1 https://github.com/mattmc3/antidote.git $antidote_dir
|
[[ -e $antidote_dir ]] ||
|
||||||
|
git clone --depth=1 https://github.com/mattmc3/antidote.git $antidote_dir
|
||||||
(
|
(
|
||||||
source $antidote_dir/antidote.zsh
|
source $antidote_dir/antidote.zsh
|
||||||
antidote bundle <$plugins_txt >$static_file
|
antidote bundle <$plugins_txt >$static_file
|
||||||
|
|
|
@ -37,10 +37,10 @@ alias unlock="udisksctl unlock -b"
|
||||||
alias unmount="udisksctl unmount -b"
|
alias unmount="udisksctl unmount -b"
|
||||||
|
|
||||||
# Misc.
|
# Misc.
|
||||||
(( ${+commands[tmux]} )) \
|
(( ${+commands[tmux]} )) &&
|
||||||
&& alias tmux="tmux -2u"
|
alias tmux="tmux -2u"
|
||||||
(( ${+commands[dotnet]} )) \
|
(( ${+commands[dotnet]} )) &&
|
||||||
&& alias dnup="dotnet tool list --global | tail -n +3 | awk '{print \$1}' | xargs -l dotnet tool update --global"
|
alias dnup="dotnet tool list --global | tail -n +3 | awk '{print \$1}' | xargs -l dotnet tool update --global"
|
||||||
alias cl="clear"
|
alias cl="clear"
|
||||||
alias -g e="\$EDITOR"
|
alias -g e="\$EDITOR"
|
||||||
alias grep="grep --color=always"
|
alias grep="grep --color=always"
|
||||||
|
@ -69,7 +69,7 @@ elif [[ $(lsb_release -si) == "Fedora" ]]; then
|
||||||
alias dnfrm="sudo dnf remove"
|
alias dnfrm="sudo dnf remove"
|
||||||
alias dnfsi="sudo dnf info"
|
alias dnfsi="sudo dnf info"
|
||||||
alias dnfss="sudo dnf search"
|
alias dnfss="sudo dnf search"
|
||||||
elif [[ $(lsb_release -si) == "Debian" ]] || [[ $(lsb_release -si) == "Ubuntu" ]]; then
|
elif [[ $(lsb_release -si) =~ "^Debian|Ubuntu$" ]]; then
|
||||||
alias aptin="sudo apt install"
|
alias aptin="sudo apt install"
|
||||||
alias aptqi="dpkg -s"
|
alias aptqi="dpkg -s"
|
||||||
alias aptqs="dpkg -l"
|
alias aptqs="dpkg -l"
|
||||||
|
|
|
@ -2,13 +2,13 @@ bt() {
|
||||||
(( ${+commands[bluetoothctl]} )) || return 2
|
(( ${+commands[bluetoothctl]} )) || return 2
|
||||||
|
|
||||||
if [[ $1 == on ]]; then
|
if [[ $1 == on ]]; then
|
||||||
(( ${+commands[connmanctl]} )) \
|
(( ${+commands[connmanctl]} )) &&
|
||||||
&& connmanctl enable bluetooth \
|
connmanctl enable bluetooth ||
|
||||||
|| bluetoothctl power on
|
bluetoothctl power on
|
||||||
elif [[ $1 == off ]]; then
|
elif [[ $1 == off ]]; then
|
||||||
(( ${+commands[connmanctl]} )) \
|
(( ${+commands[connmanctl]} )) &&
|
||||||
&& connmanctl disable bluetooth \
|
connmanctl disable bluetooth ||
|
||||||
|| bluetoothctl power off
|
bluetoothctl power off
|
||||||
else
|
else
|
||||||
bluetoothctl "$@"
|
bluetoothctl "$@"
|
||||||
fi
|
fi
|
||||||
|
@ -19,13 +19,12 @@ doasedit() {
|
||||||
[[ $# -eq 0 ]] || return 1
|
[[ $# -eq 0 ]] || return 1
|
||||||
|
|
||||||
doas -L
|
doas -L
|
||||||
doas -u root sh -c \
|
doas -u root sh -c "cp /etc/doas.conf /tmp/doas.conf &&
|
||||||
"cp /etc/doas.conf /tmp/doas.conf \
|
rvim -n /tmp/doas.conf &&
|
||||||
&& rvim -n /tmp/doas.conf \
|
doas -C /tmp/doas.conf &&
|
||||||
&& doas -C /tmp/doas.conf \
|
mv /tmp/doas.conf /etc/doas.conf &&
|
||||||
&& mv /tmp/doas.conf /etc/doas.conf \
|
echo 'ok' ||
|
||||||
&& echo 'ok' \
|
echo >&2 'error'"
|
||||||
|| echo >&2 'error'"
|
|
||||||
local STATUS=$?
|
local STATUS=$?
|
||||||
doas -L
|
doas -L
|
||||||
|
|
||||||
|
@ -36,9 +35,7 @@ get_ip() {
|
||||||
(( ${+commands[curl]} )) || return 2
|
(( ${+commands[curl]} )) || return 2
|
||||||
|
|
||||||
while [[ $# -gt 0 ]]; do
|
while [[ $# -gt 0 ]]; do
|
||||||
[[ $1 == --ip ]] \
|
[[ $1 == --ip ]] && local IP="?ip=$2" && shift || local ARGS+=("$1")
|
||||||
&& local IP="?ip=$2" && shift \
|
|
||||||
|| local ARGS+=("$1")
|
|
||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
if [[ $(lsb_release -si) != "Debian" ]] && [[ $(lsb_release -si) != "Ubuntu" ]]; then
|
if [[ $(lsb_release -si) =~ "^Debian|Ubuntu$" ]]; 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