Compare commits

..

No commits in common. "eeee10a6fc684960424fb0c8f8b24b232f192d11" and "e386d2ba04b393fcb3a9db816d9cb5bd764331bd" have entirely different histories.

5 changed files with 11 additions and 49 deletions

View file

@ -41,7 +41,7 @@ alias rm='rm -I'
alias cp='cp -i'
alias mv='mv -i'
# Completion and Extras
# Bash completion
src() { test -f "$1" && source "$1"; }
@ -52,6 +52,7 @@ bind '"\ej":history-search-forward'
shopt -oq posix || src /etc/bash_completion
# Fancy prompt
PS1="\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\W\[\033[00m\]"
PS1="$PS1 \`if [ \$? = 0 ]; then echo -e '\[\033[01;32m\]:)';"
PS1="$PS1 else echo -e '\[\033[01;31m\]' \$?; fi\`\[\033[00m\]"

View file

@ -1,24 +0,0 @@
command_not_found_handler() {
local pkgs cmd="$1"
pkgs=(${(f)"$(pkgfile -b -v -- "$cmd" 2>/dev/null)"})
if [[ -n "$pkgs" ]]; then
printf 'The application %s is not installed. It may be found in the following packages:\n' "$cmd"
printf ' %s\n' $pkgs[@]
setopt shwordsplit
pkg_array=($pkgs[@])
pkgname="${${(@s:/:)pkg_array}[2]}"
printf 'Do you want to Install package %s? (y/N) ' $pkgname
if read -q "choice? "; then
echo
echo "Executing command: pamac install $pkgname"
pamac install $pkgname
else
echo " "
fi
else
printf 'zsh: command not found: %s\n' "$cmd"
fi 1>&2
return 127
}

View file

@ -175,11 +175,11 @@ alias syslog='less +F /var/log/syslog'
alias sc='sudo systemctl'
alias scd='sudo systemctl disable --now'
unalias scs sce 2>/dev/null
sce() {
sudo systemctl enable --now "$@" ||
sudo systemctl status "$@"
}
unalias scs 2>/dev/null
scs() {
(
export SYSTEMD_COLORS=true
@ -478,7 +478,7 @@ which exa >/dev/null &&
alias l='exa --icons' &&
alias ll='l --long --extended --git --all'
if which fd >/dev/null 2>&1
if which fd >/dev/null
then fn() { $(command -v fd || echo fdfind) --hidden --no-ignore-vcs --one-file-system "$@" | less -F; } # [F]ind [n]o ignore
alias ff="noglob fn --color=always " # [F]ind [F]ile
compdef ff=fd

View file

@ -27,26 +27,13 @@ ExecStart=-$agetty --skip-login --login-options $USER %I" |
sudo tee /etc/systemd/system/getty@tty1.service.d/override.conf /etc/systemd/system/getty@tty2.service.d/override.conf /etc/systemd/system/getty@tty3.service.d/override.conf
highlight "Sysyadm setup"
if test -d "/etc/yadm/repo.git/"
if test -d "/etc/yadm"
then sy l
else echo "" | sy clone
else sy clone
fi
SECTION "Software"
highlight "Cleanup Manjaro Sway Dotfiles"
rmexist() {
for arg
do test -e "$arg" && echo -n "$arg: " && rm -rI "$arg"
done
}
rmexist "$XDG_CONFIG_HOME/nvim/init.lua" "$HOME/.emacs.d/"
highlight "MPD"
mkdir "${XDG_STATE_HOME}/mpd"
sudo systemctl enable --now mpd
mpc update
template() {
local dir=$(dirname "$1")
local file=${1/.template}
@ -89,13 +76,10 @@ test -d "$_ovpn" &&
sudo chown -vR janek:openvpn "$_ovpn"
highlight "Cron"
sudo systemctl enable --now cronie
if test -d "/etc/rsyslog.d"; then
echo 'cron.* /var/log/cron.log' | sudo tee /etc/rsyslog.d/60-cron.conf
hasService=$(which service 2>/dev/null)
test "$hasService" && sudo service rsyslog restart || sudo systemctl restart rsyslog
test "$hasService" && sudo service cron reload || sudo systemctl reload cronie
fi
echo 'cron.* /var/log/cron.log' | sudo tee /etc/rsyslog.d/60-cron.conf
hasService=$(which service 2>/dev/null)
test "$hasService" && sudo service rsyslog restart || sudo systemctl restart rsyslog
test "$hasService" && sudo service cron reload || sudo systemctl reload cronie
highlight "Zsh"
test -n "$ZSH" || export ZSH="${XDG_DATA_HOME:-$HOME/.local/share}/zsh/oh-my-zsh"

View file

@ -187,6 +187,7 @@ source_existing() {
done
}
source_existing /usr/share/zsh/manjaro-zsh-config
source_existing $CONFIG_ZSH/.p10k.zsh # To customize prompt, run `p10k configure` or edit .p10k.zsh.
source_existing /usr/share/fzf/key-bindings.zsh /usr/share/fzf/completion.zsh