Skip to content

Commit cd46031

Browse files
committed
buncha cleanup of old dumb stuff. also ls colors
1 parent aa31774 commit cd46031

17 files changed

+53
-271
lines changed

Diff for: .bash_profile

+7
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@ case $- in
1212
*i*) source ~/.extra
1313
esac
1414

15+
# here's LS_COLORS
16+
# github.com/trapd00r/LS_COLORS
17+
command -v gdircolors >/dev/null 2>&1 || alias gdircolors="dircolors"
18+
if which gdircolors > /dev/null; then
19+
eval "$(gdircolors -b ~/.dircolors)"
20+
fi
21+
1522
# generic colouriser
1623
GRC=`which grc`
1724
if [ "$TERM" != dumb ] && [ -n "$GRC" ]

Diff for: .bash_prompt

-19
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ set_prompts() {
2626
local dateCmd=""
2727

2828
if [ -x /usr/bin/tput ] && tput setaf 1 &> /dev/null; then
29-
3029
tput sgr0 # Reset colors
3130

3231
bold=$(tput bold)
@@ -45,24 +44,6 @@ set_prompts() {
4544
magenta=$(tput setaf 9)
4645
white=$(tput setaf 8)
4746
yellow=$(tput setaf 136)
48-
49-
else
50-
51-
bold=""
52-
reset="\e[0m"
53-
54-
black="\e[1;30m"
55-
blue="\e[1;34m"
56-
cyan="\e[1;36m"
57-
green="\e[1;32m"
58-
orange="\e[1;33m"
59-
purple="\e[1;35m"
60-
red="\e[1;31m"
61-
magenta="\e[1;31m"
62-
violet="\e[1;35m"
63-
white="\e[1;37m"
64-
yellow="\e[1;33m"
65-
6647
fi
6748

6849
# Only show username/host if not default

Diff for: .bashrc

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
[ -n "$PS1" ] && source ~/.bash_profile
55

6-
# when things like nvm/yarn/rvm add rando shit into my .bashrc i move them to ~/.extrarc just cuz
7-
[ -r "~/.extrarc" ] && source "~/.extrarc"
86

97
[ -f ~/.fzf.bash ] && source ~/.fzf.bash
8+
# .dircolors

Diff for: .exports

+13-7
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# file is shared between bash and fish
2+
13
# vim as default
24
export EDITOR="vim"
35

@@ -10,13 +12,17 @@ export LANG="en_US"
1012

1113
export HOMEBREW_CASK_OPTS="--appdir=/Applications"
1214

13-
# here's LS_COLORS
14-
# github.com/trapd00r/LS_COLORS
15-
command -v gdircolors >/dev/null 2>&1 || alias gdircolors="dircolors"
16-
if which gdircolors > /dev/null; then
17-
eval "$(gdircolors -b ~/.dircolors)"
18-
fi
15+
# highlighting inside manpages and elsewhere
16+
export LESS_TERMCAP_mb=$(printf '\e[01;31m') # enter blinking mode – red
17+
export LESS_TERMCAP_md=$(printf '\e[01;35m') # enter double-bright mode – bold, magenta
18+
export LESS_TERMCAP_me=$(printf '\e[0m') # turn off all appearance modes (mb, md, so, us)
19+
export LESS_TERMCAP_se=$(printf '\e[0m') # leave standout mode
20+
export LESS_TERMCAP_so=$(printf '\e[01;33m') # enter standout mode – yellow
21+
export LESS_TERMCAP_ue=$(printf '\e[0m') # leave underline mode
22+
export LESS_TERMCAP_us=$(printf '\e[04;36m') # enter underline mode – cyan
1923

2024
# fzf should be populated via the silver searcher (to respect gitignore and be faster): https://github.com/junegunn/fzf#respecting-gitignore
2125
# note.. without `ag` this is a good fallback: export FZF_DEFAULT_COMMAND='fd --type f'
22-
export FZF_DEFAULT_COMMAND='command ag -l -g ""'
26+
export FZF_DEFAULT_COMMAND='command ag --files-with-matches --filename-pattern ""'
27+
export FZF_CTRL_T_COMMAND='command ag --files-with-matches --filename-pattern ""'
28+

Diff for: README.md

+8-19
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,21 @@
44
* You're quite welcome to make suggestions, however I may decline if it's not of personal value to me.
55
* If you're starting off anew, consider forking [mathias](https://github.com/mathiasbynens/dotfiles/) or [alrra](https://github.com/alrra/dotfiles/). [paulmillr](https://github.com/paulmillr/dotfiles) and [gf3](https://github.com/gf3/dotfiles) also have great setups
66

7-
## Setup
8-
#### installing & using
9-
10-
* fork this to your own acct
11-
* clone that repo
12-
* read and run parts of `setup-a-new-machine.sh`
13-
* read and run `symlink-setup.sh`
14-
* git config needs attention, read the notes.
15-
* use it. yay!
167

17-
#### maintenance
8+
## Setup
189

19-
* commit/push changes you want.
20-
* you can also hypothetically cherry-pick commits from me and mathias and our fork ecosystem.
10+
I would not suggest you just wholesale use my dotfiles. But there's a few files where there's great goodies you can steal.
2111

2212
#### shell
2313

2414
This repo contains config for fish and bash. As of March 2016, I'm using fish shell mostly, but fall back to bash once in a while. The bash and fish stuff are both well maintained. If you're using fish you'll want to do a `git submodule update --init`.
2515

26-
2716
## my favorite parts.
2817

29-
### [`.aliases`](https://github.com/paulirish/dotfiles/blob/master/.aliases) and [`.functions`](https://github.com/paulirish/dotfiles/blob/master/.functions)
18+
### aliases and functions
19+
20+
* [`aliases.fish`](./fish/aliases.fish) and [`functions.fish`](./fish/functions.fish) and [`fish/functions/*`](./fish/functions/)
21+
* [`.aliases`](./.aliases) and [`.functions`](./.functions)
3022

3123
So many goodies.
3224

@@ -39,7 +31,7 @@ Basically it makes typing into the prompt amazing.
3931
* case insensitivity.
4032
* tab all the livelong day.
4133

42-
34+
### [.gitconfig](./gitconfig)
4335

4436
### Moving around in folders (`z`, `...`, `cdf`)
4537
`z` helps you jump around to whatever folder. It uses actual real magic to determine where you should jump to. Seperately there's some `...` aliases to shorten `cd ../..` and `..`, `....` etc. Then, if you have a folder open in Finder, `cdf` will bring you to it.
@@ -114,11 +106,8 @@ Mathias's repo is the canonical for this, but you should probably run his or min
114106

115107
### `~/bin`
116108

117-
One-off binaries that aren't via an npm global or homebrew. [git open](https://github.com/paulirish/git-open), [wifi-password](https://github.com/rauchg/wifi-password), [coloredlogcat](https://developer.sinnerschrader-mobile.com/colored-logcat-reloaded/507/), [git-overwritten](https://github.com/mislav/dotfiles/blob/master/bin/git-overwritten), and `subl` for Sublime Text.
118-
119-
### Syntax highlighting for these files
109+
One-off binaries that aren't via an npm global or homebrew. [git open](https://github.com/paulirish/git-open), [wifi-password](https://github.com/rauchg/wifi-password), [coloredlogcat](https://developer.sinnerschrader-mobile.com/colored-logcat-reloaded/507/), and `subl` for Sublime Text.
120110

121-
If you edit this stuff, install [Dotfiles Syntax Highlighting](https://github.com/mattbanks/dotfiles-syntax-highlighting-st2) via [Package Control](http://wbond.net/sublime_packages/package_control)
122111

123112
### 2020 update
124113

Diff for: brew-cask.sh

-3
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,11 @@ brew install --cask iterm2
1717
brew install --cask sublime-text
1818
brew install --cask imageoptim
1919

20-
# fun
21-
brew install --cask limechat
2220

2321
# less often
2422
brew install --cask disk-inventory-x
2523
brew install --cask screenflow
2624
brew install --cask vlc
27-
brew install --cask gpgtools
2825

2926
brew install --cask spotify
3027

Diff for: fish/config.fish

+5-21
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ if test -e "$HOME/.extra.fish";
1616
end
1717

1818
# THEME PURE #
19-
set -g async_prompt_functions _pure_prompt_git
19+
set -g async_prompt_functions _pure_prompt_git # run this async! dope.
2020
set fish_function_path $HOME/.config/fish/functions/pure/functions/ $fish_function_path
2121
set fish_function_path $HOME/.config/fish/functions/pure/ $fish_function_path
2222
source $HOME/.config/fish/functions/pure/conf.d/pure.fish
@@ -81,28 +81,12 @@ set -g fish_pager_color_prefix cyan
8181
set -g fish_pager_color_progress cyan
8282

8383

84-
# highlighting inside manpages and elsewhere
85-
set -gx LESS_TERMCAP_mb \e'[01;31m' # begin blinking
86-
set -gx LESS_TERMCAP_md \e'[01;38;5;74m' # begin bold
87-
set -gx LESS_TERMCAP_me \e'[0m' # end mode
88-
set -gx LESS_TERMCAP_se \e'[0m' # end standout-mode
89-
set -gx LESS_TERMCAP_so \e'[38;5;246m' # begin standout-mode - info box
90-
set -gx LESS_TERMCAP_ue \e'[0m' # end underline
91-
set -gx LESS_TERMCAP_us \e'[04;38;5;146m' # begin underline
92-
93-
94-
# tabtab source for yarn package
95-
# uninstall by removing these lines or running `tabtab uninstall yarn`
96-
[ -f $HOME/.config/yarn/global/node_modules/tabtab/.completions/yarn.fish ]; and . $HOME/.config/yarn/global/node_modules/tabtab/.completions/yarn.fish
97-
98-
99-
# fzf should be populated via the silver searcher (to respect gitignore and be faster): https://github.com/junegunn/fzf#respecting-gitignore
100-
# note.. without `ag` this is a good fallback: set -gx FZF_DEFAULT_COMMAND 'fd --type f'
101-
set -gx FZF_DEFAULT_COMMAND 'command ag --files-with-matches --filename-pattern ""'
102-
set -gx FZF_CTRL_T_COMMAND "$FZF_DEFAULT_COMMAND"
103-
84+
# pull in all shared `export …` aka `set -gx …`
85+
. ~/.exports
10486

10587
# TODO debug this
10688
# this currently messes with newlines in my prompt. lets debug it later.
10789
test -e {$HOME}/.iterm2_shell_integration.fish ; and source {$HOME}/.iterm2_shell_integration.fish
10890

91+
# fancy `ls` colors. this adds 20ms to shell init. from ~70 to ~90.
92+
eval (gdircolors -c ~/.dircolors)

Diff for: fish/functions/__bass.py

-80
This file was deleted.

Diff for: fish/functions/bass.fish

-20
This file was deleted.

Diff for: fish/functions/f.fish

-4
This file was deleted.

Diff for: fish/functions/fi.fish

-4
This file was deleted.

Diff for: fish/functions/g.fish

-3
This file was deleted.

Diff for: fish/functions/log.fish

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# TODO: fish compatibility
21
function log --description "git commit browser. uses fzf"
3-
git log --graph --color=always --format="%C(auto)%h%d %s %C(black)%C(bold)%cr" "$argv" | \
2+
# todo add "$argv" in there without breaking the no-argv case.
3+
git log --graph --color=always --format="%C(auto)%h%d %s %C(black)%C(bold)%cr" | \
44
fzf --ansi --no-sort --reverse --tiebreak=index --toggle-sort=\` --bind "ctrl-m:execute:
55
echo '{}' | grep -o '[a-f0-9]\{7\}' | head -1 |
66
xargs -I % sh -c 'git show --color=always % | less -R'"

0 commit comments

Comments
 (0)