diff options
-rw-r--r-- | .emacs | 75 | ||||
-rw-r--r-- | .vimrc | 23 | ||||
-rw-r--r-- | .xinitrc | 2 | ||||
-rwxr-xr-x | lc | 75 |
4 files changed, 167 insertions, 8 deletions
@@ -13,18 +13,22 @@ (package-initialize) ;; You might already have this line (add-to-list 'package-archives '("melpa-stable" . "https://stable.melpa.org/packages/") t) +(add-to-list 'package-archives '("org" . "https://orgmode.org/elpa/") t) (ac-config-default) (setq c-default-style "k&r" c-basic-offset 4) - +(setq evil-want-integration nil) ;; This is optional since it's already set to t by default. +(setq evil-want-keybinding nil) +(evil-collection-init) (add-to-list 'auto-mode-alist '("\\.ino\\'" . c++-mode)) (require 'evil) (evil-mode 1) + (require 'evil-surround) (global-evil-surround-mode 1) @@ -33,7 +37,10 @@ ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. - '(package-selected-packages (quote (jedi evil-surround buffer-move auto-complete)))) + '(package-selected-packages + (quote + (evil-collection notmuch company-c-headers org jedi evil-surround buffer-move auto-complete))) + ) (custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. @@ -43,3 +50,67 @@ (add-hook 'python-mode-hook 'jedi:setup) (setq jedi:complete-on-dot t) ; optional + +;; Auto-complete (AC) +(require 'auto-complete) + +(require 'auto-complete-config) +(ac-config-default) + +(require 'company) +(add-hook 'global-init-hook 'global-company-mode) +(add-to-list 'company-backends 'company-c-headers) + +; +;(require 'mu4e) +;(setq mu4e-maildir "~/Mail/mailbox") +;(setq mu4e-drafts-folder "/Drafts") +;(setq mu4e-sent-folder "/Sent") +;(setq mu4e-trash-folder "/Trash") +;(setq mu4e-refile-folder "/Archive") +; +;(setq mu4e-get-mail-command "offlineimap") +;;; shortcuts +;(setq mu4e-maildir-shortcuts + ;'( ("/INBOX" . ?i) + ;("/Archive" . ?a))) +; +;;; something about ourselves +;(setq + ;user-mail-address "julian@jtle.dk" + ;user-full-name "Julian T" + ;) +; +;;; show images +;(setq mu4e-show-images t) +; +;;; use imagemagick, if available +;(when (fboundp 'imagemagick-register-types) + ;(imagemagick-register-types)) +; +;;; convert html emails properly +;;; Possible options: +;;; - html2text -utf8 -width 72 +;;; - textutil -stdin -format html -convert txt -stdout +;;; - html2markdown | grep -v ' _place_holder;' (Requires html2text pypi) +;;; - w3m -dump -cols 80 -T text/html +;;; - view in browser (provided below) +;(setq mu4e-html2text-command "html2text") +; +;;; add option to view html message in a browser +;;; `aV` in view to activate +;(add-to-list 'mu4e-view-actions + ;'("ViewInBrowser" . mu4e-action-view-in-browser) t) +; +;;; fetch mail every 10 mins +;(setq mu4e-update-interval 600) +; +; +;(setf initial-buffer-choice (lambda () (mu4e))) +; +;(setq message-send-mail-function 'smtpmail-send-it) +; +;(setq smtpmail-default-smtp-server "smtp.mailbox.org" + ;smtpmail-smtp-server "smtp.mailbox.org" + ;smtpmail-smtp-service 465) +; @@ -12,26 +12,37 @@ filetype plugin on " let Vundle manage Vundle, required Plugin 'VundleVim/Vundle.vim' + " Completion Plugin 'ervandew/supertab' Plugin 'tpope/vim-surround' Plugin 'tpope/vim-repeat' + " ctags stuff + Plugin 'ludovicchabant/vim-gutentags' + + " Language support Plugin 'racer-rust/vim-racer' Plugin 'davidhalter/jedi-vim' + Plugin 'junegunn/goyo.vim' + " Color theme Plugin 'agude/vim-eldar' + + " File management Plugin 'scrooloose/nerdtree' - " Track the engine. + " Snippits Plugin 'SirVer/ultisnips' - - " Snippets are separated from the engine. Add this if you want them: Plugin 'honza/vim-snippets' - Plugin 'junegunn/goyo.vim' + " Git Plugin 'jreybert/vimagit' + " Tagbar use <F4> + Plugin 'majutsushi/tagbar' + + call vundle#end() " required filetype plugin indent on " required @@ -46,7 +57,6 @@ set shiftwidth=4 set softtabstop=4 set noexpandtab -set inccommand=split " Required for operations modifying multiple buffers like rename. set hidden @@ -75,6 +85,7 @@ set completeopt=menuone,preview " Keymapping map <C-n> :NERDTreeToggle<CR> + map <F4> :TagbarToggle<CR> " Leader stuff let mapleader=" " @@ -85,7 +96,9 @@ set completeopt=menuone,preview " Example on filetype specific " autocmd FileType tex map <leader>o :w !detex \| wc -w<CR> + autocmd FileType asciidoc nnoremap <leader>c :!asciidoctor %<CR> " Enforcing filetypes autocmd BufRead,BufNewFile *.ino set filetype=c + autocmd BufRead,BufNewFile *.asc set filetype=asciidoc autocmd FileType python setlocal completeopt-=preview @@ -9,10 +9,10 @@ export SSH_AUTH_SOCK xmodmap .Xmodmap -nextcloud & nm-applet & xscreensaver & xss-lock -- xscreensaver-command --lock & +dunst & if ! pgrep -u "$USER" ssh-agent > /dev/null; then ssh-agent > ~/.ssh-agent-thing @@ -0,0 +1,75 @@ +#!/bin/bash + +Menu="Program Info System" +System="update poweroff syspend set-keyboard" +Info="battery" +Program="cups-website vim emacs htop" +All="$System $Info $Program" + +handle_stuff() { + +# Dmemu listing + if [ "$1" = "--list" ]; then + printf "Program\nInfo\nSystem" + fi + if [ "$1" = "--dmenu" ]; then + ./lc $(echo $Menu $All | tr " " "\n" | dmenu -i -p Launch) + fi + if [ "$1" = "System" ]; then + ./lc $(echo $System | tr " " "\n" | dmenu -i -p Launch) + fi + if [ "$1" = "Info" ]; then + ./lc $(echo $Info | tr " " "\n" | dmenu -i -p Launch) + fi + if [ "$1" = "Program" ]; then + ./lc $(echo $Program | tr " " "\n" | dmenu -i -p Launch) + fi + +# System info + if [ "$1" = "-b" ] || [ "$1" = "battery" ]; then + notify-send "Battery information" "$(acpi | grep 1:)" + fi + +# System maintenance + if [ "$1" = "-u" ] || [ "$1" = "update" ]; then + st -e sudo pacman -Syu + fi + if [ "$1" = "--xk" ] || [ "$1" = "set-keyboard" ]; then + setxkbmap -layout us -variant altgr-intl + xmodmap .Xmodmap + fi + +# POWER COMMANDS + if [ "$1" = "-s" ] || [ "$1" = "suspend" ]; then + systemctl suspend + fi + if [ "$1" = "-p" ] || [ "$1" = "poweroff" ]; then + poweroff + fi + +# Launch + if [ "$1" = "-v" ] || [ "$1" = "vim" ]; then + st -e nvim + fi + if [ "$1" = "--emacs" ] || [ "$1" = "emacs" ]; then + st -e emacs + fi + if [ "$1" = "--ht" ] || [ "$1" = "htop" ]; then + st -e htop + fi + if [ "$1" = "--cups" ] || [ "$1" = "cups-website" ]; then + firefox "http://localhost:631/" + fi + +# Calc + if [ "$(echo $1 | head -c 1)" = "=" ]; then + calc="$(echo $1 | cut -c 2-)" + notify-send "Result" "$calc = $(echo $calc | bc)" + fi +} + + +for var in "$@" +do + handle_stuff "$var" & +done |