Initial commit

d8b5ca03247de1bbd9752b910b62ac9c5ed4b876
cloudhead committed ago
.Xmodmap added +13 -0
1 +
!
2 +
! .Xmodmap
3 +
!
4 +
5 +
clear Mod1
6 +
clear Mod2
7 +
keycode 63 = Mode_switch
8 +
9 +
! bind Alt key to Meta
10 +
keycode 66 = Meta_L
11 +
keycode 69 = Meta_R
12 +
add Mod1 = Meta_L
13 +
add Mod2 = Mode_switch
.Xresources added +43 -0
1 +
!
2 +
! .Xresources
3 +
!
4 +
URxvt.scrollBar:           false
5 +
URxvt.saveLines:           8192
6 +
URxvt.internalBorder:      4
7 +
URxvt.externalBorder:      0
8 +
URxvt.highlightSelection:  true
9 +
URxvt.loginShell:          true
10 +
URxvt.termName:            xterm-256color
11 +
URxvt.font:                -gohu-*-medium-*-*-*-14-*-*-*-*-*-*-*
12 +
URxvt.boldFont:            -gohu-*-bold-*-*-*-14-*-*-*-*-*-*-*
13 +
URxvt.colorBD:             #FFFFFF
14 +
URxvt.cursorColor:         darkred
15 +
URxvt.borderColor:         black
16 +
URxvt.scrollColor:         black
17 +
URxvt.underlineColor:      white
18 +
URxvt.foreground:          #CCCCCC
19 +
URxvt.background:          #000000
20 +
URxvt.mapAlert:            true
21 +
URxvt.highlightColor:      darkred
22 +
23 +
*color0:  #000000
24 +
*color1:  #AA0000
25 +
*color2:  #00AA00
26 +
*color3:  yellow
27 +
*color4:  #0000AA
28 +
*color5:  #AA00AA
29 +
*color6:  #00AAAA
30 +
*color7:  #AAAAAA
31 +
*color8:  #666666
32 +
*color9:  #FF5555
33 +
*color10: #55FF55
34 +
*color11: #FFFF55
35 +
*color12: #5555FF
36 +
*color13: #FF55FF
37 +
*color14: #55FFFF
38 +
*color15: #FFFFFF
39 +
40 +
URxvt.keysym.C-0: command:\033]50;-gohu-*-medium-*-*-*-14-*-*-*-*-*-*-*\007\033]711;-gohu-*-bold-*-*-*-14-*-*-*-*-*-*-*\007
41 +
URxvt.keysym.C-1: command:\033]50;-gohu-*-medium-*-*-*-11-*-*-*-*-*-*-*\007\033]711;-gohu-*-bold-*-*-*-11-*-*-*-*-*-*-*\a
42 +
URxvt.keysym.C-2: command:\033]50;xft: DejaVu Sans Mono:pixelsize=15:antialias=false\007\033]711;xft: DejaVu Sans Mono:pixelsize=15:style=Bold:antialias=false\007
43 +
.Xsessions added +1 -0
1 +
xrdb -merge .Xresources
.dwm/config.h added +105 -0
1 +
/* See LICENSE file for copyright and license details. */
2 +
3 +
/* appearance */
4 +
static const char font[]            = "-gohu-*-medium-*-*-*-14-*-*-*-*-*-*-*";
5 +
static const char normbordercolor[] = "#000000";
6 +
static const char normbgcolor[]     = "#000000";
7 +
static const char normfgcolor[]     = "#666666";
8 +
static const char selbordercolor[]  = "#000000";
9 +
static const char selbgcolor[]      = "#000000";
10 +
static const char selfgcolor[]      = "#aaaaaa";
11 +
static const unsigned int borderpx  = 2;        /* border pixel of windows */
12 +
static const unsigned int snap      = 64;       /* snap pixel */
13 +
static const Bool showbar           = True;     /* False means no bar */
14 +
static const Bool topbar            = True;     /* False means bottom bar */
15 +
16 +
/* tagging */
17 +
static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
18 +
19 +
static const Rule rules[] = {
20 +
	/* class      instance    title       tags mask     isfloating   monitor */
21 +
	{ "Gimp",     NULL,       NULL,       0,            True,        -1 },
22 +
	{ "Firefox",  NULL,       NULL,       1 << 8,       False,       -1 },
23 +
};
24 +
25 +
/* layout(s) */
26 +
static const float mfact      = 0.55; /* factor of master area size [0.05..0.95] */
27 +
static const int nmaster      = 1;    /* number of clients in master area */
28 +
static const Bool resizehints = True; /* True means respect size hints in tiled resizals */
29 +
30 +
static const Layout layouts[] = {
31 +
	/* symbol   arrange function */
32 +
	{ "T",      tile },    /* first entry is default */
33 +
	{ "F",      NULL },    /* no layout function means floating behavior */
34 +
	{ "M",      monocle },
35 +
};
36 +
37 +
/* key definitions */
38 +
#define MODKEY Mod1Mask
39 +
#define TAGKEYS(KEY,TAG) \
40 +
	{ MODKEY,                       KEY,      view,           {.ui = 1 << TAG} }, \
