summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2019-11-08 22:27:19 +0100
committerNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2019-11-08 22:27:19 +0100
commit2f152e112a5667024e9dd72c286eb26a93fa3d57 (patch)
tree443d3217e4c48c8399648f1ccc5fa22620ceaaa0
parentcf3c99e9462cf4f56f1cceb053cc923875cc018d (diff)
downloadcodex-arcana-2f152e112a5667024e9dd72c286eb26a93fa3d57.zip
codex-arcana-2f152e112a5667024e9dd72c286eb26a93fa3d57.tar.bz2
Adds some configuration files.
-rw-r--r--stumpwmrc263
-rw-r--r--vimrc139
2 files changed, 402 insertions, 0 deletions
diff --git a/stumpwmrc b/stumpwmrc
new file mode 100644
index 0000000..fd70770
--- /dev/null
+++ b/stumpwmrc
@@ -0,0 +1,263 @@
+(in-package :stumpwm)
+
+(set-prefix-key (kbd "Menu"))
+(setf *STARTUP-MESSAGE* NIL)
+
+
+(setf stumpwm:*screen-mode-line-format*
+ '(:eval (run-shell-command "/vault/script/stumpwm_notificator.scm" t))
+)
+(stumpwm:toggle-mode-line (stumpwm:current-screen)
+ (stumpwm:current-head))
+
+(defcommand
+ jj-toggle-mode-line
+ ()
+ ()
+ "Toggle the mode line."
+ (toggle-mode-line (current-screen) (current-head))
+)
+
+;; navigation bindings
+(define-key
+ *root-map*
+ (kbd "SPC")
+ "windowlist"
+)
+
+(define-key
+ *root-map*
+ (kbd "-")
+ "jj-toggle-mode-line"
+)
+
+(define-key
+ *root-map*
+ (kbd "XF86Back")
+ "pull-hidden-previous"
+)
+
+(define-key
+ *root-map*
+ (kbd "XF86Forward")
+ "pull-hidden-next"
+)
+
+(define-key
+ *root-map*
+ (kbd "SunPageUp")
+ "pull-hidden-previous"
+)
+
+(define-key
+ *root-map*
+ (kbd "SunPageDown")
+ "pull-hidden-next"
+)
+
+(define-key
+ *root-map*
+ (kbd "S-XF86Back")
+ "gprev"
+)
+
+(define-key
+ *root-map*
+ (kbd "S-XF86Forward")
+ "gnext"
+)
+
+(define-key
+ *root-map*
+ (kbd "S-SunPageUp")
+ "gprev"
+)
+
+(define-key
+ *root-map*
+ (kbd "S-SunPageDown")
+ "gnext"
+)
+
+(define-key
+ *root-map*
+ (kbd "M-XF86Back")
+ "gprev-with-window"
+)
+
+(define-key
+ *root-map*
+ (kbd "M-XF86Forward")
+ "gnext-with-window"
+)
+
+(define-key
+ *root-map*
+ (kbd "M-SunPageUp")
+ "gprev-with-window"
+)
+
+(define-key
+ *root-map*
+ (kbd "M-SunPageDown")
+ "gnext-with-window"
+)
+
+(define-key
+ *root-map*
+ (kbd "9")
+ "delete"
+)
+
+;; window control bindings
+
+(define-key
+ *root-map*
+ (kbd "C-Up")
+ "move-window up"
+)
+
+(define-key
+ *root-map*
+ (kbd "C-Left")
+ "move-window left"
+)
+
+(define-key
+ *root-map*
+ (kbd "End")
+ "restart-hard"
+)
+
+(define-key
+ *root-map*
+ (kbd "quoteleft")
+ "gnew"
+)
+
+(define-key
+ *root-map*
+ (kbd "~")
+ "gkill"
+)
+
+(define-key
+ *root-map*
+ (kbd "C-Down")
+ "move-window down"
+)
+
+(define-key
+ *root-map*
+ (kbd "C-Right")
+ "move-window right"
+)
+
+(setf *window-border-style*
+ :thin)
+
+(setf *input-window-gravity*
+ :top-right)
+
+(setf *message-window-gravity*
+ :top-left)
+
+;; program shortcuts
+(define-key *root-map*
+ (kbd "t")
+ "exec urxvtc")
+
+(define-key *root-map*
+ (kbd "T")
+ "exec urxvtc -xrm ~/.Xdefaults_projector")
+
+(define-key *root-map*
+ (kbd "c")
+ "exec firefox")
+
+(define-key *root-map*
+ (kbd "q")
+ "exec firefox")
+
+(define-key *root-map*
+ (kbd "N")
+ "exec netlogo")
+
+(define-key *root-map*
+ (kbd "M-N")
+ "exec netlogo-3d")
+
+(define-key *root-map*
+ (kbd "C")
+ "exec celestia")
+
+(define-key *root-map*
+ (kbd "M-g")
+ "exec gimp")
+
+;; Communication
+
+;; Tools
+(define-key *root-map*
+ (kbd "@")
+ "exec arandr")
+
+(define-key *root-map*
+ (kbd "h")
+ "exec urxvtc -e htop")
+
+(define-key *root-map*
+ (kbd "b")
+ "eval (run-shell-command \"acpi\" t)")
+
+(define-key *root-map*
+ (kbd "SunPrint_Screen")
+ "exec import -window root /tmp/screenshot.png")
+
+(define-key *root-map*
+ (kbd "F4")
+ "exec redshift -x")
+
+(define-key *root-map*
+ (kbd "F5")
+ "exec redshift -O 2500")
+
+;; Audio stuff
+(define-key *root-map*
+ (kbd "F9")
+ "exec urxvtc -e mocp")
+
+(define-key *root-map*
+ (kbd "F10")
+ "exec mocp --previous")
+
+(define-key *root-map*
+ (kbd "F11")
+ "exec mocp --next")
+
+(define-key *root-map*
+ (kbd "F12")
+ "exec mocp --exit")
+
+(define-key *root-map*
+ (kbd "XF86AudioMute")
+ "exec amixer -c 0 set Master toggle")
+
+(define-key *root-map*
+ (kbd "XF86AudioLowerVolume")
+ "exec urxvtc -e alsamixer")
+
+(define-key *root-map*
+ (kbd "XF86AudioRaiseVolume")
+ "exec urxvtc -e alsamixer")
+
+(define-key *root-map*
+ (kbd "C-RET")
+ "move-window down")
+
+(define-key *root-map*
+ (kbd "RET")
+ "move-focus down")
+
+;; do some goodies at startup
+(run-shell-command "/vault/script/nsensfel_startup.sh")
diff --git a/vimrc b/vimrc
new file mode 100644
index 0000000..b5051aa
--- /dev/null
+++ b/vimrc
@@ -0,0 +1,139 @@
+"Required for mapping commands.
+set nocompatible
+
+execute pathogen#infect()
+
+"Enables syntax coloring.
+syntax on
+
+"Enables rainbow coloring of parenthesis.
+let g:rainbow_active=1
+
+"Sets the color theme.
+let g:gruvbox_italic=1
+colorscheme gruvbox
+
+"Highlights the 81th column onward.
+let &colorcolumn=join(range(81,999),",")
+
+"Enables the command menu autocomplete feature.
+set wildmenu
+
+
+"Searching options.
+set incsearch "Search as I type.
+set hlsearch "Highlight matches.
+
+"Tab navigation mapping.
+:map <F4> :tabprevious<cr>
+:map <F5> :tabnext<cr>
+:imap <F4> <ESC>:tabprevious<cr>
+:imap <F5> <ESC>:tabnext<cr>
+
+"Spell mapping.
+:map <F1> :set spell spelllang=en_us<cr>
+:map <F2> :set spell spelllang=fr<cr>
+:map <F3> :set nospell<cr>
+:imap <F1> <ESC>:set spell spelllang=en_us<cr>
+:imap <F2> <ESC>:set spell spelllang=fr<cr>
+:imap <F3> <ESC>:set nospell<cr>
+:nnoremap ` a<C-X><C-S>
+
+"Vim uses 2 spaces for LISP, I prefer 3.
+:map <F8> :set indentexpr=3<cr>
+:imap <F8> <ESC>:set indentexpr=3<cr>
+
+"Remove useless whitespaces.
+:map <F10> :%s/\s\+$//g<cr>
+:map <F10> <ESC>:%s/\s\+$//g<cr>
+
+"Button to toggle paste mode.
+set pastetoggle=<F12>
+
+"Disable the directional keys, because they hurt my wrists.
+noremap <Up> <NOP>
+noremap <Left> <NOP>
+noremap <Right> <NOP>
+noremap <Down> <NOP>
+inoremap <Up> <NOP>
+inoremap <Left> <NOP>
+inoremap <Right> <NOP>
+inoremap <Down> <NOP>
+
+"Sets the number of tabs that can be opened by 'vim -p'.
+set tabpagemax=255
+
+"Creates a shared clipboard between Vim instances.
+set clipboard=unnamedplus
+
+"Displays line numbers.
+set number
+
+"Shows matching parenthesis.
+set showmatch
+
+"let g:syntastic_java_checkers = ['javac']
+let g:syntastic_java_javac_custom_classpath_command=
+ \ 'echo ".:";cat ./.java_classpath'
+
+"Italics
+set t_ZH=
+set t_ZR=
+
+"We use Chicken Scheme
+let b:is_chicken=1
+"No clue...
+"set smartindent
+let g:syntastic_enable_signs=1
+
+" Custom rainbow parenthesis config
+let g:rainbow_conf = {
+\ 'guifgs': ['royalblue3', 'darkorange3', 'seagreen3', 'firebrick'],
+\ 'ctermfgs': ['lightblue', 'lightyellow', 'lightcyan', 'lightmagenta'],
+\ 'operators': '_,_',
+\ 'parentheses': ['start=/(/ end=/)/ fold', 'start=/\[/ end=/\]/ fold', 'start=/{/ end=/}/ fold'],
+\ 'separately': {
+\ '*': {},
+\ 'tex': {
+\ 'parentheses': ['start=/(/ end=/)/', 'start=/\[/ end=/\]/'],
+\ },
+\ 'lisp': {
+\ 'guifgs': ['royalblue3', 'darkorange3', 'seagreen3', 'firebrick', 'darkorchid3'],
+\ },
+\ 'vim': {
+\ 'parentheses': ['start=/(/ end=/)/', 'start=/\[/ end=/\]/', 'start=/{/ end=/}/ fold', 'start=/(/ end=/)/ containedin=vimFuncBody', 'start=/\[/ end=/\]/ containedin=vimFuncBody', 'start=/{/ end=/}/ fold containedin=vimFuncBody'],
+\ },
+\ 'html': {
+\ 'parentheses': ['start=/\v\<((area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)[ >])@!\z([-_:a-zA-Z0-9]+)(\s+[-_:a-zA-Z0-9]+(\=("[^"]*"|'."'".'[^'."'".']*'."'".'|[^ '."'".'"><=`]*))?)*\>/ end=#</\z1># fold'],
+\ },
+\ 'css': 0,
+\ }
+\}
+
+
+" Enables dark mode for gruvbox
+set background=dark
+
+" Keeps the terminal's current background color (and transparency)
+hi Normal ctermfg=252 ctermbg=none
+"Highlights unwanted whitespaces.
+highlight ExtraWhitespace ctermbg=red guibg=red
+match ExtraWhitespace /\s\+$/
+autocmd BufWinEnter * match ExtraWhitespace /\s\+$/
+autocmd InsertEnter * match ExtraWhitespace /\s\+\%#\@<!$/
+autocmd InsertLeave * match ExtraWhitespace /\s\+$/
+autocmd BufWinLeave * call clearmatches()
+
+highlight Tabulations ctermbg=darkgreen
+autocmd BufWinEnter * match Tabulations /\t\+/
+autocmd InsertEnter * match Tabulations /\t\+/
+"autocmd InsertLeave * match Tabulations /\t\+/
+"
+"Tabulation settings
+set tabstop=3
+set softtabstop=3
+set shiftwidth=3
+set expandtab
+
+let g:typescript_indent_disable = 1
+let g:typescript_compiler_options = '--alwaysStrict --noFallthroughCasesInSwitch --noImplicitAny --noImplicitReturns --noImplicitThis --noUnusedLocals --noUnusedParameters --strict --strictNullChecks'