diff --git a/bin/_install_apt_proxy.sh b/bin/_install_apt_proxy.sh new file mode 100755 index 0000000..afa3f13 --- /dev/null +++ b/bin/_install_apt_proxy.sh @@ -0,0 +1,34 @@ +#!/bin/bash + +set -o errexit +set -o nounset + +if test -f /etc/apt/apt.conf.d/90-proxy ; then + echo "Looks already setup." +fi + +cat >/etc/apt/proxy-detect <<'EOF' +#!/bin/bash + +PROXY=192.168.60.10:3142 + +if ! test -x /bin/nc ; then + echo DIRECT + exit 0 +fi + +if nc -w 2 -z ${PROXY/:/ } ; then + echo ${PROXY} + exit 0 +fi + +echo DIRECT +EOF + +chmod +x /etc/apt/proxy-detect + +cat >/etc/apt/apt.conf.d/90-proxy <<'EOF' +Acquire::http::Proxy-Auto-Detect "/etc/apt/proxy-detect"; +EOF + +echo "Setup APT Proxying." diff --git a/dotfiles/Xresources b/dotfiles/Xresources index 04c1e8b..a324518 100644 --- a/dotfiles/Xresources +++ b/dotfiles/Xresources @@ -3,7 +3,7 @@ Xcursor.size: 16 !!! ! Xft for fonts !!! -Xft.dpi: 96 +!Xft.dpi: 144 Xft.antialias: false Xft.lcdfilter: lcddefault Xft.rgba: rgb diff --git a/dotfiles/env b/dotfiles/env index bb443f1..f914dff 100755 --- a/dotfiles/env +++ b/dotfiles/env @@ -27,22 +27,36 @@ export VIRTUALENVWRAPPER_VIRTUALENV_ARGS='--no-site-packages' export GPG_ID=7FD58D9A196DCEEEAD671F94F4D7A7915DEA789B # Setup locale -for l in en_US.UTF-8 C ; do - if grep -q "${l}" /usr/share/i18n/SUPPORTED ; then - export LC_CTYPE=${l} - export LC_NUMERIC=${l} - export LC_TIME=${l} - export LC_MONETARY=${l} - export LC_MESSAGES=${l} - export LC_PAPER=${l} - export LC_NAME=${l} - export LC_ADDRESS=${l} - export LC_TELEPHONE=${l} - export LC_MEASUREMENT=${l} - export LC_IDENTIFICATION=${l} - break - fi -done +if test -f /usr/share/i18n/SUPPORTED ; then + for l in en_US.UTF-8 C ; do + if grep -q "${l}" /usr/share/i18n/SUPPORTED ; then + export LC_CTYPE=${l} + export LC_NUMERIC=${l} + export LC_TIME=${l} + export LC_MONETARY=${l} + export LC_MESSAGES=${l} + export LC_PAPER=${l} + export LC_NAME=${l} + export LC_ADDRESS=${l} + export LC_TELEPHONE=${l} + export LC_MEASUREMENT=${l} + export LC_IDENTIFICATION=${l} + break + fi + done +else + export LC_CTYPE=C + export LC_NUMERIC=C + export LC_TIME=C + export LC_MONETARY=C + export LC_MESSAGES=C + export LC_PAPER=C + export LC_NAME=C + export LC_ADDRESS=C + export LC_TELEPHONE=C + export LC_MEASUREMENT=C + export LC_IDENTIFICATION=C +fi export LC_COLLATE=C if [[ -e $HOME/.localenv ]] ; then source $HOME/.localenv ; fi diff --git a/dotfiles/zprezto_custom/matir/functions/prompt_matir_setup b/dotfiles/zprezto_custom/matir/functions/prompt_matir_setup index de89e78..4adec18 100644 --- a/dotfiles/zprezto_custom/matir/functions/prompt_matir_setup +++ b/dotfiles/zprezto_custom/matir/functions/prompt_matir_setup @@ -51,7 +51,9 @@ function prompt_matir_setup { function prompt_matir_precmd { vcs_info - python-info + if (( $+functions[python-info] )); then + python-info + fi } ### git: Show marker (*) if there are untracked files in repository diff --git a/dotfiles/zshrc b/dotfiles/zshrc index eb8f631..834fc95 100755 --- a/dotfiles/zshrc +++ b/dotfiles/zshrc @@ -4,10 +4,10 @@ HISTSIZE=10000 SAVEHIST=10000 setopt appendhistory autocd autopushd extendedglob nohup nomatch histignorespace histlexwords histverify cbases unsetopt beep histbeep listbeep flowcontrol -bindkey -e +bindkey -v # Completion -zstyle :compinstall filename '/home/david/.zshrc' +zstyle :compinstall filename "${HOME}/.zshrc" autoload -Uz compinit && compinit DIRSTACKSIZE=16 @@ -36,9 +36,6 @@ fi # Overrides to prezto unsetopt cdablevars -# No groupings of completions - zstyle ':completion:*' format '' - # .profile is universal # but after zprezto to use/override anything setup there . ~/.profile diff --git a/install.sh b/install.sh index 0f0b826..d1ef817 100755 --- a/install.sh +++ b/install.sh @@ -221,7 +221,7 @@ run_as_root() { if [ ${USER} = "root" ] ; then "$@" return $? - elif groups | grep -q '\bsudo\b' ; then + elif test -x $(which sudo 2>/dev/null) ; then verbose "Using sudo to run ${1}..." sudo "$@" return $? diff --git a/keys/ssh/id_ecdsa_chromebook.pub b/keys/ssh/id_ecdsa_chromebook.pub new file mode 100644 index 0000000..1014780 --- /dev/null +++ b/keys/ssh/id_ecdsa_chromebook.pub @@ -0,0 +1 @@ +ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBIsFYLEsalNh/l6PtMZhi0f/eZ22uoMw/xYpgPy6vBU6OlpN2FjW7R0pwX29fZjjVQoF0eEG0K/9/CcYcnxtspw= chronos@localhost