41 +
	{ MODKEY|ControlMask,           KEY,      toggleview,     {.ui = 1 << TAG} }, \
42 +
	{ MODKEY|ShiftMask,             KEY,      tag,            {.ui = 1 << TAG} }, \
43 +
	{ MODKEY|ControlMask|ShiftMask, KEY,      toggletag,      {.ui = 1 << TAG} },
44 +
45 +
/* helper for spawning shell commands in the pre dwm-5.0 fashion */
46 +
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
47 +
48 +
/* commands */
49 +
static const char *dmenucmd[] = { "dmenu_run", "-fn", font, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbgcolor, "-sf", selfgcolor, NULL };
50 +
static const char *termcmd[]  = { "urxvt", NULL };
51 +
52 +
static Key keys[] = {
53 +
	/* modifier                     key        function        argument */
54 +
	{ MODKEY,                       XK_p,      spawn,          {.v = dmenucmd } },
55 +
	{ MODKEY|ShiftMask,             XK_Return, spawn,          {.v = termcmd } },
56 +
	{ MODKEY,                       XK_b,      togglebar,      {0} },
57 +
	{ MODKEY,                       XK_j,      focusstack,     {.i = +1 } },
58 +
	{ MODKEY,                       XK_k,      focusstack,     {.i = -1 } },
59 +
	{ MODKEY,                       XK_i,      incnmaster,     {.i = +1 } },
60 +
	{ MODKEY,                       XK_d,      incnmaster,     {.i = -1 } },
61 +
	{ MODKEY,                       XK_h,      setmfact,       {.f = -0.05} },
62 +
	{ MODKEY,                       XK_l,      setmfact,       {.f = +0.05} },
63 +
	{ MODKEY,                       XK_Return, zoom,           {0} },
64 +
	{ MODKEY,                       XK_Tab,    view,           {0} },
65 +
	{ MODKEY|ShiftMask,             XK_c,      killclient,     {0} },
66 +
	{ MODKEY,                       XK_t,      setlayout,      {.v = &layouts[0]} },
67 +
	{ MODKEY,                       XK_f,      setlayout,      {.v = &layouts[1]} },
68 +
	{ MODKEY,                       XK_m,      setlayout,      {.v = &layouts[2]} },
69 +
	{ MODKEY,                       XK_space,  setlayout,      {0} },
70 +
	{ MODKEY|ShiftMask,             XK_space,  togglefloating, {0} },
71 +
	{ MODKEY,                       XK_0,      view,           {.ui = ~0 } },
72 +
	{ MODKEY|ShiftMask,             XK_0,      tag,            {.ui = ~0 } },
73 +
	{ MODKEY,                       XK_comma,  focusmon,       {.i = -1 } },
74 +
	{ MODKEY,                       XK_period, focusmon,       {.i = +1 } },
75 +
	{ MODKEY|ShiftMask,             XK_comma,  tagmon,         {.i = -1 } },
76 +
	{ MODKEY|ShiftMask,             XK_period, tagmon,         {.i = +1 } },
77 +
	TAGKEYS(                        XK_1,                      0)
78 +
	TAGKEYS(                        XK_2,                      1)
79 +
	TAGKEYS(                        XK_3,                      2)
80 +
	TAGKEYS(                        XK_4,                      3)
81 +
	TAGKEYS(                        XK_5,                      4)
82 +
	TAGKEYS(                        XK_6,                      5)
83 +
	TAGKEYS(                        XK_7,                      6)
84 +
	TAGKEYS(                        XK_8,                      7)
85 +
	TAGKEYS(                        XK_9,                      8)
86 +
	{ MODKEY|ShiftMask,             XK_q,      quit,           {0} },
87 +
};
88 +
89 +
/* button definitions */
90 +
/* click can be ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
91 +
static Button buttons[] = {
92 +
	/* click                event mask      button          function        argument */
