Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/neeasade/dotfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
neeasade committed Feb 25, 2019
2 parents cad1b00 + 37db2b1 commit 7210afe
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 18 deletions.
11 changes: 10 additions & 1 deletion shell/.sh.d/environment
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,16 @@ LESSCHARSET='utf-8'
BROWSER=qutebrowser
FILEBROWSER=thunar
VIEW_PDF=zathura
[ -z "$TERMINAL" ] && TERMINAL=$(iif $WINDOWS git-bash xst)

if [ -z "$TERMINAL" ]; then
if $WINDOWS; then
TERMINAL=git-bash
elif has xst; then
TERMINAL=xst
elif has urxvt; then
TERMINAL=urxvt
fi
fi

# default
GTK_THEME=${GTK_THEME:-adwaita}
Expand Down
26 changes: 20 additions & 6 deletions shell/.sh.d/functions
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,6 @@ groot() {
fi
}

# make a new note for later to reference or publish.
note() {
cd $HOME/git/neeasade.github.io/
./new.sh "$*"
}

# nix query
nq() {
local CACHE="$HOME/.cache/nq-cache"
Expand Down Expand Up @@ -208,3 +202,23 @@ book() {
player.sh pause
google-chrome-stable "$(cat ~/.book_url)" &
}

passadd() {
(echo "$2"; echo "$2") | pass add "$1"
}

gset() {
case $1 in
work)
git config user.name "$(pass name)"
git config user.email "$(pass email)"
;;
home)
git config user.name "neeasade"
git config user.email "neeasade@gmail.com"
;;
*)
echo unknown option
;;
esac
}
10 changes: 9 additions & 1 deletion shell/.sh.d/style
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,26 @@

type theme > /dev/null 2>&1 &&
_prompt="$(theme getval PROMPT_CHAR)" ||
_prompt='%%'
_prompt='%'

# zsh bb
[ "$(basename $SHELL)" = "zsh" ] && [ $_prompt = "%" ] && _prompt="%%"

prompt() {
_ERR=$?
[ $(jobs | wc -l) -ne 0 ] && _prompt="${_prompt}${_prompt}"


if [ $_ERR -ne 0 ]; then
${ESHELL:-false} &&
_prompt="${_prompt}!" ||
_prompt="\e[7m${_prompt}\e[0m" # invert
fi

if $ESHELL; then
_prompt="|Pr0mPT|%~|$_prompt"
fi

printf "%b%s" "$_prompt "
}

Expand Down
7 changes: 3 additions & 4 deletions shell/.zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,9 @@ setopt autocd
export WORDCHARS='*?_.[]~=&;!#$%^(){}<>'

if $ESHELL; then
cd "$HOME"
unsetopt PROMPT_SP
unsetopt zle
return
unsetopt PROMPT_SP
unsetopt zle
return
fi

# vim bindings
Expand Down
5 changes: 2 additions & 3 deletions tools/.gitconfig
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
[user]
email = nathanisom27@gmail.com
name = neeasade
[url "git@github.com:"]
pushInsteadOf = "https://github.com/"
[credential]
helper = cache --timeout 36000
6 changes: 3 additions & 3 deletions wm/.wm/scripts/theming/defaults
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env dash
#!/bin/sh
# This script will be sourced by themes and then have options overridden

. "$HOME/.wm/themes/colors/${THEME_NAME}"
Expand Down Expand Up @@ -169,9 +169,9 @@ border_width_in_normal=$(( border_width_current/2 ))
border_width_out_normal=$(( (border_width_current/2) + (border_width_current%2) ))
border_width_in_focused=$border_width_in_normal
border_width_out_focused=$border_width_out_normal
border_color_out_normal=$(bspc config normal_border_color | tr -d \#)
border_color_out_normal=$b_normal_border_color
border_color_in_normal=$(greaten $border_color_out_normal 30)
border_color_out_focused=$(bspc config focused_border_color | tr -d \#)
border_color_out_focused=$b_focused_border_color
border_color_in_focused=$(greaten $border_color_out_focused 30)

# default template targets
Expand Down
1 change: 1 addition & 0 deletions wm/.wm/themes/paper
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ BG_COMMAND="/run/current-system/sw/bin/feh --bg-tile '/media/LIVEWIRE/Archive/ot

emacs_theme="base16-grayscale-light"
emacs_powerline_scale="1.0"
PROMPT_CHAR='%'

# bspwm
b_border_width=1
Expand Down

0 comments on commit 7210afe

Please sign in to comment.