commit bb8ee1692370397f0317486cef4c23258d706e19
Author: Ryan Jeffrey <pwishie@gmail.com>
Date: Tue, 23 Apr 2019 21:04:29 -0700
Initial
Diffstat:
A | .bashrc | | | 181 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
A | .emacs | | | 231 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
2 files changed, 412 insertions(+), 0 deletions(-)
diff --git a/.bashrc b/.bashrc
@@ -0,0 +1,181 @@
+# ~/.bashrc: executed by bash(1) for non-login shells.
+# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
+# for examples
+
+# fortune | cowsay
+
+
+# If not running interactively, don't do anything
+case $- in
+ *i*) ;;
+ *) return;;
+esac
+
+
+# en_US.UTF-8 UTF-8
+export DICPATH='/usr/share/hunspell'
+
+# don't put duplicate lines or lines starting with space in the history.
+# See bash(1) for more options
+HISTCONTROL=ignoreboth
+
+# append to the history file, don't overwrite it
+shopt -s histappend
+
+# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
+HISTSIZE=1000
+HISTFILESIZE=2000
+
+# check the window size after each command and, if necessary,
+# update the values of LINES and COLUMNS.
+shopt -s checkwinsize
+
+# If set, the pattern "**" used in a pathname expansion context will
+# match all files and zero or more directories and subdirectories.
+#shopt -s globstar
+
+# make less more friendly for non-text input files, see lesspipe(1)
+[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
+
+# set variable identifying the chroot you work in (used in the prompt below)
+if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
+ debian_chroot=$(cat /etc/debian_chroot)
+fi
+
+# set a fancy prompt (non-color, unless we know we "want" color)
+case "$TERM" in
+ xterm-color|*-256color) color_prompt=yes;;
+esac
+
+# uncomment for a colored prompt, if the terminal has the capability; turned
+# off by default to not distract the user: the focus in a terminal window
+# should be on the output of commands, not on the prompt
+#force_color_prompt=yes
+
+if [ -n "$force_color_prompt" ]; then
+ if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
+ # We have color support; assume it's compliant with Ecma-48
+ # (ISO/IEC-6429). (Lack of such support is extremely rare, and such
+ # a case would tend to support setf rather than setaf.)
+ color_prompt=yes
+ else
+ color_prompt=
+ fi
+fi
+
+unset color_prompt force_color_prompt
+# If this is an xterm set the title to user@host:dir
+case "$TERM" in
+xterm*|rxvt*)
+ PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
+ ;;
+*)
+ ;;
+esac
+
+# enable color support of ls and also add handy aliases
+if [ -x /usr/bin/dircolors ]; then
+ test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
+ alias ls='ls --color=auto'
+ #alias dir='dir --color=auto'
+ #alias vdir='vdir --color=auto'
+
+ alias grep='grep --color=auto'
+ alias fgrep='fgrep --color=auto'
+ alias egrep='egrep --color=auto'
+fi
+
+# colored GCC warnings and errors
+#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
+
+# Add an "alert" alias for long running commands. Use like so:
+# sleep 10; alert
+alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
+
+# Alias definitions.
+# You may want to put all your additions into a separate file like
+# ~/.bash_aliases, instead of adding them here directly.
+# See /usr/share/doc/bash-doc/examples in the bash-doc package.
+
+if [ -f ~/.bash_aliases ]; then
+ . ~/.bash_aliases
+fi
+
+# enable programmable completion features (you don't need to enable
+# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
+# sources /etc/bash.bashrc).
+if ! shopt -oq posix; then
+ if [ -f /usr/share/bash-completion/bash_completion ]; then
+ . /usr/share/bash-completion/bash_completion
+ elif [ -f /etc/bash_completion ]; then
+ . /etc/bash_completion
+ fi
+fi
+
+export SCRIPTS="$HOME/CSProjects/scripts/"
+export GOARCH="amd64"
+export GOOS="linux"
+export CC="gcc"
+export CXX="g++"
+export CGO_ENABLED="1"
+export GOROOT="/usr/lib/go"
+export GOBIN="/home/ryan/CSProjects/goproj/bin/"
+export GOPATH="/home/koolade/CSProjects/goproj/"
+export PATH="$PATH:/bin/go/bin:$SCRIPTS:/home/ryan/.gem/ruby/2.6.0/bin:/root/.gem/ruby/2.6.0/bin"
+export MUSIC='~/Music/'
+export TERMINAL='xterm'
+export EDITOR='joe'
+
+alias vim='nvim'
+alias comd='pandoc --pdf-engine=xelatex -o '
+alias rip='abcde -o opus'
+alias ls='ls --color -h --group-directories-first'
+alias e='emacs'
+alias v='nvim'
+alias up='sudo pacman -Syy && sudo pacman -Su'
+alias pac='sudo pacman -S'
+alias aur='yay -S'
+alias latex='lualatex'
+alias cls='clear'
+alias j='joe'
+alias jr='joe -rdonly'
+alias mkd="mkdir -pv"
+alias untar='tar -xzvf'
+alias scheme='guile'
+alias lisp='sbcl'
+alias pdf='zathura'
+alias occ='sudo gcc `gnustep-config --objc-flags` -lgnustep-base -lobjc'
+
+stty -ixon # Disable ctrl-s and ctrl-q.
+shopt -s autocd #Allows you to cd into directory merely by typing the directory name.
+HISTSIZE= HISTFILESIZE= # Infinite history.
+
+# Setting Bash prompt. Capitalizes username and host if root user (my root user uses this same config file).
+if [ "$EUID" -ne 0 ]
+ then export PS1="\[$(tput bold)\]\[$(tput setaf 1)\][\[$(tput setaf 3)\]\u\[$(tput setaf 2)\]@\[$(tput setaf 4)\]\h \[$(tput setaf 5)\]\W\[$(tput setaf 1)\]]\[$(tput setaf 7)\]\\$ \[$(tput sgr0)\]"
+ else export PS1="\[$(tput bold)\]\[$(tput setaf 1)\][\[$(tput setaf 3)\]ROOT\[$(tput setaf 2)\]@\[$(tput setaf 4)\]$(hostname | awk '{print toupper($0)}') \[$(tput setaf 5)\]\W\[$(tput setaf 1)\]]\[$(tput setaf 7)\]\\$ \[$(tput sgr0)\]"
+fi
+
+extract () {
+ if [ -f $1 ] ; then
+ case $1 in
+ *.tar.bz2) tar xvjf $1;;
+ *.tar.gz) tar xvzf $1;;
+ *.bz2) bunzip2 $1 ;;
+ *.rar) unrar x $1 ;;
+ *.gz) gunzip $1 ;;
+ *.tar) tar xvf $1 ;;
+ *.tbz2) tar xvjf $1;;
+ *.tgz) tar xvzf $1;;
+ *.zip) unzip $1 ;;
+ *.Z) uncompress $1 ;;
+ *.7z) 7z x $1;;
+ *tar.xz) tar xf $1;;
+ *) echo "don't know how to extract '$1'..." ;;
+ esac
+ else
+ echo "'$1' is not a valid file!"
+ fi
+}
+
+[ -n "$XTERM_VERSION" ] && transset-df --id "$WINDOWID" --min .9 >/dev/null
diff --git a/.emacs b/.emacs
@@ -0,0 +1,231 @@
+
+;;;; Ryan's Emacs file
+
+;;; package init stuff
+(package-initialize)
+
+(require 'package)
+
+(add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/"))
+
+
+
+(custom-set-variables
+ ;; custom-set-variables was added by Custom.
+ ;; 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
+ (evil telephone-line vimrc-mode multi-term spacemacs-theme night-owl-theme php-mode robe hlinum ggtags flycheck-perl6 company-rtags neotree modern-cpp-font-lock magit cmake-mode company-c-headers hydra irony company auto-complete-clang cmake-ide rtags fish-mode flycheck iedit auto-complete-c-headers auto-complete markdown-mode pdf-tools geiser projectile clojure-mode-extra-font-locking cider slime grandshell-theme)))
+ '(safe-local-variable-values
+ (quote
+ ((projectile-project-run-cmd . "mkdir -p build; cd build; cmake ..; make run")
+ (projectile-project-compilation-cmd . "mkdir -p build; cd build; cmake ..; make")
+ (eval setq flycheck-clang-include-path
+ (list
+ (expand-file-name "~/CSProjects/allnew/head")))
+ (cmake-ide-build-dir . "./bin/"))))
+ '(spacemacs-theme-comment-italic t)
+ '(spacemacs-theme-org-bold nil)
+ '(spacemacs-theme-underline-parens nil)
+ '(tool-bar-mode nil))
+(custom-set-faces
+ ;; custom-set-faces was added by Custom.
+ ;; 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.
+ )
+;; theme and font stuff
+(load-theme 'spacemacs-dark t) ;(load-theme 'night-owl t)https://stackoverflow.com/questions/3297
+
+(add-to-list 'default-frame-alist
+ '(font . "Menlo:antialias=true:size=16:style=Regular"))
+
+
+;;; various emacs settings
+
+(put 'upcase-region 'disabled nil)
+(electric-pair-mode t)
+(desktop-save-mode 1)
+(show-paren-mode 1)
+(setq-default indent-tabs-mode nil)
+(setq-default tab-width 4)
+(setq column-number-mode t)
+(display-time-mode 1)
+(tool-bar-mode -1)
+(scroll-bar-mode -1)
+(setq ring-bell-function 'ignore)
+(blink-cursor-mode 0)
+
+;;;; Keybinding settings
+
+;;; so backspace works with indentation.
+;;; big thanks to https://www.reddit.com/user/clemera for this.
+
+(defun my-backward-delete-char ()
+ (interactive)
+ (cond ((bolp)
+ (delete-char -1)
+ (indent-according-to-mode)
+ (when (looking-at "\\([ \t]+\\)[^ \t]")
+ (delete-region (point) (match-end 1))))
+ ((<= (point) (save-excursion (back-to-indentation) (point)))
+ (let ((backward-delete-char-untabify-method 'hungry))
+ (call-interactively 'backward-delete-char-untabify)
+ (delete-char -1))
+ (indent-according-to-mode))
+ (t
+ (let ((backward-delete-char-untabify-method 'hungry))
+ (call-interactively 'backward-delete-char-untabify)))))
+
+(global-set-key (kbd "<backspace>") 'my-backward-delete-char)
+
+;;;; Programmer settings
+
+;;; Lisp settings
+
+
+
+(add-to-list 'auto-mode-alist '("\\.md\\'" . markdown-mode)) ; for markdown editing
+
+(add-to-list 'auto-mode-alist '("\\.fish\\'" . fish-mode)) ; for editing fish scripts
+
+;; auto-complete
+(require 'auto-complete)
+(ac-config-default)
+
+;; setting the code style to linux
+(setq c-default-style "linux"
+ c-basic-offset 4)
+
+(global-flycheck-mode 1) ; flycheck
+
+;; for betting modern C++ highlighting
+(require 'modern-cpp-font-lock)
+(modern-c++-font-lock-global-mode t)
+
+;; for setting up the spellcheck program
+(setq ispell-program-name "hunspell")
+(setq ispell-local-dictionary "en_US")
+(setq ispell-local-dictionary-alist
+ '(("en_US" "[[:alpha:]]" "[^[:alpha:]]" "[']" nil nil nil utf-8)))
+
+;; notree
+(require 'neotree)
+(global-set-key [f8] 'neotree-toggle)
+
+
+;; Set your lisp system and, optionally, some contribs
+(setq inferior-lisp-program "/opt/sbcl/bin/sbcl") ;;;; TODO: CHECK
+(setq slime-contribs '(slime-fancy))
+
+(load (expand-file-name "~/quicklisp/slime-helper.el"))
+;; Replace "sbcl" with the path to your implementation
+(setq inferior-lisp-program "sbcl")
+
+(setq geiser-active-implementations '(guile))
+
+
+;; cperl-mode
+(fset 'perl-mode 'cperl-mode)
+(setq cperl-indent-level 4)
+(setq cperl-extra-newline-before-brace t
+ cperl-brace-offset -2
+ cperl-merge-trailing-else nil)
+
+;; C/C++ mode stuff
+(semantic-mode 1)
+
+(defun my:add-semantic-to-autocomplete()
+ (add-to-list 'ac-sources 'ac-source-semantic))
+
+(add-hook 'c-mode-hook 'my:add-semantic-to-autocomplete)
+(add-hook 'c++-mode-hook 'my:add-semantic-to-autocomplete)
+
+(defun my:ac-c-headers-init()
+ (require 'auto-complete-c-headers)
+ (add-to-list 'achead:include-directories '"/usr/include/")
+ (add-to-list 'achead:include-directories '"/usr/include/c++/8.2.1/")
+ (add-to-list 'ac-sources 'ac-source-c-headers))
+
+(add-hook 'c-mode-hook 'my:ac-c-headers-init)
+(add-hook 'c++-mode-hook 'my:ac-c-headers-init)
+
+(global-ede-mode 1)
+
+(ede-cpp-root-project "dirw" :file "~/CSProjects/gitdirw/src/main.cpp" :include-path '("../head/"))
+
+;; CHANGE THIS EACH TIME
+(add-hook 'c++-mode-hook
+ (lambda () (setq flycheck-clang-include-path
+ (list (expand-file-name "~/CSProjects/gitdirw/head/")))))
+
+(setq ggtags-executable-directory "/usr/bin/")
+
+(add-hook 'c-mode-common-hook
+ (lambda ()
+ (when (derived-mode-p 'c-mode 'c++-mode 'java-mode)
+ (ggtags-mode 1))))
+(setq ggtags-use-idutils t)
+(setq ggtags-use-project-gtagsconf nil)
+
+
+(add-hook 'ruby-mode-hook 'robe-mode)
+(add-hook 'robe-mode-hook 'ac-robe-setup)
+
+(setq ruby-indent-level 4)
+
+(add-to-list 'magic-mode-alist
+ `(,(lambda ()
+ (and (string= (file-name-extension buffer-file-name) "h")
+ (re-search-forward "@\\<interface\\>"
+ magic-mode-regexp-match-limit t)))
+ . objc-mode))
+
+
+(add-hook 'term-mode-hook
+ (defun my-term-mode-hook ()
+ (setq bidi-paragraph-direction 'left-to-right)))
+
+(set-frame-parameter (selected-frame) 'alpha '(95 . 50))
+(add-to-list 'default-frame-alist '(alpha . (95 . 50)))
+
+(setq-default term-suppress-hard-newline t)
+
+
+;;; terminal emulator
+(add-to-list 'load-path "/home/ryan/CSProjects/emacs-libvterm/")
+(let (vterm-install)
+ (require 'vterm))
+
+
+
+(require 'telephone-line)
+
+;;; telephone-line configuration
+(setq telephone-line-lhs
+ '((evil . (telephone-line-evil-tag-segment))
+ (accent . (telephone-line-vc-segment
+ telephone-line-erc-modified-channels-segment
+ telephone-line-process-segment))
+ (nil . (telephone-line-minor-mode-segment
+ telephone-line-buffer-segment))))
+
+(setq telephone-line-rhs
+ '((nil . (telephone-line-misc-info-segment))
+ (accent . (telephone-line-major-mode-segment))
+ (evil . (telephone-line-airline-position-segment))))
+
+(telephone-line-mode 1)
+
+;; evil mode settings
+(require 'evil)
+(evil-mode 1)
+
+;; absolute line numbers
+(require 'linum-relative)
+(linum-mode)
+(linum-relative-global-mode)
+(setq linum-relative-current-symbol "")
+