From 0b8c2e718d06bc10fde743fd110f03e1a0c97cc9 Mon Sep 17 00:00:00 2001 From: Joe Groocock Date: Sat, 31 Mar 2018 13:16:54 +0100 Subject: [PATCH 1/3] scripts: re-add missing dock-displays utility --- scripts/dock-displays | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 scripts/dock-displays diff --git a/scripts/dock-displays b/scripts/dock-displays new file mode 100755 index 0000000..ac7244f --- /dev/null +++ b/scripts/dock-displays @@ -0,0 +1,17 @@ +#!/bin/sh +set -e + +SCALE=${1:-1.4} +OUTPUT=eDP1 +NWIDTH=2160 +NHEIGHT=1440 + +WIDTH="$(bc <<< "$NWIDTH / $SCALE")" # $(($NWIDTH / $SCALE)) +HEIGHT="$(bc <<< "$NHEIGHT / $SCALE")" # $(($NHEIGHT / $SCALE)) + +MODELINE=$(cvt $WIDTH $HEIGHT | sed -n 's/Modeline\s*//p' | tr -d \") +MODENAME=${MODELINE%% *} + +xrandr --newmode $MODELINE 2>/dev/null || true +xrandr --addmode $OUTPUT $MODENAME 2>/dev/null || true +xrandr --output $OUTPUT --mode $MODENAME From 92542e8cf0abe2cf0ef7299b03f0173252349f3b Mon Sep 17 00:00:00 2001 From: Joe Groocock Date: Sat, 31 Mar 2018 13:44:42 +0100 Subject: [PATCH 2/3] vim: visually indent wrapped lines --- .config/vim/vimrc | 1 + 1 file changed, 1 insertion(+) diff --git a/.config/vim/vimrc b/.config/vim/vimrc index 4e016a3..9eca9ec 100644 --- a/.config/vim/vimrc +++ b/.config/vim/vimrc @@ -18,6 +18,7 @@ set smartindent set number set linebreak set autoindent +set breakindent set laststatus=2 set encoding=utf-8 set background=dark From fe7b74fb0a92122a4de3e4aae2c5d7f1307dc3b2 Mon Sep 17 00:00:00 2001 From: Joe Groocock Date: Sat, 31 Mar 2018 13:46:04 +0100 Subject: [PATCH 3/3] zsh: manage autogen with git, fixes `autogen selfupdate' --- .zshrc | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/.zshrc b/.zshrc index 4849327..5d7ca21 100644 --- a/.zshrc +++ b/.zshrc @@ -5,9 +5,10 @@ CONFIG_DIR="${XDG_CONFIG_HOME:-$HOME/.config}" ZSH_DIR="$CONFIG_DIR/zsh" ZSH_CACHE_DIR="$CONFIG_DIR/oh-my-zsh/cache" ADOTDIR="$ZSH_DIR/antigen" # Antigen directory -ANTIGEN_LOG="$ADOTDIR/log/antigen-$(date +"%Y_%m_%d_%I_%M_%p").log" +LOG_DIR="$ZSH_DIR/log" +ANTIGEN_LOG="$LOG_DIR/antigen-$(date +"%Y_%m_%d_%I_%M_%p").log" -mkdir -p "$ZSH_CACHE_DIR" "$ZSH_DIR" "$ADOTDIR/log" +mkdir -p "$ZSH_CACHE_DIR" "$ZSH_DIR" "$LOG_DIR" HISTFILE="$ZSH_DIR/histfile" HISTSIZE=999999 @@ -43,14 +44,9 @@ zstyle ':compinstall' filename "$HOME/.zshrc" # Load antigen & plugins -antigen_src="$ZSH_DIR/antigen.zsh" +antigen_src="$ADOTDIR/antigen.zsh" if [ ! -f "$antigen_src" ]; then - if exists curl; then - getcmd='curl -L' - else - getcmd='wget -qO-' - fi - eval $getcmd git.io/antigen > "$antigen_src" + git clone https://github.com/zsh-users/antigen.git "$ADOTDIR" fi source "$antigen_src"