about summary refs log tree commit diff stats
path: root/dwm.1
blob: 4a465aa2dfe7da715b493c8c2004bd6e3de1097d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
.TH DWM 1 dwm\-VERSION
.SH NAME
dwm \- dynamic window manager
.SH SYNOPSIS
.B dwm
.RB [ \-v ]
.SH DESCRIPTION
dwm is a dynamic window manager for X. It manages windows in tiled, monocle
and floating layouts. Either layout can be applied dynamically, optimising the
environment for the application in use and the task performed.
.P
In tiled layouts windows are managed in a master and stacking area. The master
area contains the window which currently needs most attention, whereas the
stacking area contains all other windows. In monocle layout all windows are
maximised to the screen size. In floating layout windows can be resized and
moved freely. Dialog windows are always managed floating, regardless of the
layout applied.
.P
Windows are grouped by tags. Each window can be tagged with one or multiple
tags. Selecting certain tags displays all windows with these tags.
.P
dwm contains a small status bar which displays all available tags, the layout,
the title of the focused window, and the text read from standard input. A
floating window is indicated with an empty square and a maximised
floating window is indicated with a filled square before the windows
title.  The selected tags are indicated with a different color. The tags of
the focused window are indicated with a filled square in the top left
corner.  The tags which are applied to one or more windows are indicated
with an empty square in the top left corner.
.P
dwm draws a small border around windows to indicate the focus state.
.SH OPTIONS
.TP
.B \-v
prints version information to standard output, then exits.
.SH USAGE
.SS Status bar
.TP
.B Standard input
is read and displayed in the status text area.
.TP
.B Button1
click on a tag label to display all windows with that tag, click on the layout
label toggles between tiled and floating layout.
.TP
.B Button3
click on a tag label adds/removes all windows with that tag to/from the view.
.TP
.B Mod1\-Button1
click on a tag label applies that tag to the focused window.
.TP
.B Mod1\-Button3
click on a tag label adds/removes that tag to/from the focused window.
.SS Keyboard commands
.TP
.B Mod1\-Shift\-Return
Start
.BR xterm.
.TP
.B Mod1\-b
Toggles bar on and off.
.TP
.B Mod1\-space
Toggles between layouts.
.TP
.B Mod1\-j
Focus next window.
.TP
.B Mod1\-k
Focus previous window.
.TP
.B Mod1\-h
Decrease master area size.
.TP
.B Mod1\-l
Increase master area size.
.TP
.B Mod1\-m
Toggle focused window between maximisation and normal state.
.TP
.B Mod1\-Return
Zooms/cycles focused window to/from master area (tiled layouts only).
.TP
.B Mod1\-Shift\-c
Close focused window.
.TP
.B Mod1\-Shift\-space
Toggle focused window between tiled and floating state.
.TP
.B Mod1\-Tab
Toggles to the previously selected tags.
.TP
.B Mod1\-Shift\-[1..n]
Apply
.RB nth
tag to focused window.
.TP
.B Mod1\-Shift\-0
Apply all tags to focused window.
.TP
.B Mod1\-Control\-Shift\-[1..n]
Add/remove
.B nth
tag to/from focused window.
.TP
.B Mod1\-[1..n]
View all windows with
.BR nth
tag.
.TP
.B Mod1\-0
View all windows with any tag.
.TP
.B Mod1\-Control\-[1..n]
Add/remove all windows with
.BR nth
tag to/from the view.
.TP
.B Mod1\-Shift\-q
Quit dwm.
.SS Mouse commands
.TP
.B Mod1\-Button1
Move focused window while dragging. Tiled windows will be toggled to the floating state.
.TP
.B Mod1\-Button2
Toggles focused window between floating and tiled state.
.TP
.B Mod1\-Button3
Resize focused window while dragging. Tiled windows will be toggled to the floating state.
.SH CUSTOMIZATION
dwm is customized by creating a custom config.h and (re)compiling the source
code. This keeps it fast, secure and simple.
.SH SEE ALSO
.BR dmenu (1)
.SH BUGS
The status bar may display
.BR "EOF"
when dwm has been started by an X session manager like
.BR xdm (1),
because those close standard output before executing dwm.
.P
Java applications which use the XToolkit/XAWT backend may draw grey windows
only. The XToolkit/XAWT backend breaks ICCCM-compliance in recent JDK 1.5 and early
JDK 1.6 versions, because it assumes a reparenting window manager. As a workaround
you can use JDK 1.4 (which doesn't contain the XToolkit/XAWT backend) or you
can set the following environment variable (to use the older Motif
backend instead):
.BR AWT_TOOLKIT=MToolkit .
.P
GTK 2.10.9+ versions contain a broken
.BR Save\-As
file dialog implementation,
which requests to reconfigure its window size in an endless loop. However, its
window is still respondable during this state, so you can simply ignore the flicker
until a new GTK version appears, which will fix this bug, approximately
GTK 2.10.12+ versions.
ltin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
scriptencoding utf-8
set nocompatible
filetype off

" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()

Plugin 'VundleVim/Vundle.vim'

Plugin 'tmhedberg/SimpylFold'
Plugin 'ctrlpvim/ctrlp.vim'
Plugin 'mileszs/ack.vim'
Plugin 'rking/ag.vim'
Plugin 'vim-airline/vim-airline'
Plugin 'vim-airline/vim-airline-themes'
Plugin 'bling/vim-bufferline'
Plugin 'majutsushi/tagbar'
Plugin 'easymotion/vim-easymotion'
Plugin 'SirVer/ultisnips'
Plugin 'honza/vim-snippets'
Plugin 'tpope/vim-surround'
Plugin 'tpope/vim-commentary'
Plugin 'tpope/vim-repeat'
Plugin 'tpope/vim-vinegar'
Plugin 'tpope/vim-fugitive'
Plugin 'tpope/vim-eunuch'
Plugin 'tpope/vim-unimpaired'
Plugin 'tpope/vim-tbone'
Plugin 'tpope/vim-abolish'
Plugin 'tpope/vim-obsession'
Plugin 'tpope/vim-speeddating'
Plugin 'phillipberndt/python-imports.vim'
Plugin 'ervandew/supertab'
Plugin 'jiangmiao/auto-pairs'
"Plugin 'jmcantrell/vim-virtualenv'
"Plugin 'lambdalisue/vim-pyenv' " pip install pyenv
Plugin 'mbbill/undotree'

" These take up a lot of space
"Plugin 'klen/python-mode' " DISABLED
Plugin 'davidhalter/jedi-vim' " pip install jedi

" Colours
Plugin 'jnurmine/Zenburn'
Plugin 'sjl/badwolf'
Plugin 'tomasr/molokai'
Plugin 'fmoralesc/vim-vitamins'
Plugin 'altercation/vim-colors-solarized'
Plugin 'ciaranm/inkpot'
Plugin 'nanotech/jellybeans.vim'
Plugin 'baskerville/bubblegum'
Plugin 'morhetz/gruvbox'
Plugin 'w0ng/vim-hybrid'
Plugin 'mitsuhiko/fruity-vim-colorscheme'
" Plugin 'chriskempson/base16-vim'
Plugin 'NLKNguyen/papercolor-theme'
Plugin 'Lokaltog/vim-distinguished'
Plugin 'blueshirts/darcula'
Plugin 'joshdick/onedark.vim'
Plugin 'ajmwagar/vim-dues'
Plugin 'rakr/vim-one'

" TODO: re-enable
"Plugin 'scrooloose/syntastic'
"Plugin 'Valloric/YouCompleteMe'

" Only need these when python-mode is disabled
Plugin 'hynek/vim-python-pep8-indent'
Plugin 'hdima/python-syntax'
Plugin 'nvie/vim-flake8' " pip install flake8

call vundle#end()
filetype plugin indent on

set encoding=utf-8
syntax on

set splitbelow
set splitright
nnoremap <C-J> <C-W><C-J>
nnoremap <C-K> <C-W><C-K>
nnoremap <C-L> <C-W><C-L>
nnoremap <C-H> <C-W><C-H>

nnoremap <C-c> <silent> <C-c>

inoremap <C-e> <C-o>$
inoremap <C-a> <C-o>0

set foldmethod=indent
set foldlevel=99
let g:SimpylFold_docstring_preview=1

au BufNewFile,BufRead *.py
    \ set tabstop=4 |
    \ set softtabstop=4 |
    \ set shiftwidth=4 |
    \ set textwidth=79 |
    \ set expandtab |
    \ set autoindent |
    \ set fileformat=unix |
    \ let g:SuperTabDefaultCompletionType = "context" |
    \ let g:SuperTabContextDefaultCompletionType = "<c-x><c-o>"

augroup vimrc_autocmds
    autocmd!
    autocmd FileType python highlight Excess ctermbg=Red guibg=Red
    autocmd FileType python match Excess /\%79v.*/
    autocmd FileType python set nowrap
augroup END

if has('gui_running')
    set background=dark
    colorscheme solarized
else
    set t_Co=256
    colorscheme jellybeans
    "colorscheme fruity
    "colorscheme solarized
    "colorscheme inkpot
    "colorscheme zenburn
    "colorscheme molokai
    "colorscheme badwolf
    "colorscheme bubblegum-256-dark
endif
"call togglebg#map("<F9>")

" override colours on some systems
if hostname() =~ '^wolfman'
    let g:gruvbox_termcolors=16
    colorscheme gruvbox
elseif hostname() =~ '^CHESTER'
    colorscheme fruity
endif

set number

nmap <leader>t <ESC>:TagbarToggle<cr>
imap <leader>t <ESC>:TagbarToggle<cr>i

"let g:ycm_autoclose_preview_window_after_completion=1
"map <leader>g  :YcmCompleter GoToDefinitionElseDeclaration<CR>

let g:pydiction_location = '/home/user/.vim/bundle/pydiction/complete-dict'
set laststatus=2
" set showmode
set noshowmode " turn this off for airline

set ruler
set encoding=utf-8
set showcmd
set scrolloff=2
"set autoindent
"set smartindent
"set cindent
inoremap # X<BS>#
set mouse=
"if has('mouse')
"  set mouse=a
"endif
set incsearch
set ignorecase
set smartcase
set cino=>4
set showmatch
set hlsearch
" autocmd BufRead,BufNewFile *.lsp,*.lisp so ~/VIlisp-2.0/VIlisp.vim | set bufhidden=hide
nmap <silent> <F3> :silent nohlsearch<CR>
imap <silent> <F3> <C-o>:silent nohlsearch<CR>
" colorscheme inkpot
" colorscheme darkblue
nmap <silent> <F4> :silent setlocal spell spelllang=en_gb<CR>
imap <silent> <F4> <C-o>:silent setlocal spell spelllang=en_gb<CR>
nmap <silent> <F5> :silent setlocal nospell<CR>
imap <silent> <F5> <C-o>:silent setlocal nospell<CR>

nmap <silent> <F2> :silent set diffopt+=iwhite<CR>
imap <silent> <F2> <C-o>:silent set diffopt+=iwhite<CR>

" on some systems this is not detected correcly
set background=dark

autocmd BufRead *.upc set filetype=c
autocmd BufRead *.gnu set filetype=gnuplot

autocmd FileType c,cpp set cindent

if !exists("autocommands_loaded")
  let autocommands_loaded = 1
  augroup C
      autocmd BufRead *.c set cindent
  augroup END
endif

" gnu indentation style
" augroup C
"    autocmd BufRead *.c set cinoptions={.5s,:.5s,+.5s,t0,g0,^-2,e-2,n-2,p2s,(0,=.5s formatoptions=croql cindent shiftwidth=4 tabstop=8
" augroup END

" Show tabs and trailing whitespace visually
"if (&termencoding == "utf-8") || has("gui_running")
"    if v:version >= 700
"        set list listchars=tab:»·,trail:·,extends:…,nbsp:‗
"    else
"        set list listchars=tab:»·,trail:·,extends:…
"    endif
"else
    if v:version >= 700
        set list listchars=tab:>-,trail:.,extends:>,nbsp:_
    else
        set list listchars=tab:>-,trail:.,extends:>
    endif
"endif

" Enable modelines only on secure vim versions
if (v:version >= 604)
    set modeline
else
    set nomodeline
endif
set tabstop=4
set expandtab
set shiftwidth=4
set shiftround
set matchpairs+=<:>

if has('gui')
    set guioptions-=m
    set guioptions-=T
    set guioptions-=l
    set guioptions-=L
    set guioptions-=r
    set guioptions-=R
    "set number
end

" Nice statusbar - replaced by airline
"set laststatus=2
"set statusline=
"set statusline+=%2*%-3.3n%0*\                " buffer number
"set statusline+=%f\                          " file name
"set statusline+=%h%1*%m%r%w%0*               " flags
"set statusline+=\[%{strlen(&ft)?&ft:'none'}, " filetype
"set statusline+=%{&encoding},                " encoding
"set statusline+=%{&fileformat}]              " file format
"set statusline+=%=                           " right align
"set statusline+=%2*0x%-8B\                   " current char
"set statusline+=%-14.(%l,%c%V%)\ %<%P        " offset
"if filereadable(expand("$VIM/vimfiles/plugin/vimbuddy.vim"))
"    set statusline+=\ %{VimBuddy()}          " vim buddy
"endif

if has('title') && (has('gui_running') || &title)
    set titlestring=
    set titlestring+=%f\                     " file name
    set titlestring+=%h%m%r%w                " flags
    set titlestring+=\ -\ %{v:progname}      " program name
endif

" If possible, try to use a narrow number column.
if v:version >= 700
    try
        setlocal numberwidth=3
    catch
    endtry
endif

" Filter expected errors from make
"if has("eval") && v:version >= 700
"    let &makeprg='nice make $* 2>&1 \| sed -u -n '
"    let &makeprg.='-e "/should fail/s/:\([0-9]\)/∶\1/g" '
"    let &makeprg.='-e "/usr.share.aclocal.*underquoted/s/:\([0-9]\)/∶\1/g" '
"    let &makeprg.='-e "s/\([0-9]\{2\}\):\([0-9]\{2\}\):\([0-9]\{2\}\)/\1∶\2∶\3/g" '
"    let &makeprg.='-e "/-version-info/s/:\([0-9]\)/∶\1/g" '
"    let &makeprg.='-e "/^/p" '
"endif

" autocmd FileType tex set makeprg=pdflatex\ %\ $*
" autocmd FileType bib set makeprg=bibtex\ %\ $*

nmap q: :q

" tab completion - taken from ciaranm's vimrc
"if has("eval")
"    function! CleverTab()
"        if strpart(getline('.'), 0, col('.') - 1) =~ '^\s*$'
"            return "\<Tab>"
"        else
"            return "\<C-N>"
"        endif
"    endfun
"    inoremap <Tab> <C-R>=CleverTab()<CR>
"    inoremap <S-Tab> <C-P>
"endif

if has("autocmd")
    au VimEnter * nohls
endif

set backspace=indent,eol,start
set showfulltag
set lazyredraw
"set noerrorbells
set visualbell

set wildmenu
set wildignore+=*.o,*~,.lo,.class,*/target/**
set suffixes+=.in,.a

set hidden

set winminheight=1

autocmd FileType perl set makeprg=perl\ -c\ %\ $*
autocmd FileType perl set errorformat=%f:%l:%m
autocmd FileType perl set autowrite

set viminfo='1000,f1,:1000,/1000
set history=500

set backup
"set patchmode=.clean

set dictionary=/usr/share/dict/words
"set complete=.,w,u,t,i,d,k
set complete=.,w,u,t,i,d

"autocmd BufRead *.py set smartindent cinwords=if,elif,else,for,while,try,except,finally,def,class
"autocmd BufRead *.py set nocindent
"autocmd BufWritePre *.py normal m`:%s/\s\+$//e ``

"let g:syntastic_python_checkers = ['pyflakes']
"let g:syntastic_python_python_exec = 'python3'
let g:syntastic_check_on_open = 0
let g:syntastic_disabled_filetypes=['python'] " use jedi instead

set colorcolumn=80
set cursorline
nnoremap <silent> <Leader>l ml:execute 'match Search /\%'.line('.').'l/'<CR>
nnoremap <silent> <Leader>m ml:execute 'match'<CR>

nnoremap <silent> <leader>c :execute 'sign unplace * buffer=' . bufnr('')<CR>
nmap <leader>C <ESC>:lclose<CR>
nmap <leader>x <ESC>:cclose<CR>

nmap <leader><tab> <ESC>:bnext<CR>

noremap <F8> :PymodeLintAuto<CR>

" python-mode config, hopefully without jedi-vim conflicts - BUNDLE DISABLED
"let g:pymode_rope = 0
"let g:pymode_rope_completion = 0
"let g:pymode_indent = 1
"let g:pymode_doc = 0
""let g:pymode_doc_bind = '<leader>K'
""let g:pymode_rope_goto_definition_bind = '<leader>g'
"let g:pymode_lint = 1
"let g:pymode_lint_write = 1
""let g:pymode_lint_checker = "pyflakes,pep8,pylint,pep257,mccabe"
"let g:pymode_lint_checker = "pyflakes,pep8"
"let g:pymode_lint_message = 1
"let g:pymode_lint_on_fly = 0
"let g:pymode_lint_cwindow = 1
"let g:pymode_virtualenv = 1
"let g:pymode_breakpoint = 1
"let g:pymode_breakpoint_bind = '<leader>B'
"let g:pymode_run_bind = '<leader>R'
"let g:pymode_syntax = 1
"let g:pymode_syntax_all = 1
"let g:pymode_syntax_indent_errors = g:pymode_syntax_all
"let g:pymode_syntax_space_errors = g:pymode_syntax_all
"let g:pymode_rope_autoimport = 1
"let g:pymode_rope_autoimport_import_after_complete = 1

" if we're using hdima/python-syntax instead of python mode
let python_highlight_all=1
" if we're using nvie/vim-flake8 instead of python mode
let g:flake8_show_quickfix=1
let g:flake8_show_in_gutter=1
let g:flake8_show_in_file=1
"autocmd BufWritePost *.py call Flake8()
autocmd FileType python map <buffer> <F6> :call flake8#Flake8UnplaceMarkers()<CR>


" doesn't work with python3 (no activate_this.py)
"py << EOF
"import os.path
"import sys
"import vim
"if 'VIRTUAL_ENV' in os.environ:
"    project_base_dir = os.environ['VIRTUAL_ENV']
"    sys.path.insert(0, project_base_dir)
"    activate_this = os.path.join(project_base_dir, 'bin/activate_this.py')
"    execfile(activate_this, dict(__file__=activate_this))
"EOF

" disable this on slow systems
let g:jedi#popup_on_dot = 0

if has('gui_running')
    let g:airline#extensions#tabline#enabled = 1
    let g:airline#extensions#tabline#buffer_nr_show = 1
endif
let g:airline#extensions#bufferline#enabled = 1
"let g:airline#extensions#bufferline#overwrite_variables = 1

map <silent> <C-E> :silent Lexplore<CR>
if has('gui_running')
    let g:netrw_liststyle = 3
else
    let g:netrw_liststyle = 0
endif
let g:netrw_winsize = -20
let g:netrw_browse_split = 4
let g:netrw_banner = 0
let g:netrw_altv = 1
let g:netrw_preview = 1
let g:netrw_sort_sequence = '[\/]$,*'
let g:netrw_chgwin=2
set autochdir

" vim: set shiftwidth=4 softtabstop=4 expandtab tw=72                  :