From 587d3a517cfefd83b3e38f8019970df48cb44c03 Mon Sep 17 00:00:00 2001 From: Wryn Wagner Date: Mon, 30 Dec 2019 23:44:40 -0700 Subject: [PATCH] Fixed zsh suffix issue when booting i3 with zsh --- config/xserver/set_randr_layout | 23 ++++++++++++++++++++--- config/xserver/xinitrc | 5 ++--- vim/rc.vim | 2 ++ zsh/suffixes | 3 +-- 4 files changed, 25 insertions(+), 8 deletions(-) diff --git a/config/xserver/set_randr_layout b/config/xserver/set_randr_layout index 4768f83..73057f9 100755 --- a/config/xserver/set_randr_layout +++ b/config/xserver/set_randr_layout @@ -1,5 +1,22 @@ -#!/bin/bash -source $HOME/.my_bash_env +#!/bin/zsh +source $HOME/.my_zsh_env XSERVER_DIR="$DOTWRYN/config/xserver" -"$XSERVER_DIR/screenlayout/workdock.sh" +AT_HOME="$(xrandr | grep -q 'HDMI-0 connected')"; +AT_RENT="$(xrandr | grep -q 'DP-0 connected' || xrandr | grep -q 'DP-1 connected')"; + +echo at home >> /home/w0ryn/test +echo $AT_HOME >> /home/w0ryn/test + +echo >> /home/w0ryn/test + +echo at rent >> /home/w0ryn/test +echo $AT_RENT >> /home/w0ryn/test + +if $AT_HOME ; then + "$XSERVER_DIR/screenlayout/homedock_hdmionly.sh"; +elif $AT_RENT; then + "$XSERVER_DIR/screenlayout/workdock.sh" +else; + "$XSERVER_DIR/screenlayout/undock.sh"; +fi diff --git a/config/xserver/xinitrc b/config/xserver/xinitrc index fcc1d07..4982b01 100644 --- a/config/xserver/xinitrc +++ b/config/xserver/xinitrc @@ -1,5 +1,5 @@ -#!/bin/bash -source $HOME/.my_bash_env +#!/bin/sh +source $HOME/.my_zsh_env CUSTOM_DMENU_COMMANDS="$HOME/.local/custom_dmenu" @@ -11,5 +11,4 @@ XSERVER_DIR="$DOTWRYN/config/xserver" "$XSERVER_DIR/set_randr_layout" & - exec i3 diff --git a/vim/rc.vim b/vim/rc.vim index d1978b5..e96081b 100644 --- a/vim/rc.vim +++ b/vim/rc.vim @@ -3,6 +3,8 @@ source $HOME/.my_vim_env "sets the following variables: "$RC_DIR $VIM_DIR $WRYNVIMRC $WRYNBASH $MYBASHRC $WEBBROWSER +set encoding=utf-8 + let mapleader = "\\" "let localmapleader = ',' diff --git a/zsh/suffixes b/zsh/suffixes index 254d67f..12ac1ca 100644 --- a/zsh/suffixes +++ b/zsh/suffixes @@ -2,13 +2,12 @@ PYTHON="py" CLISP="clisp lisp" - SHELL="sh bash zsh" TEXT="txt md js"; WEB="css scss less html php cshtml json" JS="ts tsx js" C="cpp h c cs" -FILES_TO_EDIT="$PYTHON $CLISP $SHELL $TEXT $WEB $JS $C"; +FILES_TO_EDIT="$PYTHON $CLISP $TEXT $WEB $JS $C"; for filetype in ${(s/ /)FILES_TO_EDIT}; do alias -s $filetype="$EDITOR";