WolfeCub 2 years ago
parent
commit
4c8a9327d3
4 changed files with 28 additions and 124 deletions
  1. 21
    15
      emacs/.emacs.d/README.org
  2. 5
    6
      i3/.config/i3/config
  3. 0
    92
      zsh/.zsh/git-prompt.zsh
  4. 2
    11
      zsh/.zshrc

+ 21
- 15
emacs/.emacs.d/README.org View File

@@ -338,6 +338,15 @@ This function can be called by the mode specific hook to push the defaults.
(push '("=>" . ?⇒) prettify-symbols-alist))
#+END_SRC

Now apply the default to some modes I don't want anything special in.

#+BEGIN_SRC emacs-lisp :tangle yes
(mapc
(lambda (hook)
(add-hook 'hook (lambda () (wolfe/pretty-symbol-push-default))))
'(c-mode))
#+END_SRC

**** Python

#+BEGIN_SRC emacs-lisp :tangle yes
@@ -905,7 +914,7 @@ Setup org agenda for managing my life.
(search . " %i %-12:c")))

;; Sets location of org files
(setq org-agenda-files '((concat wolfe/org-dropbox-path "everything.org")))
(setq org-agenda-files `(,(concat wolfe/org-dropbox-path "everything.org")))
(setq browse-url-browser-function 'browse-url-chromium))
#+END_SRC

@@ -1230,14 +1239,6 @@ Magic git interface from within emacs
(global-set-key "\C-x\g" 'magit-status))
#+END_SRC

** Magithub

#+BEGIN_SRC emacs-lisp :tangle yes
(use-package magithub
:after magit
:config (magithub-feature-autoinject t))
#+END_SRC

** Projectile

Project management
@@ -1259,6 +1260,7 @@ Project management
** Generic Web
#+BEGIN_SRC emacs-lisp :tangle yes
(use-package web-mode
:defer t
:config
(add-to-list 'auto-mode-alist '("\\.html\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.php\\'" . web-mode))
@@ -1292,29 +1294,32 @@ Project management

#+BEGIN_SRC emacs-lisp :tangle yes
(use-package parinfer
:defer t
:bind
(("C-," . parinfer-toggle-mode))
:init
(setq
parinfer-extensions '(defaults pretty-parens evil smart-tab smart-yank)
parinfer-lighters '(" Φi" . " Φp"))
(add-hook 'clojure-mode-hook #'parinfer-mode)
(add-hook 'emacs-lisp-mode-hook #'parinfer-mode)
(add-hook 'clojure-mode-hook #'parinfer-mode)
(add-hook 'emacs-lisp-mode-hook #'parinfer-mode)
(add-hook 'common-lisp-mode-hook #'parinfer-mode)
(add-hook 'scheme-mode-hook #'parinfer-mode)
(add-hook 'lisp-mode-hook #'parinfer-mode))
(add-hook 'scheme-mode-hook #'parinfer-mode)
(add-hook 'lisp-mode-hook #'parinfer-mode))
#+END_SRC

** Racket

#+BEGIN_SRC emacs-lisp :tangle yes
(use-package racket-mode)
(use-package racket-mode
:defer t)
#+END_SRC

** Latex

#+BEGIN_SRC emacs-lisp :tangle yes
(use-package latex-preview-pane
:defer t
:ensure f)
#+END_SRC

@@ -1367,7 +1372,8 @@ Project management
** Nim

#+BEGIN_SRC emacs-lisp :tangle yes
(use-package nim-mode)
(use-package nim-mode
:defer t)
#+END_SRC

* Utility

+ 5
- 6
i3/.config/i3/config View File

@@ -1,14 +1,8 @@
exec "xinput set-button-map 14 1 2 3 5 4 6 7 8 9 10 11 12"
exec "setxkbmap -option 'caps:ctrl_modifier'"
exec "setxkbmap -option compose:ralt"
exec "xcape -e 'Caps_Lock=Escape'"
exec "xsetroot -cursor_name left_ptr"
exec --no-startup-id dropbox start
exec --no-startup-id nm-applet
exec --no-startup-id ~/bin/battery_notify
exec --no-startup-id powertop --auto-tune
exec --no-startup-id tlp start
exec --no-startup-id xset r rate 225 30

# Disable window borders
for_window [class="^.*"] border pixel 2
@@ -190,4 +184,9 @@ bar {
}
}

exec_always "xinput set-button-map 14 1 2 3 5 4 6 7 8 9 10 11 12"
exec_always "setxkbmap -option compose:ralt"
exec_always "xsetroot -cursor_name left_ptr"
exec_always "~/bin/caps"
exec_always "~/bin/key-rate"
exec_always feh --bg-scale ~/Pictures/gnuslashlinux.png

+ 0
- 92
zsh/.zsh/git-prompt.zsh View File

@@ -1,92 +0,0 @@

function in_git_repos() {
test "`git rev-parse --is-inside-work-tree 2>/dev/null`" = "true"
}

function git_current_branch() {
if in_git_repos; then
ref=$(git symbolic-ref HEAD 2> /dev/null) || \
ref=$(git rev-parse --short HEAD 2> /dev/null) || return
echo ${ref#refs/heads/}
fi
}

function git_status_is_clean() {
if in_git_repos; then
local lines=$(git status --porcelain | egrep -v '^\?\? ' | wc -l)
test $lines = 0
fi
}

function git_unknown_files() {
if in_git_repos; then
local lines=$(git status --porcelain | egrep '^\?\? ' | wc -l)
test $lines = 0
fi
}

function git_stash_is_clean() {
if in_git_repos; then
local lines=$(git stash list | wc -l)
test $lines = 0
fi
}

function git_no_branches() {
if in_git_repos; then
local lines=$(git branch | wc -l)
test $lines = 1
fi
}

function git_single_remote() {
if in_git_repos; then
local lines=$(git remote | wc -l)
test $lines -le 1
fi
}

function git_no_remote() {
if in_git_repos; then
local lines=$(git remote | wc -l)
test $lines = 0
fi
}

function git_branch_is_pushed() {
if in_git_repos; then
if git branch -r | grep "origin/master" >/dev/null 2>&1; then
git_no_remote || git diff-tree --quiet origin/master heads/master
fi
fi
}

#-----------------------------------------------------------------------------

function git_prompt_precmd() {
local GITINFO=""
if [ ! -z `git_current_branch` ]; then
GITINFO=" "
if ! git_status_is_clean; then
GITINFO="$GITINFO*"
fi
if ! git_unknown_files; then
GITINFO="${GITINFO}?"
fi
if ! git_branch_is_pushed; then
GITINFO="$GITINFO➚"
fi
if ! git_stash_is_clean; then
GITINFO="$GITINFO☰"
fi
if ! git_no_branches; then
GITINFO="$GITINFO⌥"
fi
if ! git_single_remote; then
GITINFO="$GITINFO®"
fi
GITINFO="$GITINFO "
fi
echo $GITINFO
}


+ 2
- 11
zsh/.zshrc View File

@@ -11,7 +11,7 @@ autoload -U colors && colors
export CLICOLOR=1

# awesome cd movements from zshkit
setopt autocd autopushd pushdminus pushdsilent pushdtohome cdablevars
setopt autopushd pushdminus pushdsilent pushdtohome
DIRSTACKSIZE=5

# Enable extended globbing
@@ -160,20 +160,11 @@ _newline=$'\n'
_lineup=$'\e[1A'
_linedown=$'\e[1B'

# * There are uncommitted changes.
# ? There are files git doesn't know about.
# ➚ There are commits that haven't been pushed yet.
# ☰ There are stashed files.
# ⌥ There are branches other than master.
# ® There are remote repositories other than origin configured.
source ~/.zsh/git-prompt.zsh

function preexec() {
echo
}
function precmd() {
echo
PSVAR=`git_prompt_precmd`
}

PROMPT="%F{red}%n%F{white}@%F{green}%m %F{blue}%~ ${_newline}%F{white}$ "
@@ -194,4 +185,4 @@ fi


# added by travis gem
[ -f /home/wolfe/.travis/travis.sh ] && source /home/wolfe/.travis/travis.sh
[ -f ~/.travis/travis.sh ] && source ~/.travis/travis.sh

Loading…
Cancel
Save