93 +
	{ ClkLtSymbol,          0,              Button1,        setlayout,      {0} },
94 +
	{ ClkLtSymbol,          0,              Button3,        setlayout,      {.v = &layouts[2]} },
95 +
	{ ClkWinTitle,          0,              Button2,        zoom,           {0} },
96 +
	{ ClkStatusText,        0,              Button2,        spawn,          {.v = termcmd } },
97 +
	{ ClkClientWin,         MODKEY,         Button1,        movemouse,      {0} },
98 +
	{ ClkClientWin,         MODKEY,         Button2,        togglefloating, {0} },
99 +
	{ ClkClientWin,         MODKEY,         Button3,        resizemouse,    {0} },
100 +
	{ ClkTagBar,            0,              Button1,        view,           {0} },
101 +
	{ ClkTagBar,            0,              Button3,        toggleview,     {0} },
102 +
	{ ClkTagBar,            MODKEY,         Button1,        tag,            {0} },
103 +
	{ ClkTagBar,            MODKEY,         Button3,        toggletag,      {0} },
104 +
};
105 +
.gitconfig added +42 -0
1 +
[user]
2 +
  email = user@local.domain
3 +
  name = user
4 +
  editor = vim
5 +
6 +
[github]
7 +
  user = user
8 +
9 +
[color]
10 +
  branch = auto
11 +
  diff = auto
12 +
  status = auto
13 +
14 +
[color "branch"]
15 +
  current = yellow reverse
16 +
  local = yellow
17 +
  remote = green
18 +
19 +
[color "diff"]
20 +
  meta = yellow
21 +
  frag = magenta
22 +
  old = red
23 +
  new = green
24 +
25 +
[color "status"]
26 +
  added = yellow
27 +
  changed = green
28 +
  untracked = cyan
29 +
30 +
[core]
31 +
  excludesfile = ~/.gitignore
32 +
33 +
[alias]
34 +
  c = commit
35 +
  s = status -sb
36 +
  st = status
37 +
  co = checkout
38 +
  lg = log -p
39 +
  log = log --stat
40 +
  lol = log --graph --decorate --pretty=oneline --abbrev-commit
41 +
  lola = log --graph --decorate --pretty=oneline --abbrev-commit --all
42 +
  hist = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short
