From 7f37720c786fbab7700e746a182ff389d58945fe Mon Sep 17 00:00:00 2001 From: tactonbishop Date: Tue, 3 May 2022 21:26:33 +0100 Subject: [PATCH] Add more dotfiles --- x/.xinitrc | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ zsh/.zshrc | 14 ++++++++++-- 2 files changed, 77 insertions(+), 2 deletions(-) create mode 100644 x/.xinitrc diff --git a/x/.xinitrc b/x/.xinitrc new file mode 100644 index 0000000..51c8c6d --- /dev/null +++ b/x/.xinitrc @@ -0,0 +1,65 @@ +#!/bin/sh + +userresources=$HOME/.Xresources +usermodmap=$HOME/.Xmodmap +sysresources=/etc/X11/xinit/.Xresources +sysmodmap=/etc/X11/xinit/.Xmodmap + +# merge in defaults and keymaps + +if [ -f $sysresources ]; then + + + + + + + + xrdb -merge $sysresources + +fi + +if [ -f $sysmodmap ]; then + xmodmap $sysmodmap +fi + +if [ -f "$userresources" ]; then + + + + + + + + xrdb -merge "$userresources" + +fi + +if [ -f "$usermodmap" ]; then + xmodmap "$usermodmap" +fi + +# start some nice programs + +if [ -d /etc/X11/xinit/xinitrc.d ] ; then + for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do + [ -x "$f" ] && . "$f" + done + unset f +fi + + +#### Custom ######## + +# Set external monitor config +xrandr --output VGA1 --primary --above LVDS1 + +# Set UK keyboard +setxkbmap gb + +# Set custom keybindings +xmodmap ~/.Xmodmap + +# Start i3 window manager +exec i3 + diff --git a/zsh/.zshrc b/zsh/.zshrc index 70aab71..80ba14b 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -1,9 +1,16 @@ +# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc. +# Initialization code that may require console input (password prompts, [y/n] +# confirmations, etc.) must go above this block; everything else may go below. +if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then + source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" +fi + export ZSH="/home/thomas/.oh-my-zsh" alias vim="nvim" alias cat="bat" alias grep="rg" - +alias chrome="google-chrome-stable" # Set properties based on OS case "$OSTYPE" in @@ -22,7 +29,7 @@ case "$OSTYPE" in ;; linux*) # Linux specific - ZSH_THEME=robbyrussell + ZSH_THEME=agnoster ;; esac @@ -46,3 +53,6 @@ prompt_end() { source $ZSH/oh-my-zsh.sh export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")" [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" + +# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh. +[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh