aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.bash_aliases3
-rw-r--r--.zsh_aliases11
-rw-r--r--.zshrc13
-rw-r--r--Makefile64
-rw-r--r--README.md17
-rwxr-xr-xinstall.sh42
-rw-r--r--xmonad.hs2
7 files changed, 66 insertions, 86 deletions
diff --git a/.bash_aliases b/.bash_aliases
deleted file mode 100644
index fffa45a..0000000
--- a/.bash_aliases
+++ /dev/null
@@ -1,3 +0,0 @@
-alias adg='sudo apt update && sudo apt upgrade -y'
-alias yoump3='youtube-dl --extract-audio --audio-format mp3'
-alias python="python3.7"
diff --git a/.zsh_aliases b/.zsh_aliases
index 9316d1f..29a79b1 100644
--- a/.zsh_aliases
+++ b/.zsh_aliases
@@ -49,13 +49,16 @@ alias gcl="git clone --recurse-submodules"
alias gst="git status"
alias gco="git checkout"
+# lpass (lastpass-cli)
+alias lpassp="lpass show --password --clip" # put password in clipboard
+
+# helper to switch between dual and single monitor setup
+alias dual='xrandr --output LVDS1 --primary --left-of VGA1 --output VGA1 --auto'
+alias single='xrandr --output VGA1 --off'
+
# edit config files
alias zshrc="vim $DOTFILES/.zshrc && source $DOTFILES/.zshrc"
alias zshaliasrc="vim $DOTFILES/.zsh_aliases && source $DOTFILES/.zshrc"
alias vimrc="vim $DOTFILES/.vimrc"
alias vimplugrc="vim $DOTFILES/.pluggins.vim"
alias xmonadrc="vim $DOTFILES/xmonad.hs && cp $DOTFILES/xmonad.hs $HOME/.xmonad/xmonad.hs"
-
-# helper to switch between dual and single monitor setup
-alias dual='xrandr --output LVDS1 --primary --left-of VGA1 --output VGA1 --auto'
-alias single='xrandr --output VGA1 --off'
diff --git a/.zshrc b/.zshrc
index f445d93..3e752e9 100644
--- a/.zshrc
+++ b/.zshrc
@@ -2,6 +2,8 @@
# zshrc #
###############
+export DOTFILES=$HOME/dotfiles
+
# load aliases
source $DOTFILES/.zsh_aliases
@@ -14,6 +16,7 @@ prompt pure
# auto complete
autoload -U compinit
+zstyle ':completion:*' menu select # menu like
zstyle ':completion:*' matcher-list '' \
'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=*' 'r:|=* l:|=* r:|=*' # case insensitive
zmodload zsh/complist
@@ -46,8 +49,6 @@ function chpwd() {
fi
}
-export DOTFILES=$HOME/dotfiles
-
# add command-not-found package suggestion
#source /etc/zsh_command_not_found
@@ -69,5 +70,9 @@ export EDITOR="vim"
# set tab to 4 spaces
tabs 4
-# prompt syntax highlight
-source $HOME/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
+# pluggins
+source $HOME/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh # prompt syntax highlight
+
+export YSU_MESSAGE_POSITION="after" # you-should-use message after command output
+source $HOME/.zsh/zsh-you-should-use/you-should-use.plugin.zsh # alias reminder
+
diff --git a/Makefile b/Makefile
deleted file mode 100644
index f75bbc8..0000000
--- a/Makefile
+++ /dev/null
@@ -1,64 +0,0 @@
-DOTDIR = $(HOME)/dotfiles
-ZSHRC = .zshrc
-VIMRC = .vimrc
-BASHRC = .bashrc
-BASHALIAS = .bash_aliases
-GHCI = .ghci
-GDB = .gdbinit
-GITCONFIG = .gitconfig
-XMONADCONFIG = .xmonad/xmonad.hs
-CONFFILES = $(addprefix $(HOME), $(ZSHRC) $(VIMRC) $(BASHRC) $(BASHALIAS) $(GHCI) $(GDB) $(GITCONFIG)) $(XMONADCONFIG)
-
-.PHONY: all
-all: $(CONFFILES)
-
-$(HOME)/$(ZSHRC): $(DOTDIR)/$(ZSHRC)
- touch $@
- echo "source $<" > $@
-
-$(HOME)/$(VIMRC): $(DOTDIR)/$(VIMRC)
- touch $@
- echo "so $<" > $@
-
-$(HOME)/$(BASHRC): $(DOTDIR)/$(BASHRC)
- touch $@
- echo "source $<" > $@
-
-$(HOME)/$(BASHALIAS): $(DOTDIR)/$(BASHALIAS)
- touch $@
- echo "source $<" > $@
-
-$(HOME)/$(GHCI): $(DOTDIR)/$(GHCI)
- touch $@
- cat $< > $@
-
-$(HOME)/$(GDB): $(DOTDIR)/$(GDB)
- touch $@
- cat $< > $@
-
-$(HOME)/$(GITCONFIG): $(DOTDIR)/$(GITCONFIG)
- touch $@
- cat $< >> $@
-
-$(HOME)/$(XMONADCONFIG): $(DOTDIR)/xmonad.hs
- cp $< $@
-
-.PHONY: clean
-clean:
- rm -f $(CONFFILES)
-
-.PHONY: re
-re: clean all
-
-# .PHONY: dependencies
-# dependencies:
-# @echo "Installing vim-plug (plugin manager)"
-# curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
-# https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
-# @echo "Installing vim plugins"
-# vim -c "PlugInstall" -c "qa"
-# @echo "Installing oh-my-zsh"
- # sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
- # @echo "Installing zsh-syntax-highlighting"
- # git clone https://github.com/zsh-users/zsh-syntax-highlighting.git \
- # ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
diff --git a/README.md b/README.md
index 4522370..28f8cf1 100644
--- a/README.md
+++ b/README.md
@@ -1,20 +1,17 @@
-# Configuration files
+# Dotfiles
## Installation
-1. backup your current configuration files, they will be overwrite
+1. Backup your current configuration files, they will be overwrite
2. `cd` in this repo
-3. run `make`
+3. Run the `install.sh` script
## Tools I use
-* [vim](https://github.com/vim/vim): terminal text editor
-* [zsh](https://www.zsh.org/): interactive shell
-* [oh-my-zsh](https://github.com/robbyrussell/oh-my-zsh): plugins and themes for zsh
-* [tmux](https://github.com/tmux/tmux): multiple terminal/panel
-* [redshift](https://github.com/jonls/redshift): change screen color temperature
-
-The tmux theme can be found [here](https://github.com/jimeh/tmux-themepack).
+* [vim](https://github.com/vim/vim) - terminal text editor
+* [zsh](https://www.zsh.org/) - interactive shell
+* [xmonad](https://xmonad.org) - window manager
+* [redshift](https://github.com/jonls/redshift) - change screen color temperature
## School 19 Config
diff --git a/install.sh b/install.sh
new file mode 100755
index 0000000..d866f32
--- /dev/null
+++ b/install.sh
@@ -0,0 +1,42 @@
+#!/bin/sh
+
+###########################
+# dotfiles install script #
+###########################
+
+# dotfiles directory
+[ -z $DOTDIR ] && DOTDIR=`pwd`
+
+# Creating links
+ls -sf $DOTDIR/.zshrc $HOME/.zshrc
+ls -sf $DOTDIR/.vimrc $HOME/.vimrc
+
+[ ! -d $HOME/.xmonad ] && mkdir $HOME/.xmonad
+ls -sf $DOTDIR/xmonad.hs $HOME/.xmonad/xmonad.hs
+
+ls -sf $DOTDIR/.gdbinit $HOME/.gdbinit
+ls -sf $DOTDIR/.ghci $HOME/.ghci
+ls -sf $DOTDIR/.gitconfig $HOME/.gitconfig
+
+[ ! -d $HOME/.config ] && mkdir $HOME/.config
+ls -sf $DOTDIR/redshift.conf $HOME/.config/redshift.conf
+
+################
+# dependencies #
+################
+
+# vim Plug
+curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
+ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
+vim -c "PlugInstall" -c "qa"
+
+# zsh pluggins
+[ ! -d $HOME/.zsh ] && make $HOME/.zsh
+# pure theme
+git clone https://github.com/sindresorhus/pure $HOME/.zsh/pure
+# syntax hightlighting
+git clone https://github.com/zsh-users/zsh-syntax-highlighting \
+ $HOME/.zsh/zsh-syntax-highlighting
+# you should use
+git clone https://github.com/MichaelAquilina/zsh-you-should-use \
+ $HOME/.zsh/zsh-you-should-use
diff --git a/xmonad.hs b/xmonad.hs
index fda600f..eb9edb3 100644
--- a/xmonad.hs
+++ b/xmonad.hs
@@ -3,7 +3,7 @@ import XMonad.Config.Desktop
-- Utilities
import XMonad.Util.SpawnOnce
-import XMonad.Util.EZConfig(additionalKeys, additionalKeysP)
+import XMonad.Util.EZConfig(additionalKeysP)
myModMask = mod4Mask
myTerminal = "konsole"