.profile added +5 -0
1 +
#!/bin/bash
2 +
3 +
eval $(keychain --eval --agents ssh -Q --quiet ~/.ssh/id_rsa)
4 +
5 +
export GOPATH=~
.vimrc added +84 -0
1 +
"
2 +
" .vimrc
3 +
"
4 +
" Tabs and Spaces
5 +
set tabstop=4
6 +
set shiftwidth=2
7 +
set softtabstop=2
8 +
set backspace=indent,eol,start
9 +
set expandtab
10 +
set autoindent
11 +
set smartindent
12 +
set smarttab
13 +
14 +
" Misc
15 +
set number
16 +
set ruler
17 +
set showmatch
18 +
set wildmenu
19 +
set wildmode=list,full
20 +
set nowrap
21 +
set hidden
22 +
set modeline
23 +
set hlsearch
24 +
set incsearch
25 +
set autoread                        " auto-reload modified files (with no local changes)
26 +
set nocompatible                    " don't try to be compatible with vi
27 +
set ignorecase                      " ignore case in search
28 +
set smartcase                       " override ignorecase if uppercase is used in search string
29 +
set report=0                        " report all changes
30 +
set laststatus=2                    " always show status-line
31 +
set nocursorline                    " highlight current line
32 +
set scrolloff=4
33 +
set nofoldenable
34 +
set timeoutlen=200                  " set timeout between key sequences
35 +
set encoding=utf-8
36 +
set background=dark
37 +
set mouse=vin                       " Enable mouse in insert and normal mode
38 +
set directory=~/tmp,/var/tmp,/tmp,. " Keep swap files in one of these 
39 +
set wmh=0                           " Minimum window height = 0
40 +
set showcmd
41 +
42 +
43 +
" Per file-type indentation
44 +
autocmd BufEnter *.hs  set softtabstop=4|set shiftwidth=4
45 +
autocmd BufEnter *.js  set softtabstop=4|set shiftwidth=4
46 +
autocmd BufEnter *.go  set tabstop=4|set shiftwidth=4|set noexpandtab
47 +
autocmd BufEnter *.c   set shiftwidth=4|set noexpandtab
48 +
autocmd BufEnter *.h   set shiftwidth=4|set noexpandtab
49 +
autocmd BufEnter *.lua set shiftwidth=2|set expandtab
50 +
autocmd BufEnter *.erl set softtabstop=4|set shiftwidth=4
51 +
52 +
" File-type
53 +
filetype on
54 +
filetype plugin on
55 +
filetype indent on
56 +
57 +
" Easy command mode switch
58 +
inoremap kj <Esc>
59 +
inoremap <C-l> <C-x><C-l>
60 +
61 +
noremap <C-j> }
62 +
noremap <C-k> {
63 +
64 +
" Move easily between ^ and $
65 +
noremap <C-h> ^
66 +
noremap <C-l> $
67 +
noremap j gj
68 +
noremap k gk
69 +
70 +
" \m to make
71 +
map <Leader>m :make<Return>
72 +
73 +
" Syntax coloring
74 +
set t_Co=256
75 +
syntax enable
76 +
77 +
function! CleverTab()
78 +
  if strpart(getline('.'), 0, col('.')-1) =~ '^\s*$'
79 +
    return "\<Tab>"
80 +
  else
81 +
    return "\<C-N>"
82 +
  endif
83 +
endfunction
84 +
inoremap <Tab> <C-R>=CleverTab()<CR>
.xinitrc added +34 -0
1 +
#!/bin/sh
2 +
#
3 +
# ~/.xinitrc
4 +
#
5 +
xset r rate 180 40                   # Sane repeat rate
6 +
xset -b                              # No bell
7 +
xset -dpms                           # Keep screen on at all times
8 +
setxkbmap -option compose:ralt       # Set compose key to R-Alt
9 +
10 +
. ~/.profile
11 +
. ~/.synaptics
12 +
13 +
if [ -f ~/.Xmodmap ]; then
14 +
  xmodmap ~/.Xmodmap;
15 +
fi
16 +
17 +
if [ -f ~/.Xresources ]; then
18 +
  xrdb -merge ~/.Xresources
19 +
fi
20 +
21 +
while :; do
22 +
  eth=$(ip addr show eth0 | grep 'inet\s' | awk '{ print $2 }')
23 +
  acpi=$(acpi -b | awk '{ print $3, $4 }' | tr -d ',')
24 +
25 +
  iw=$(iw dev wlan0 link)
26 +
  wlan=$(echo "$iw" | grep SSID   | sed 's/SSID: //')
27 +
  qual=$(echo "$iw" | grep signal | sed 's/signal: //' )
28 +
29 +
  xsetroot -name "$eth $wlan $qual ($acpi) $(date +"%R, %D")"
30 +
31 +
  sleep 10s
32 +
done &
33 +
34 +
exec dwm
.zshrc added +85 -0
1 +
##
2 +
# cloudhead - .zshrc
3 +
#
4 +
export PATH=~/bin:~/.cabal/bin:$PATH
5 +
6 +
source ~/.profile
7 +
source ~/.awsrc
8 +
9 +
#
10 +
# Includes
11 +
#
12 +
autoload colors && colors
13 +
autoload -U compinit && compinit
14 +
autoload -U complist
15 +
16 +
# Set input mode to vi
17 +
set -o vi
18 +
19 +
# Bind <C-r> to history search
20 +
bindkey "^r" history-incremental-search-backward
21 +
22 +
#
23 +
# Aliases
24 +
#
25 +
alias g='git'
26 +
alias ls='ls -p'
27 +
alias l='ls -lFGh'
28 +
alias ll='ls -lFAGh'
29 +
alias mv='/bin/mv -i'
30 +
alias ..='cd ..'
31 +
alias img='sxiv'
32 +
alias df='df -h'
33 +
alias sys='systemctl'
34 +
alias x='startx'
35 +
alias web='chromium'
36 +
alias e='vim'
37 +
alias pdf='mupdf'
38 +
39 +
#
40 +
# History
41 +
#
42 +
HISTFILE=~/.zsh_history
43 +
HISTSIZE=4096
44 +
SAVEHIST=4096
45 +
REPORTTIME=10
46 +
47 +
setopt NO_BG_NICE
48 +
setopt NO_HUP
49 +
setopt NO_LIST_BEEP
50 +
setopt LOCAL_OPTIONS
51 +
setopt LOCAL_TRAPS
52 +
setopt EXTENDED_HISTORY
53 +
setopt PROMPT_SUBST
54 +
setopt CORRECT
55 +
setopt COMPLETE_IN_WORD
56 +
setopt IGNORE_EOF
57 +
setopt AUTO_CD
58 +
setopt APPEND_HISTORY
59 +
setopt INC_APPEND_HISTORY
60 +
setopt HIST_REDUCE_BLANKS
61 +
setopt INTERACTIVECOMMENTS
62 +
63 +
#
64 +
# Set prompt
65 +
#
66 +
precmd() {
67 +
  local last=$?
68 +
69 +
  # Status
70 +
  if [ "$last" -eq 0 ]; then
71 +
    PROMPT='; '
72 +
    RPROMPT=''
73 +
  else
74 +
    PROMPT="%{$fg[red]%}; %{$reset_color%}"
75 +
    RPROMPT="%{$fg[red]%}# $last%{$reset_color%}"
76 +
  fi
77 +
78 +
  # Window title
79 +
  echo -ne "\e]1;$PWD - $(git rev-parse --abbrev-ref HEAD 2>/dev/null)\a"
80 +
}
81 +
82 +
col() {
83 +
  awk "{ print \$$1 }"
84 +
}
85 +
README added +28 -0
1 +
2 +
3 +
4 +
        cloudhead's dotfiles
5 +
6 +
7 +
.about
8 +
9 +
  these dotfiles are meant to be used in linux.
10 +
11 +
.requirements
12 +
13 +
  - dwm
14 +
  - urxvt
15 +
  - zsh
16 +
  - vim
17 +
  - git
18 +
  - dvtm
19 +
  - gohu (font)
20 +
21 +
.installation
22 +
23 +
  1. change your login shell to zsh:
24 +
25 +
    $ chsh -s /usr/bin/zsh
26 +
27 +
  2. copy all files to ~
28 +