From 66c6bdc7d85bee84a4ed6ed67a088c06e650e394 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 19 Oct 2016 16:56:37 +0200 Subject: [PATCH] Complete refactor + arch linux support --- .common.sh | 26 - {config => .enabled.d}/.git-keep | 0 zsh/cache/.git-keep => .enabled.d/README.md | 0 .gitignore | 5 - README.md | 20 +- bash/aliases | 1 - bin/{ => mac}/html2pdf | 0 bin/{ => mac}/run-boris | 0 bin/{ => mac}/timelapse | 0 bin/{ => mac}/timelapse2mov | 0 bin/since | 4 +- bootstrap | 82 ++ browser/.vimperator/colors/vnought.vimp | 68 ++ browser/.vimperatorrc | 18 + config/nvim | 1 - custom/firefox/userstyles/newtab.css | 272 ------ custom/firefox/userstyles/trello.css | 69 -- custom/firefox/userstyles/twily.css | 329 ------- custom/iterm_profiles.json | 853 ------------------ custom/thayer.itermcolors | 213 ----- custom/twily.itermcolors | 357 -------- dev/README.md | 0 ghci => dev/haskell/ghci | 0 dev/node/bootstrap | 0 {config => dev/python/.config}/flake8 | 0 dev/python/aliases.zsh | 3 + dev/python/init.zsh | 3 + dev/python/install | 17 + irbrc => dev/ruby/.irbrc | 0 pryrc => dev/ruby/.pryrc | 0 rspec => dev/ruby/.rspec | 0 dev/ruby/aliases.zsh | 11 + dev/ruby/init.zsh | 5 + dev/ruby/install | 12 + docker/aliases.zsh | 4 + docker/install | 0 ctags => editor/.ctags | 0 editorconfig => editor/.editorconfig | 0 scss-lint.yml => editor/.scss-lint.yml | 0 editor/emacs/aliases.zsh | 0 editor/emacs/bootstrap | 28 + editor/emacs/init.zsh | 1 + editor/neovim/aliases.zsh | 2 + editor/neovim/bootstrap | 25 + editor/neovim/update | 9 + editor/vim/aliases.zsh | 1 + editor/vim/bootstrap | 22 + hgrc.style | 16 - install.sh | 22 - curlrc => os/.curlrc | 0 inputrc => os/.inputrc | 0 os/README.md | 0 os/arch/.Xresources | 67 ++ os/arch/.config/bspwm/bspwmrc | 72 ++ os/arch/.config/compton.conf | 47 + os/arch/.config/gtk-3.0/gtk.css | 11 + os/arch/.config/panel/lemons/bluetooth.sh | 0 os/arch/.config/panel/lemons/gmail.sh | 0 os/arch/.config/panel/lemons/music.sh | 0 os/arch/.config/panel/lemons/updates.sh | 7 + os/arch/.config/panel/lemons/volume.sh | 10 + os/arch/.config/panel/lemons/wifi.sh | 7 + os/arch/.config/panel/panel.sh | 41 + os/arch/.config/panel/scripts/config.sh | 32 + os/arch/.config/panel/scripts/parse.sh | 121 +++ os/arch/.config/sxhkd/sxhkdrc | 159 ++++ os/arch/.config/termite/config | 32 + os/arch/.ncmpcpp/bindings | 389 ++++++++ os/arch/.ncmpcpp/config | 481 ++++++++++ os/arch/.xprofile | 8 + os/arch/aliases.zsh | 14 + os/arch/install | 46 + os/arch/update | 3 + os/macos/aliases.zsh | 16 + os/macos/install | 10 + os/macos/macos.zsh | 18 + os/macos/update | 11 + osx | 592 ------------ rcrc | 1 - recipes/callisto | 3 + recipes/europa | 5 + recipes/ganymede | 6 + recipes/io | 7 + recipes/remote | 3 + recipes/thebe | 7 + shell/README.md | 0 shell/aliases.sh | 14 + bash_profile => shell/bash/.bash_profile | 0 bashrc => shell/bash/.bashrc | 0 shell/bash/README.md | 3 + shell/bash/aliases.bash | 1 + bash/config => shell/bash/config.bash | 0 bash/prompt => shell/bash/prompt.bash | 0 shell/common.sh | 45 + shell/fasd/fasd.zsh | 1 + shell/fasd/install | 21 + tmux.conf => shell/tmux/.tmux.conf | 6 +- shell/tmux/aliases.zsh | 27 + shell/tmux/install | 13 + {tmux => shell/tmux/scripts}/conf-status.sh | 0 {tmux => shell/tmux/scripts}/conf.sh | 0 .../tmux/scripts}/prefix_highlight.tmux | 0 {tmux => shell/tmux/scripts}/swap-pane.sh | 0 shell/zsh/.zshenv | 29 + shell/zsh/.zshrc | 31 + shell/zsh/README.md | 0 shell/zsh/aliases.zsh | 58 ++ shell/zsh/cache/.git-keep | 0 shell/zsh/cache/rbenv-zsh | 17 + shell/zsh/cache/zhistory | 301 ++++++ zsh/completion => shell/zsh/completion.zsh | 4 +- {zsh => shell/zsh}/completions/_brew | 0 {zsh => shell/zsh}/completions/_lsarchive | 0 {zsh => shell/zsh}/completions/_unarchive | 0 zsh/config => shell/zsh/config.zsh | 8 +- shell/zsh/install | 25 + zsh/keybinds => shell/zsh/keybinds.zsh | 5 +- zsh/prompt => shell/zsh/prompt.zsh | 9 +- vcs/README.md | 0 gitconfig => vcs/git/.gitconfig | 2 - gitignore => vcs/git/.gitignore | 0 vcs/git/aliases.zsh | 32 + vcs/git/install | 18 + vcs/hg/.hgignore | 9 + hgrc => vcs/hg/.hgrc | 0 vcs/hg/install | 15 + zsh/aliases | 266 ------ zshenv | 68 -- zshrc | 39 - 129 files changed, 2639 insertions(+), 3153 deletions(-) delete mode 100644 .common.sh rename {config => .enabled.d}/.git-keep (100%) rename zsh/cache/.git-keep => .enabled.d/README.md (100%) delete mode 100644 .gitignore delete mode 120000 bash/aliases rename bin/{ => mac}/html2pdf (100%) rename bin/{ => mac}/run-boris (100%) rename bin/{ => mac}/timelapse (100%) rename bin/{ => mac}/timelapse2mov (100%) create mode 100755 bootstrap create mode 100644 browser/.vimperator/colors/vnought.vimp create mode 100644 browser/.vimperatorrc delete mode 120000 config/nvim delete mode 100644 custom/firefox/userstyles/newtab.css delete mode 100644 custom/firefox/userstyles/trello.css delete mode 100644 custom/firefox/userstyles/twily.css delete mode 100644 custom/iterm_profiles.json delete mode 100644 custom/thayer.itermcolors delete mode 100644 custom/twily.itermcolors create mode 100644 dev/README.md rename ghci => dev/haskell/ghci (100%) create mode 100755 dev/node/bootstrap rename {config => dev/python/.config}/flake8 (100%) create mode 100644 dev/python/aliases.zsh create mode 100644 dev/python/init.zsh create mode 100755 dev/python/install rename irbrc => dev/ruby/.irbrc (100%) rename pryrc => dev/ruby/.pryrc (100%) rename rspec => dev/ruby/.rspec (100%) create mode 100644 dev/ruby/aliases.zsh create mode 100644 dev/ruby/init.zsh create mode 100755 dev/ruby/install create mode 100644 docker/aliases.zsh create mode 100755 docker/install rename ctags => editor/.ctags (100%) rename editorconfig => editor/.editorconfig (100%) rename scss-lint.yml => editor/.scss-lint.yml (100%) create mode 100644 editor/emacs/aliases.zsh create mode 100755 editor/emacs/bootstrap create mode 100644 editor/emacs/init.zsh create mode 100644 editor/neovim/aliases.zsh create mode 100755 editor/neovim/bootstrap create mode 100755 editor/neovim/update create mode 100644 editor/vim/aliases.zsh create mode 100755 editor/vim/bootstrap delete mode 100644 hgrc.style delete mode 100755 install.sh rename curlrc => os/.curlrc (100%) rename inputrc => os/.inputrc (100%) create mode 100644 os/README.md create mode 100644 os/arch/.Xresources create mode 100755 os/arch/.config/bspwm/bspwmrc create mode 100644 os/arch/.config/compton.conf create mode 100644 os/arch/.config/gtk-3.0/gtk.css create mode 100755 os/arch/.config/panel/lemons/bluetooth.sh create mode 100755 os/arch/.config/panel/lemons/gmail.sh create mode 100755 os/arch/.config/panel/lemons/music.sh create mode 100755 os/arch/.config/panel/lemons/updates.sh create mode 100755 os/arch/.config/panel/lemons/volume.sh create mode 100755 os/arch/.config/panel/lemons/wifi.sh create mode 100755 os/arch/.config/panel/panel.sh create mode 100755 os/arch/.config/panel/scripts/config.sh create mode 100755 os/arch/.config/panel/scripts/parse.sh create mode 100644 os/arch/.config/sxhkd/sxhkdrc create mode 100644 os/arch/.config/termite/config create mode 100644 os/arch/.ncmpcpp/bindings create mode 100644 os/arch/.ncmpcpp/config create mode 100644 os/arch/.xprofile create mode 100644 os/arch/aliases.zsh create mode 100755 os/arch/install create mode 100755 os/arch/update create mode 100644 os/macos/aliases.zsh create mode 100755 os/macos/install create mode 100644 os/macos/macos.zsh create mode 100755 os/macos/update delete mode 100755 osx delete mode 100644 rcrc create mode 100644 recipes/callisto create mode 100644 recipes/europa create mode 100644 recipes/ganymede create mode 100644 recipes/io create mode 100644 recipes/remote create mode 100644 recipes/thebe create mode 100644 shell/README.md create mode 100644 shell/aliases.sh rename bash_profile => shell/bash/.bash_profile (100%) rename bashrc => shell/bash/.bashrc (100%) create mode 100644 shell/bash/README.md create mode 100644 shell/bash/aliases.bash rename bash/config => shell/bash/config.bash (100%) rename bash/prompt => shell/bash/prompt.bash (100%) create mode 100644 shell/common.sh create mode 100644 shell/fasd/fasd.zsh create mode 100755 shell/fasd/install rename tmux.conf => shell/tmux/.tmux.conf (94%) create mode 100644 shell/tmux/aliases.zsh create mode 100755 shell/tmux/install rename {tmux => shell/tmux/scripts}/conf-status.sh (100%) rename {tmux => shell/tmux/scripts}/conf.sh (100%) rename {tmux => shell/tmux/scripts}/prefix_highlight.tmux (100%) rename {tmux => shell/tmux/scripts}/swap-pane.sh (100%) create mode 100644 shell/zsh/.zshenv create mode 100644 shell/zsh/.zshrc create mode 100644 shell/zsh/README.md create mode 100644 shell/zsh/aliases.zsh create mode 100644 shell/zsh/cache/.git-keep create mode 100644 shell/zsh/cache/rbenv-zsh create mode 100644 shell/zsh/cache/zhistory rename zsh/completion => shell/zsh/completion.zsh (98%) rename {zsh => shell/zsh}/completions/_brew (100%) rename {zsh => shell/zsh}/completions/_lsarchive (100%) rename {zsh => shell/zsh}/completions/_unarchive (100%) rename zsh/config => shell/zsh/config.zsh (95%) create mode 100755 shell/zsh/install rename zsh/keybinds => shell/zsh/keybinds.zsh (99%) rename zsh/prompt => shell/zsh/prompt.zsh (95%) create mode 100644 vcs/README.md rename gitconfig => vcs/git/.gitconfig (97%) rename gitignore => vcs/git/.gitignore (100%) create mode 100644 vcs/git/aliases.zsh create mode 100755 vcs/git/install create mode 100644 vcs/hg/.hgignore rename hgrc => vcs/hg/.hgrc (100%) create mode 100755 vcs/hg/install delete mode 100644 zsh/aliases delete mode 100644 zshenv delete mode 100644 zshrc diff --git a/.common.sh b/.common.sh deleted file mode 100644 index 18b6032d..00000000 --- a/.common.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash - -DOTFILES="$HOME/.dotfiles" -CACHE_DIR="$HOME/.cache" - -is-callable() { command -v "$1" >/dev/null; } -is-interactive() { [[ $- == *i* ]]; } -is-root() { [[ "$UID" -eq 0 ]]; } -is-ssh() { [[ "$SSH_CONNECTION" != '' ]]; } - -cache() { - if [[ -z "$CACHE_DIR" ]]; then - >&2 echo "Cache not set!" - return 1 - fi - - [[ ! -d "$CACHE_DIR" ]] && mkdir -p "$CACHE_DIR" - - is-callable "$1" || return 1 - local cache="${CACHE_DIR}/$1-$(basename $SHELL)" - if ! [[ -f "$cache" && -s "$cache" ]]; then - echo "Caching $1" - $@ > "$cache" 2> /dev/null - fi - source $cache -} diff --git a/config/.git-keep b/.enabled.d/.git-keep similarity index 100% rename from config/.git-keep rename to .enabled.d/.git-keep diff --git a/zsh/cache/.git-keep b/.enabled.d/README.md similarity index 100% rename from zsh/cache/.git-keep rename to .enabled.d/README.md diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 4e279478..00000000 --- a/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -vim/bundle/ -vimperator/info/ -tmp/ -zsh/cache -Gemfile.lock diff --git a/README.md b/README.md index defdd6d2..6e953a97 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,25 @@ # Henrik's dotfiles [![MIT](https://img.shields.io/badge/license-MIT-green.svg)](./LICENSE) -They bite. +These are the dotfiles that fuel my madness, made for MacOS, Arch Linux and the various +debian-based boxes I frequently ssh into. + +## Getting started + +`./bootstrap` does everything, including install packages and symlink dotfiles. Pass it +the modules you want. e.g. + +`./bootstrap install os/arch vcs/* shell/zsh` + +To update all modules: + +`./bootstrap update` + +Or to clear out all your symlinked dotfilse: + +`./bootstrap clean` + +Each command has a one-letter shortcut, e.g. `./bootstrap i os/macos` ## Relevant diff --git a/bash/aliases b/bash/aliases deleted file mode 120000 index fb2a4b83..00000000 --- a/bash/aliases +++ /dev/null @@ -1 +0,0 @@ -../zsh/aliases \ No newline at end of file diff --git a/bin/html2pdf b/bin/mac/html2pdf similarity index 100% rename from bin/html2pdf rename to bin/mac/html2pdf diff --git a/bin/run-boris b/bin/mac/run-boris similarity index 100% rename from bin/run-boris rename to bin/mac/run-boris diff --git a/bin/timelapse b/bin/mac/timelapse similarity index 100% rename from bin/timelapse rename to bin/mac/timelapse diff --git a/bin/timelapse2mov b/bin/mac/timelapse2mov similarity index 100% rename from bin/timelapse2mov rename to bin/mac/timelapse2mov diff --git a/bin/since b/bin/since index d1017bda..48326d3e 100755 --- a/bin/since +++ b/bin/since @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -e -(( $# > 0 )) || exit 1 +(( $# > 0 )) || return # Displays the time since $1 in a human readable format (e.g. 4h 25m 55s). If given a # file, the modified time is used. If $1 == "--", then this script acts as a converter, @@ -13,8 +13,6 @@ set -e date=date if [[ "$OSTYPE" == darwin* ]]; then date=gdate -elif [[ "$OSTYPE" == linux* ]]; then - date=date else echo "Unsupported system" exit 1 diff --git a/bootstrap b/bootstrap new file mode 100755 index 00000000..13cafe3b --- /dev/null +++ b/bootstrap @@ -0,0 +1,82 @@ +#!/bin/bash +export DOTFILES=$(cd $(dirname $0) && pwd -P) +source "$DOTFILES/shell/common.sh" +set -e + +# +install() { + for topic in $*; + do + local path="$(dirname $0)/$topic" + if [ -d "$path" ]; + then + [ -f "$path/install" ] && . "$path/install" + + # Link available dotfiles (1 level deep) + for file in "$1"/.[a-zA-Z]* + do + if [ -d "$file" ]; then + for subfile in "$file"/* + do + local base="$HOME/$(basename $file)" + [ ! -d "$base" ] && mkdir -p "$base" + ln -svf "$subfile" "$base" + done + elif [ -f "$file" ]; then + ln -svf "$file" "$HOME" + fi + done + + # Symlink enabled topic folders + if [ ! -h "$DOTFILES/.enabled.d/$(basename $path)" ] + then + ln -svf "$DOTFILES/$path" "$DOTFILES/.enabled.d" + fi + elif [ -f "$path" ] + then + install $(cat "$path") + fi + done +} + +update() { + for topic in $DOTFILES/.enabled.d/*/ + do + [ -x "$topic/update" ] && . "$topic/update" + done +} + +clean() { + # Temporarily move dotfiles to kill symlinks + mv $DOTFILES /tmp/dotfiles + # Clean up dead symlinks + find -L $HOME -iname '.*' -type l -maxdepth 1 -exec rm -fv {} \; + if [ -d "$HOME/.config" ] + then + find -L $HOME/.config -iname '.*' -type l -maxdepth 1 -exec rm -fv {} \; + fi + # Move it back + mv /tmp/dotfiles $DOTFILES +} + +usage() { + echo "Nope" + exit +} + + +## +(( "$#" == 0 )) && usage + +COMMAND="$1" +shift +case "$COMMAND" in + i|install) install $* ;; + u|update) update ;; + c|clean) clean ;; + r|reinstall) + clean + install $* + ;; + *) usage ;; +esac diff --git a/browser/.vimperator/colors/vnought.vimp b/browser/.vimperator/colors/vnought.vimp new file mode 100644 index 00000000..c8567919 --- /dev/null +++ b/browser/.vimperator/colors/vnought.vimp @@ -0,0 +1,68 @@ +" ==Vimperator_Color_Scheme== +" name: Vnought +" url: +" ==Vnought_Colorscheme_Settings== + +"StatusLine settings +hi StatusLine color: #d9d9d9; background: #1D1F21; "font-size: 9pt; +" hi StatusLineBroken color: #000000; background: #afafff; "font-size: 9pt; +" hi StatusLineSecure color: #000000; background: #afffaf; "font-size: 9pt; + +"CmdLine settings excluding Gradient +hi Normal color: #afafaf; background: #1D1F21; font-size: 9pt; font-family: "Terminus", monospace; +hi CmdLine background: #1D1F21; color: #afafaf; font-size: 9pt; +hi CompDesc color: #c6c6c6; width: 50%; font-size: 9pt; +hi CompIcon width: 16px; min-width: 16px; display: inline-block; margin-right: .5ex; +hi CompItem[selected] background: #666666; color: #afafaf; +" hi CompLess text-align: center; height: 0; line-height: .5ex; padding-top: 1ex; +" hi CompMore text-align: center; height: .5ex; line-height: .5ex; margin-bottom: -.5ex; +hi CompMsg font-style: italic; margin-left: 16px; +hi CompResult width: 45%; overflow: hidden;font-size: 10pt; font-family: monospace; font-weight: normal; +hi CompTitle color: #afafaf; background: #1D1F21; font-weight: bold; +hi CompTitle>* padding: 0 .5ex; +hi Filter font-weight: bold;color: #afafaf; + +"When using tab complete in CmdLine, line separating Title from function and description +" hi Gradient height: 1px; margin-bottom: -1px; margin-top: -1px; +" hi GradientLeft background-color: #00bbff; +" hi GradientRight background-color: #1D1F21; + +"Used with ]f and [f +hi FrameIndicator background-color: #1D1F21; opacity: 0.5; z-index: 999; position: fixed; top: 0; bottom: 0; left: 0; right: 0; + +hi Bell border: 0 none; background-color: #1D1F21; +hi ErrorMsg color: #ffffff; background: red; font-weight: bold; + + +"Hint section +"hi Hint font-family: Sans; font-size: 10px; font-weight: bold; color: #f6e9e9; background-color: red; border-color: ButtonShadow; border-width: 0px; border-style: solid; padding 0px 1px 0px 1px; +hi Hint font-family: Sans; font-size: 10px; font-weight: bold; color: white; background-color: rgba(0, 0, 0, 0.5); border: solid 1px LightGray; +hi Hint::after content: attr(number); +hi HintActive background: blue; color: #f6e9e9; +hi HintElem background-color: #1D1F21; color: #f6e9e9; +hi HintImage opacity: .5; + +"Other important stuff +hi InfoMsg color: #afafaf; background: #1D1F21; +hi Message white-space: normal; min-width: 100%; padding-left: 2em; text-indent: -2em; display: block; +hi WarningMsg color: red; background: #1D1F21; +hi ModeMsg color: #afafaf; background: #1D1F21; "CmdLine when Not in Use +hi MoreMsg color: #afafaf; background: #1D1F21; +hi NonText color: lightblue; min-height: 16px; padding-left: 2px; +hi Question color: #ffffff; background: #1D1F21; font-weight: bold; +" hi Search font-size: inherit; padding: 0; color: #1D1F21; background-color: yellow; padding: 0; +hi Function color: lightgreen; background: #1D1F21; +hi Number color: tan; background: #1D1F21 +hi String color: #1D1F21; background: #afafaf; +hi Tag color: #1D1F21; background: #afafaf; +hi Title color: #1D1F21; background: #afafaf; font-weight: bold; +hi URL text-decoration: none; color: lightblue; background: inherit; +hi URL:hover text-decoration: underline; cursor: pointer; +hi LineNr color: #afafaf; background: #1D1F21; + +"style -name statusbar chrome://* < * { margin: 0 !important; padding: 0 2px 0 0 !important; } +"EOM + +"For other descriptions of each item, please see ``Styling'' section included with Vimperator diff --git a/browser/.vimperatorrc b/browser/.vimperatorrc new file mode 100644 index 00000000..cc7aafb9 --- /dev/null +++ b/browser/.vimperatorrc @@ -0,0 +1,18 @@ +colorscheme vnought + +set wildmode=list:full +set complete=slbh +set hintchars=asdfhjkl; +set hlsearch + +set newtab=all +set animations + +nnoremap ; : +nnoremap : ; +nnoremap . b +nnoremap :tabmove! -1 +nnoremap :tabmove! +1 + +" Pass through all keys (like CTRL-Z) on Gmail and Google Reader: +autocmd LocationChange .* :js modes.passAllKeys = /mail\.google\.com|www\.google\.com\/reader\/view/.test(buffer.URL) diff --git a/config/nvim b/config/nvim deleted file mode 120000 index 1fec7f3d..00000000 --- a/config/nvim +++ /dev/null @@ -1 +0,0 @@ -/Volumes/hlissner/.vim \ No newline at end of file diff --git a/custom/firefox/userstyles/newtab.css b/custom/firefox/userstyles/newtab.css deleted file mode 100644 index b46423ff..00000000 --- a/custom/firefox/userstyles/newtab.css +++ /dev/null @@ -1,272 +0,0 @@ -/* Nightly Fox - about:newtab - * V15.07.21 - * By NADIRP.DEVIANTART.COM */ -/* i really want this to be global */ - -/* SETTINGS */ -:root { - --main-page-bg-color: #524C59; - --main-page-cell-bg-color: rgba(255,255,255,.05); - - --main-page-text-color: #FFFFFF; - --main-page-text-color-two: #FF9500; - --main-page-text-invert-color-two: #FFFFFF; - --main-page-link-color: #FF9500; - - --main-border-radius: 0px; - --main-theme-border-color: rgba(0, 0, 0,.2); - --main-page-border-color: rgba(0, 0, 0,.2); - - --main-font-family: "Open Sans", sans-serif; -} - -/* :::::: NEW TAB :::::: */ -@-moz-document url("about:newtab"){ - - body { - background: var(--main-page-bg-color); - color: #ccc; - } - - #newtab-search-container { display: none; } - - /* BG */ - #newtab-scrollbox { - background: url("") top center /cover, var(--main-page-bg-color) !important; - background-color: var(--main-page-bg-color) !important; - } - - /* SEARCH */ - #newtab-search-container { - padding-top: 10px !important; - padding-bottom: 20px !important; - } - - #newtab-search-logo { - display: none; - } - - #newtab-search-text { - padding: 0px 15px 0px 15px !important; - min-height: 55px; - -moz-appearance: none !important; - background: transparent !important; - border: 1px solid var(--main-page-border-color)!important; - border-radius: 0px !important; - outline: 0 none !important; - box-shadow: none !important; - font-size: 16px !important; - color: var(--main-page-text-color-two) !important; - font-family: var(--main-font-family) !important; - transition-property: border; - transition-duration: 150ms; - } - - #newtab-search-text:focus, - #newtab-search-text[autofocus] { - border: 1px solid var(--main-page-text-color-two)!important; - border-radius: 0px !important; - transition-property: border; - transition-duration: 150ms; - } - - #newtab-search-submit { - padding: 0px 15px 0px 15px !important; - height: 55px; - -moz-appearance: none !important; - background: transparent !important; - border: 1px solid var(--main-page-border-color)!important; - border-left: 1px solid transparent!important; - border-radius: 0px !important; - box-shadow: none !important; - font-family: var(--main-font-family) !important; - font-size: 12px !important; - text-transform: uppercase; - color: var(--main-page-text-color) !important; - } - - #newtab-search-text:focus + #newtab-search-submit, - #newtab-search-text[autofocus] + #newtab-search-submit{ - background: transparent !important; - border: 1px solid var(--main-page-text-color-two)!important; - border-radius: 0px !important; - box-shadow: none !important; - color: var(--main-page-text-color-two) !important; - } - - #newtab-search-text + #newtab-search-submit:hover { - background: var(--main-page-text-color-two) !important; - border: 1px solid var(--main-page-text-color-two)!important; - color: var(--main-page-text-invert-color-two) !important; - } - - #newtab-search-text +#newtab-search-submit:hover:active { - background: var(--main-page-text-invert-color-two) !important; - border: 1px solid var(--main-page-text-color-two)!important; - color: var(--main-page-text-color-two) !important; - } - - /* SITES */ - - .newtab-title { - border-radius: 0; - } - - .newtab-site { - box-shadow: none !important; - border: none !important; - color: var(--main-page-text-color-two) !important; - margin: 0px; - border-radius: 0px; - } - - .newtab-cell:not([ignorehover]) > .newtab-site:hover, - .newtab-site[dragged] { - border: none; - box-shadow: none ; - margin: 0px; - } - - /* TITLES */ - .newtab-sponsored, - .newtab-title, - .newtab-suggested { - /*text-align: left;*/ - background-color: var(--main-page-bg-color) !important; - border: 1px solid var(--main-page-border-color)!important; - } - - .newtab-sponsored,.newtab-title { - font-size: 12px !important; - font-family: var(--main-font-family) !important; - color:var(--main-page-text-color) !important; - transition-property: color; - transition-duration: 150ms; - } - - .newtab-sponsored{ - color:var(--main-page-text-color-two) !important; - } - - .newtab-site:hover .newtab-title { - background-color: var(--main-page-link-color) !important; - } - - /* THUMBNAILS */ - .newtab-thumbnail { - border-radius: 0px !important; - filter: grayscale(1) opacity(.9); - border: none; - } - - .newtab-site:hover .newtab-thumbnail { - border-radius: 0px; - transition: opacity 100ms ease-out; - /*background-color: var(--main-page-bg-color) !important; - background-blend-mode: overlay !important;*/ - filter: grayscale(0) opacity(1); - transition-property: filter; - transition-duration: 50ms; - } - - /* CELLS */ - .newtab-cell { - background-color: var(--main-page-cell-bg-color); - border-radius: 0px; - } - - .newtab-cell:hover { - background-color: var(--main-page-cell-bg-color); - border-radius: 0px; - } - - .newtab-cell:empty { - outline: 1px dashed var(--main-theme-border-color) ; - -moz-outline-radius: 0px; - } - - /* CELLS */ - .newtab-cell, - .newtab-intro-cell, - .newtab-intro-cell-hover { - background-color: rgba(255,255,255,.2); - border-radius: 0px; - border: 0px; - } - - .newtab-cell:empty { - outline: none; - -moz-outline-radius: 0px; - border: 0px solid white; - border-radius: 0px; - } - - /* SITES */ - .newtab-site { - border: 0px solid white; - border-radius: 0px; - box-shadow: none; - text-decoration: none; - transition-property: top, left, opacity, box-shadow, background-color; - } - - .newtab-cell:not([ignorehover]) .newtab-control:hover ~ .newtab-link, - .newtab-cell:not([ignorehover]) .newtab-link:hover, - .newtab-site[dragged], - .newtab-intro-cell-hover .newtab-link { - border: 0px solid white; - border-radius: 0px; - box-shadow: none; - margin: 0px; - } - .newtab-cell ,.newtab-control ,.newtab-link, - .newtab-cell ,.newtab-link, - .newtab-intro-cell-hover, .newtab-link { - border: 0px solid white; - border-radius: 0px; - box-shadow: none; - - } - - /* CONTROLS */ - .newtab-control-block { - opacity: 0; - transition-property: opacity; - transition-duration: 150ms; - } - - .newtab-control-pin, - .newtab-site[pinned] .newtab-control-pin:hover:active { - opacity: 0; - transition-property: opacity; - transition-duration: 150ms; - } - - /* UNDO */ - #newtab-undo-container { - background: var(--main-page-text-color-two) !important; - border-radius: 0px; - border-color: transparent; - } - - /* CUSTOMIZE */ - #newtab-intro-what { - margin-top: -4px; - font-size: 12px !important; - font-family: var(--main-font-family) !important; - color: var(--main-page-link-color); - text-decoration: none; - /*transition-property: color; - transition-duration: 150ms;*/ - } - - #newtab-intro-what:hover { - color: var(--main-page-link-color); - } - - #newtab-customize-button, - .newtab-customize { - background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAA7DAAAOwwHHb6hkAAADcUlEQVR4nJWVa0hUQRTHdfeurru6yIruFhJZQRFRivShEvSTBBVYJpH0wcLA6ksEQib4yoqEigh6YRn4oRApEhIrEoweULBlRCmVUb4yd43VFdf11W/0XpnWu7YODOecOTP/c/5n5tyrzMzMROiN8fHxlKioqINTU1NPFEV5Eezv7++3OByO46iD+Gunp6d1gRRddAbg9YhtRqPxxOjo6Cqr1fpb9judzgpEsdAnJia6ES1LCiDOqdIaExNzGEb3COYU5GDlJoFCbSNVGAsFEjIAh25FRkZmCR1ZDWC15iOQvPULvueUKPwAlZWVhrKysk2hggeN2EAgsAX5KqwAjY2NRsAbUPcEuXqZXUwrcz3TrK4vg1ErZduPfLAgALVdCcVK9G4yqc3NzS0KAn/G4RJeylttYXBwMDYhISGf0lVhOpjRBoOhfnJyMhO5mvU8SuxCP6cAfoYN+eIg+klEpAR+gayKg59gYmKiD3FzbGys2Ww2P0VfJ5ix9w3SIPYQZC+vq1khUgeGdla+vcd64PLgdfXAOsdkMrULFhq4RtTv9/co0DhNCdqRx1jM1rzQLVkMXBuw7iTJ26hH1KUh7Muwux4XF+eZvWQybYLOd+r8Qd3URVbv/geuDRK5T4JagE70Khpz1ph/RSw6pTPfwgUXA7ZfYaKZy2XffABoBaT16KUE4A6jJNOvG4B7+Cl16Ia2tjYlMzNzMpwAlDZdMnv+8blcLlNqamoRFI9K6/aMjIwcZGOYDAokM4tqNJHweQK/VNLS0kQfFAcf4k5qhoeHW20229Bi4FzwPgJkS0uiDLuoxnaaeK0okU1yeiPmGk2spfDMWnhuObz3vhDgeYDXSUvis52sYhjF3SgjIyOnAPoFrV6Px3PXbreLdm+KmGuazXTqZ3xXoNxE44inHMMTTmfPIQB2SuCfvF7vVovFksSe3Zz5KHpEUUtQIbqZT4DY+IjMCrFvoJtUNqVQLtXets7ooKN3xMfHe9Uq1GgO3c812dWRcR9S9y8VNN6TeZYKvmCE/OHAIFky3cwBZhJznClYb1R9K7inCQLo4iwW4ICmU8+zsLmk2eoPqRN1DdPOz1/cRcOSAjA8qhzy+Xx3uKt5R3l5Odc0fZEkrgobfYAElsbA7XYX8FN5yEfwNeB/gv0AXuOefsDOKxoqFM5futlcjM7bFg8AAAAASUVORK5CYII=) center no-repeat!important; - } - -} diff --git a/custom/firefox/userstyles/trello.css b/custom/firefox/userstyles/trello.css deleted file mode 100644 index de1e9a19..00000000 --- a/custom/firefox/userstyles/trello.css +++ /dev/null @@ -1,69 +0,0 @@ -@-moz-document regexp("^https://trello.com/[bc]/.+") { - #board .badge { margin-bottom: 2px; } - #board .badges { padding-bottom: 0; } - - #board .list { - display: block; - min-width: 125px; max-width: 250px; - margin: 0 0 30px 0; padding: 0; - background: none; - font-size: 95%; - } - - #board .list-wrapper { width: 225px; } - #board .list-wrapper:first-child { margin-left: 10px; } - - #board .list-card-details { - font-size: 95%; - line-height: 17px; - margin-top: 1px; - } - - #board .list-header { color: #e2e4e6; } - - #board .open-card-composer { color: #e2e4e6; } - #board .open-card-composer:hover { - background: none; - color: #eee; - } - - #board .list-card { - margin-bottom: 0px; - } - #board .list-card-title { - margin-bottom: 2px; - } - #board .list-card-labels { - float: left; - margin-top: -11px; - margin-left: -5px; - } - #board .list-card-labels .card-label { - width: 35px; - } - - .card-detail-window .card-detail-item-header, - .card-detail-window .card-detail-item-header-edit { - display: none; - } -} - -@-moz-document url-prefix("^https://trello.com/b/oNCdFuxc") { - /* Projects board */ - .list-wrapper:nth-child(4) .badges { display: none; } -} - -@-moz-document url("https://trello.com/") { - #content .board-list .details, - #content .board-list .js-add-board - { min-height: 20px; } - - #content .board-list li { - margin-bottom: 6px; - width: 220px; - height: 36px; - overflow: hidden; - } - - #content .js-add-board { line-height: 20px; } -} diff --git a/custom/firefox/userstyles/twily.css b/custom/firefox/userstyles/twily.css deleted file mode 100644 index 927e13ff..00000000 --- a/custom/firefox/userstyles/twily.css +++ /dev/null @@ -1,329 +0,0 @@ -@namespace html url(http://www.w3.org/1999/xhtml); -@namespace xul url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul); -/* - Original Author: Twily - Modified by: Henrik Lissner - Description: Minimal flat styled tabs for Australis - Compitability: Firefox Nightly v31.0a1 - v32.0a1 (Australis) - CSS Variables were introduced to Firefox in v29.0a1 - Website: http://twily.info/ - - Note: To enable the urlbar; search this css for: - "make the url-bar visible" and "adjust margin-top to" -*/ - -:root { - /* TAB VARIABLES */ - --bg-light: #524C59; --bg-dark: #282333; - --fg-light: #D6CCDC; --fg-dark: #AAA5AD; - --tab-triangle-correction: -1px; - --tab-height: 29px; --tab-icon-size: 16px; --tab-strip-margin: -8px; --tab-overlap: -5px; - --tab-fonts: "Ubuntu Mono",monospace,"Dejavu Sans"; --tab-font-size: 9.5pt; - --tab-text-align: left; /* left | center | right */ - --tab-triangle: none; /* block | none */ - - /* URL VARIABLES */ - --url-background: #3E3848; --url-color: var(--fg-light); - --url-height: 26px; --url-right-margin: 5px; - --url-fonts: "Ubuntu Mono",monospace,"Dejavu Sans"; --url-font-size: 12pt; - --url-text-align: left; /* left | center | right */ - --url-position: absolute; /* absolute == top (under tabs) || fixed == bottom of browser */ - - margin-bottom: 0 !important; -} - - -@-moz-document url(chrome://browser/content/browser.xul) { - statuspanel label { background-color: var(--bg-dark); } - - - /*#downloads-button, #tabview-button { margin-top: -2px !important; padding-left: 10px !important; opacity: 0.5; }*/ - - #titlebar, #titlebar-placeholder-on-TabsToolbar-for-captions-buttons { display: none !important; } - - /* URL-BAR */ - #back-button, #forward-button, #back-button *, #forward-button *, /*#identity-box,*/ #urlbar-reload-button, #urlbar-stop-button, #urlbar-go-button, - #PanelUI-button, #bookmarks-menu-button, #home-button, #stylish-toolbar-button, #abp-toolbarbutton, - #notification-popup-box, #new-tab-button, #private-browsing-indicator, #search-container, #nav-bar-overflow-button, - .tabs-newtab-button, /*.tab-close-button, .tab-close,*/ .tab-background-start, .tab-background-end, - #window-controls /*, .tab-throbber, #alltabs-button, #tabview-button, .tab-icon-image, .tab-icon-image:not([pinned])*/ { display: none !important; } - - #identity-box { max-width: 26px !important; margin-left: 0px !important; padding-left: 5px !important; } - #identity-box #identity-icon-labels { display: none !important; } - - .autocomplete-richlistbox { height: auto !important; max-height: auto !important; background-color: var(--fg-light) !important; } - .autocomplete-richlistbox richlistitem[selected="true"] { background-color: var(--bg-dark) !important; } - .autocomplete-richlistbox .autocomplete-richlistitem .ac-url-box { display: none !important; } - .autocomplete-richlistbox .autocomplete-richlistitem[actiontype="searchengine"], - .autocomplete-richlistbox .autocomplete-richlistitem[type~="autofill"] { padding: 0 0 10px !important; } - - /* --- Uncomment the section below to enable the Back/Forward buttons [EXPERIMENTAL] (Requires url-bar) --- */ - /* - #back-button, #forward-button { display: block !important; } - #back-button::before, #forward-button::before { - display: inline-block !important; position: absolute !important; - width: var(--url-height) !important; height: var(--url-height) !important; top: 0 !important; - text-align: center !important; line-height: var(--url-height) !important; - } - #back-button::before { content: "<" !important; left: 0 !important; } - #forward-button::before { content: ">" !important; left: calc(var(--url-height) + 8px) !important; } - /**/ - - tab, .tabs-newtab-button { transition: background-color 0.1s ease-in-out !important; } - tab:hover { background-color: #3C364A !important; } - .tabs-newtab-button:hover { background-color: #3E384C !important; } - - /* --- Uncomment the section below to enable the New Tab Button [EXPERIMENTAL] --- */ - - .tabs-newtab-button { display: block !important; background: #302A3A !important; margin: 0 0 0 0 !important; width: 28px !important; } - .tabs-newtab-button::before { content: "+" !important; position: relative; bottom: 1px; opacity: 0.4; } - .tabs-newtab-button .toolbarbutton-icon { display: none !important; } - /**/ - - .tab-drop-indicator { margin-bottom: 0 !important; } - - #content-deck { /*padding-bottom: var(--url-height) !important;*/ } - #nav-bar { - position: var(--url-position) !important; bottom: 0px !important; - width: 100% !important; height: var(--url-height) !important; - min-height: var(--url-height) !important; max-height: var(--url-height) !important; - margin: 0 0 0 0 !important; - - /* --- Uncomment the section below to attach the url-bar to the tab-bar [EXPERIMENTAL] (Require a line in "#TabsToolbar" below) --- */ - /* - position: fixed !important; top: 0 !important; left: 0 !important; - width: 315px !important; max-width: 315px !important; - z-index: 100 !important; - /**/ - } - #nav-bar-customization-target { width: 100% !important; } - #urlbar-wrapper { - width: 100.5% !important; margin-top: 0px !important; /* --- adjust margin-top to ~ -5px if you experience gap --- */ - position: absolute !important; top: 0 !important; left: 0 !important; - padding-left: 6px; - border-bottom: 0px solid var(--bg-light) !important; - } - #urlbar-icons { padding-right: 5px !important; } - #urlbar { - border: none !important; border-radius: 0 !important; - margin: 0 0 0 0 !important; padding: 0 0 0 0 !important; - width: 100% !important; - height: var(--url-height) !important; min-height: var(--url-height) !important; - background: var(--url-background) !important; color: var(--url-color) !important; - font-family: var(--url-fonts) !important; font-size: var(--url-font-size) !important; - text-align: var(--url-text-align) !important; - } - /*#urlbar * { -moz-appearance: none !important; }*/ - - /* --- Comment out the section below to make the url-bar visible --- */ - /* - #nav-bar { - width: 0 !important; height: 0 !important; - position: fixed !important; left: -1px !important; top: -1px !important; - overflow: hidden !important; visibility: hidden !important; - } - /**/ - - /* TABS */ - .tabbrowser-tab[fadein]:not([pinned]) { min-width: 50px !important; max-width: 300px !important; margin-right: 1px !important; } - tab { - font-family: var(--tab-fonts) !important; - height: var(--tab-height) !important; min-height: var(--tab-height) !important; - background: var(--bg-dark) !important; color: var(--fg-dark) !important; - font-size: var(--tab-font-size) !important; text-shadow: none !important; text-align: var(--tab-text-align) !important; - padding-bottom: 0 !important; - } - - .tabbrowser-tab[visuallyselected="true"] { - position: unset !important; - } - - .tabbrowser-tab label { padding: 0 10px 0 15px !important; } - - #tabbrowser-tabs .tabbrowser-tab[pinned] { width: 28px !important; } - #tabbrowser-tabs .tabbrowser-tab[pinned] label { display: none !important; } - #tabbrowser-tabs .tabbrowser-tab label { text-align: var(--url-text-align) !important; } - - #tabbrowser-tabs .tabbrowser-tab .tab-icon-image { - margin: 0 -9px 0 7px !important; - width: var(--tab-icon-size) !important; - height: var(--tab-icon-size) !important; - } - - .tabbrowser-tab *, .tabs-newtab-button * { - background: none !important; - margin: 0 0 0 0 !important; padding: 0 0 0 0 !important; - -moz-appearance: none !important; - } - - .tabbrowser-tab .tab-close-button { - margin-right: 4px !important; - opacity: 0.25 !important; - } - .tabbrowser-tab .tab-throbber { - margin-left: 6px !important; - margin-right: -8px !important; - } - - #tabbrowser-tabs .tabbrowser-tab[pinned] .tab-stack { height: var(--tab-height) !important; width: 100% !important; } - #tabbrowser-tabs .tabbrowser-arrowscrollbox .box-inherit.scrollbox-innerbox { max-height: var(--tab-height) !important; } - .scrollbutton-up, .scrollbutton-down { border: none !important; } - - .tabbrowser-tab[selected="true"] .tab-stack { - background: var(--url-background) !important; color: var(--fg-light) !important; - border-radius: 0px !important; position: relative !important; - /*border-top: 1px solid #dc52a5 !important;/**/ - } - #TabsToolbar, #tabbrowser-tabs { - -moz-appearance: none !important; - height: var(--tab-height) !important; min-height: var(--tab-height)!important; - margin: 0 -2px 0px var(--tab-strip-margin) !important; - padding-right: 0 !important; - background: var(--bg-dark) !important; - - /* --- Uncomment the line below to attach the url-bar to the tab-bar [EXPERIMENTAL] (Require a line in "#nav-bar" above) --- */ - /**********************************/ - - /*padding-left: 40px !important;/**/ - - /**********************************/ - } - #TabsToolbar::after { display: none !important; } - .tabbrowser-tab::before, .tabbrowser-tab::after { background: none !important; opacity: 0 !important; visibility: visible !important; } - - /*browser, #navigator-toolbox { -moz-appearance: none !important; background: transparent !important; }*/ - - #navigator-toolbox::after { height: 0px !important; background: var(--bg-light) !important; } - #liberator-separator { height: 0px !important; background: var(--bg-light) !important; border-top: 0 !important; } - - /* MENUS */ - menuitem + menuseparator, menu + menuseparator/*, .menu-iconic-left*/ { display: none !important; } - /*menuitem > label { margin-left: var(--tab-height) !important; }*/ - menubar, menubutton, menulist, menu, menuitem { - font-family: var(--tab-fonts) !important; font-size: var(--tab-font-size); - height: var(--tab-height) !important; - } - - /* HIDE ORANGE MENU BUTTON */ - #appmenu-toolbar-button, #appmenu-button-container { display: none !important; } - - /* HIDE STATUS BAR */ - /*#status-bar, #statusbar-display, statuspanel { display: none !important; }*/ - - /* PRIVATE BROWSING ICON HIDE */ - #main-window[privatebrowsingmode=temporary] #private-browsing-indicator, - #main-window[privatebrowsingmode=temporary] #private-browsing-indicator-titlebar { display: none !important; } - - /* Vimperator icon style */ - #liberator-statusline:not([customizing="true"]) { margin: -2px -2px !important; padding: 0 0 !important; height: 24px !important; } - #liberator-statusline:not([customizing="true"]) :-moz-any(toolbarbutton) { height: 100% !important; } - #tabview-button { - list-style-image: url(http://twily.info/img/tabview-button.png?v=2) /* 16x16 px image */ !important; - -moz-image-region: rect(0, 0, 0, 0) !important; - } - - #liberator-completions { background: var(--bg-dark) !important; } - - /* Tabgroup margin top fix */ - #tab-view-deck #tab-view { margin: 24px 12px 12px 12px !important; } - #tab-view-deck { background: var(--bg-light) !important; } - - window[sizemode="fullscreen"] #liberator-statusline { display: none !important; } - window[sizemode="fullscreen"] #liberator-bottombar { - margin-top: -24px !important; - transition: 1s ease !important; transition-delay: .3s !important; - } - /*window[sizemode="fullscreen"] #browser-panel { margin-top: -1px !important; }*/ -} - - -/* Tab Group Page Style (Ctrl+Shift+E) */ -@-moz-document url(chrome://browser/content/tabview.html) { - #content #bg, #actions, body { background: var(--bg-light) !important; } - body * { color: var(--fg-light) !important; } - - body .groupItem, #content #actions, body .undo { - background: var(--bg-dark) !important; - border: 0 !important; border-radius: 0 !important; box-shadow: 0 0 0 0 !important; - } - #content #actions { - opacity: 0 !important; display: none !important; /* block | none */ - transition: .3s ease-out !important; - } - #content #actions:hover { opacity: 1 !important; } - - body .appTabTrayContainer { border: 0 !important; } - body .tab, body .tab .thumb { - box-shadow: 0 0 0 0 !important; border: 0 !important; border-radius: 0 !important; - background: transparent !important; padding : 0 !important; - } - body .tab .favicon { display: none !important; } - body .groupItem .name { border: 0 !important; } - body .tab .tab-title { padding-top: 2px !important; } -} - - -/* AGENT_SHEET */ -@-moz-document url-prefix(http://), url-prefix(https://), url-prefix(chrome://liberator/), url-prefix(file:///) { - /* SCROLLBAR */ - scrollbar[orient="vertical"], scrollbar thumb[orient="vertical"], - scrollbar[orient="horizontal"], scrollbar thumb[orient="horizontal"] { - display: block !important; /* none = hide || block = show */ - } - - /* - scrollbar > slider { -moz-appearance: none !important; } - - scrollbar[orient="vertical"] { margin: -3px -7px -3px -3px !important; } - scrollbar[orient='vertical'] > slider { background: #282333 !important; max-width: 5px !important; } - scrollbar[orient='vertical'] > slider > thumb { - -moz-appearance: none !important; - background: #524C59 !important; border: 0 !important; - width: 5px !important; max-width: 5px !important; - } - - scrollbar[orient="horizontal"] { margin: -3px -3px -7px -3px !important; } - scrollbar[orient='horizontal'] > slider { background: #282333 !important; max-height: 5px !important; } - scrollbar[orient='horizontal'] > slider > thumb { - -moz-appearance: none !important; - background: #524C59 !important; border: 0 !important; - height: 5px !important; max-height: 5px !important; - } - - scrollbar > scrollbarbutton { -moz-appearance: none !important; border: none !important; background: none !important; } - scrollbar[orient='vertical'] > scrollbarbutton { min-height: 0 !important; } - scrollbar[orient='horizontal'] > scrollbarbutton { min-width: 0 !important; } - /**/ -} - - -/* background color around/behind pictures opened in firefox (require html namespace on top) */ -@-moz-document regexp("(https?://|file:///)(.*)\\.(jpeg|jpg|gif|png|apng|svg|bmp|webm|webp)") { - body { background: var(--bg-light) !important; } - img.decoded { background-color: transparent !important; } -} - - -/* About:Blank background */ -@-moz-document url(about:blank) { - html,body { background: var(--bg-light) !important; } -} - -/* about:stylish-edit toolbar style */ -@-moz-document regexp("about:stylish-edit.*") { - #main-area, textbox { background: var(--bg-light) !important; } - textbox, grid, columns, rows, separator { border: 0 !important; } - - .devtools-toolbarbutton { background: var(--bg-dark) !important; color: var(--fg-light) !important; } -} - -/*----- Fix for white flash on new tab -----*/ -tabbrowser tabpanels, #appcontent > #content { padding: 0 !important; margin: 0 !important; background: var(--url-background) !important; } - - -/* Set dark text in light textareas */ -/* -@-moz-document regexp("https?://(?!(localhost|twily.info|.*.4chan.org|.*.youtube.com)).*") { - input, textarea { color: #222628 !important; -moz-appearance: none !important; } -} -/**/ diff --git a/custom/iterm_profiles.json b/custom/iterm_profiles.json deleted file mode 100644 index 267fbac6..00000000 --- a/custom/iterm_profiles.json +++ /dev/null @@ -1,853 +0,0 @@ -{ -"Profiles": [ -{ - "Ansi 5 Color" : { - "Green Component" : 0.3294118, - "Red Component" : 0.5490196, - "Blue Component" : 0.9960784 - }, - "Working Directory" : "\/Users\/hlissner", - "Prompt Before Closing 2" : 0, - "Selected Text Color" : { - "Green Component" : 1, - "Red Component" : 1, - "Blue Component" : 1 - }, - "Rows" : 56, - "Ansi 11 Color" : { - "Green Component" : 0.9294118, - "Red Component" : 0.9960784, - "Blue Component" : 0.4235294 - }, - "Use Italic Font" : true, - "Foreground Color" : { - "Green Component" : 0.627451, - "Red Component" : 0.627451, - "Blue Component" : 0.627451 - }, - "Right Option Key Sends" : 0, - "Character Encoding" : 4, - "Selection Color" : { - "Green Component" : 0.3024194, - "Red Component" : 0.3024194, - "Blue Component" : 0.3024194 - }, - "Triggers" : [ - - ], - "Blend" : 0.3, - "Mouse Reporting" : true, - "Ansi 4 Color" : { - "Green Component" : 0.7607843, - "Red Component" : 0.3372549, - "Blue Component" : 0.8392157 - }, - "Non-ASCII Anti Aliased" : true, - "Sync Title" : false, - "Disable Window Resizing" : true, - "Close Sessions On End" : true, - "Jobs to Ignore" : [ - "rlogin", - "ssh", - "slogin", - "telnet" - ], - "Scrollback With Status Bar" : false, - "Scrollback Lines" : 0, - "Scrollback in Alternate Screen" : true, - "Hide After Opening" : false, - "Prevent Opening in a Tab" : false, - "Flashing Bell" : false, - "BM Growl" : true, - "AWDS Window Directory" : "", - "Ansi 3 Color" : { - "Green Component" : 0.5921569, - "Red Component" : 0.9921569, - "Blue Component" : 0.1215686 - }, - "Use Non-ASCII Font" : true, - "Shortcut" : "", - "Background Image Location" : "", - "Bold Color" : { - "Green Component" : 1, - "Red Component" : 1, - "Blue Component" : 1 - }, - "Unlimited Scrollback" : true, - "Allow Title Setting" : false, - "Custom Command" : "No", - "AWDS Tab Option" : "No", - "Smart Selection Rules" : [ - { - "notes" : "Word bounded by whitespace", - "regex" : "\\S+", - "precision" : "low" - }, - { - "notes" : "C++ namespace::identifier", - "regex" : "([a-zA-Z0-9_]+::)+[a-zA-Z0-9_]+", - "precision" : "normal" - }, - { - "notes" : "Paths", - "regex" : "\\~?\/?([[:letter:][:number:]._-]+\/+)+[[:letter:][:number:]._-]+\/?", - "precision" : "normal" - }, - { - "notes" : "Quoted string", - "regex" : "@?\"(?:[^\"\\\\]|\\\\.)*\"", - "precision" : "normal" - }, - { - "notes" : "Java\/Python include paths", - "regex" : "([[:letter:][:number:]._]+\\.)+[[:letter:][:number:]._]+", - "precision" : "normal" - }, - { - "notes" : "mailto URL", - "regex" : "\\bmailto:([a-z0-9A-Z_]+@)?([a-zA-Z0-9\\-]+\\.)*[a-zA-Z0-9\\-]+\\b", - "precision" : "normal" - }, - { - "notes" : "Obj-C selector", - "regex" : "@selector\\([^)]+\\)", - "precision" : "high" - }, - { - "notes" : "email address", - "regex" : "\\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,4}\\b", - "precision" : "high" - }, - { - "notes" : "HTTP URL", - "regex" : "https?:\/\/([a-z0-9A-Z]+(:[a-zA-Z0-9]+)?@)?[a-z0-9A-Z]+(\\.[a-z0-9A-Z]+)*((:[0-9]+)?)(\/[a-zA-Z0-9;\/\\.\\-_+%~?&@=#\\(\\)]*)?", - "precision" : "very_high" - }, - { - "notes" : "SSH URL", - "regex" : "\\bssh:([a-z0-9A-Z_]+@)?([a-zA-Z0-9\\-]+\\.)*[a-zA-Z0-9\\-]+\\b", - "precision" : "very_high" - }, - { - "notes" : "Telnet URL", - "regex" : "\\btelnet:([a-z0-9A-Z_]+@)?([a-zA-Z0-9\\-]+\\.)*[a-zA-Z0-9\\-]+\\b", - "precision" : "very_high" - } - ], - "Keyboard Map" : { - "0xf702-0x240000" : { - "Text" : "[1;5D", - "Action" : 10 - }, - "0xf700-0x260000" : { - "Text" : "[1;6A", - "Action" : 10 - }, - "0xf704-0x20000" : { - "Text" : "[1;2P", - "Action" : 10 - }, - "0xf709-0x20000" : { - "Text" : "[17;2~", - "Action" : 10 - }, - "0xf70c-0x20000" : { - "Text" : "[20;2~", - "Action" : 10 - }, - "0xf729-0x20000" : { - "Text" : "[1;2H", - "Action" : 10 - }, - "0xf72b-0x40000" : { - "Text" : "[1;5F", - "Action" : 10 - }, - "0xf705-0x20000" : { - "Text" : "[1;2Q", - "Action" : 10 - }, - "0xf703-0x260000" : { - "Text" : "[1;6C", - "Action" : 10 - }, - "0xf700-0x220000" : { - "Text" : "[1;2A", - "Action" : 10 - }, - "0xf701-0x280000" : { - "Text" : "0x1b 0x1b 0x5b 0x42", - "Action" : 11 - }, - "0x39-0x100000" : { - "Action" : 10, - "Text" : "[27;5;57~" - }, - "0xf703-0x220000" : { - "Text" : "[1;2C", - "Action" : 10 - }, - "0x38-0x100000" : { - "Action" : 10, - "Text" : "[27;5;56~" - }, - "0xf701-0x240000" : { - "Text" : "[1;5B", - "Action" : 10 - }, - "0xf70d-0x20000" : { - "Text" : "[21;2~", - "Action" : 10 - }, - "0xf702-0x260000" : { - "Text" : "[1;6D", - "Action" : 10 - }, - "0xf729-0x40000" : { - "Text" : "[1;5H", - "Action" : 10 - }, - "0x37-0x100000" : { - "Action" : 10, - "Text" : "[27;5;55~" - }, - "0xf706-0x20000" : { - "Text" : "[1;2R", - "Action" : 10 - }, - "0xf700-0x280000" : { - "Text" : "0x1b 0x1b 0x5b 0x41", - "Action" : 11 - }, - "0x36-0x100000" : { - "Action" : 10, - "Text" : "[27;5;54~" - }, - "0xf70e-0x20000" : { - "Text" : "[23;2~", - "Action" : 10 - }, - "0xf702-0x220000" : { - "Text" : "[1;2D", - "Action" : 10 - }, - "0x35-0x100000" : { - "Action" : 10, - "Text" : "[27;5;53~" - }, - "0xf703-0x280000" : { - "Text" : "0x1b 0x1b 0x5b 0x43", - "Action" : 11 - }, - "0xf707-0x20000" : { - "Text" : "[1;2S", - "Action" : 10 - }, - "0xf700-0x240000" : { - "Text" : "[1;5A", - "Action" : 10 - }, - "0xf70a-0x20000" : { - "Text" : "[18;2~", - "Action" : 10 - }, - "0x34-0x100000" : { - "Action" : 10, - "Text" : "[27;5;52~" - }, - "0xf70f-0x20000" : { - "Text" : "[24;2~", - "Action" : 10 - }, - "0x33-0x100000" : { - "Action" : 10, - "Text" : "[27;5;51~" - }, - "0xf703-0x240000" : { - "Text" : "[1;5C", - "Action" : 10 - }, - "0xf701-0x260000" : { - "Text" : "[1;6B", - "Action" : 10 - }, - "0xf702-0x280000" : { - "Text" : "0x1b 0x1b 0x5b 0x44", - "Action" : 11 - }, - "0xf72b-0x20000" : { - "Text" : "[1;2F", - "Action" : 10 - }, - "0xf708-0x20000" : { - "Text" : "[15;2~", - "Action" : 10 - }, - "0x32-0x100000" : { - "Action" : 10, - "Text" : "[27;5;50~" - }, - "0xf701-0x220000" : { - "Text" : "[1;2B", - "Action" : 10 - }, - "0xf70b-0x20000" : { - "Text" : "[19;2~", - "Action" : 10 - }, - "0x9-0x40000" : { - "Text" : "9", - "Action" : 11 - }, - "0x31-0x100000" : { - "Action" : 10, - "Text" : "[27;5;49~" - } - }, - "Log Directory" : "", - "Use Canonical Parser" : false, - "Ansi 14 Color" : { - "Green Component" : 0.6117647, - "Red Component" : 0.5372549, - "Blue Component" : 0.6313726 - }, - "Ansi 2 Color" : { - "Green Component" : 0.7058824, - "Red Component" : 0.509804, - "Blue Component" : 0.07843138 - }, - "Background Image Is Tiled" : false, - "Send Code When Idle" : false, - "ASCII Anti Aliased" : false, - "Tags" : [ - - ], - "Ansi 9 Color" : { - "Green Component" : 0.3490196, - "Red Component" : 1, - "Blue Component" : 0.5843138 - }, - "Use Bold Font" : true, - "Silence Bell" : false, - "Ansi 12 Color" : { - "Green Component" : 0.9294118, - "Red Component" : 0.5490196, - "Blue Component" : 1 - }, - "Window Type" : 1, - "Allow Title Reporting" : false, - "Use Bright Bold" : true, - "Cursor Text Color" : { - "Green Component" : 0, - "Red Component" : 0, - "Blue Component" : 0 - }, - "Default Bookmark" : "No", - "Cursor Color" : { - "Green Component" : 0.5935404, - "Red Component" : 0.9901629, - "Blue Component" : 0.120789 - }, - "Disable Smcup Rmcup" : false, - "Name" : "Default", - "Blinking Cursor" : true, - "Guid" : "8D0E7A53-F1E6-4A96-BD43-EFF90E3A3897", - "Ansi 1 Color" : { - "Green Component" : 0.1490196, - "Red Component" : 0.9764706, - "Blue Component" : 0.4470588 - }, - "Ansi 8 Color" : { - "Green Component" : 0.3264537, - "Red Component" : 0.3099609, - "Blue Component" : 0.3295914 - }, - "Ansi 10 Color" : { - "Green Component" : 0.8901961, - "Red Component" : 0.7137255, - "Blue Component" : 0.3294118 - }, - "Idle Code" : 0, - "Automatically Log" : false, - "Smart Cursor Color" : false, - "Semantic History" : { - "text" : "", - "action" : "best editor", - "editor" : "com.sublimetext.3" - }, - "Ambiguous Double Width" : false, - "Blur Radius" : 15, - "Ansi 0 Color" : { - "Green Component" : 0.1137255, - "Red Component" : 0.1058824, - "Blue Component" : 0.1176471 - }, - "Cursor Type" : 2, - "AWDS Pane Directory" : "", - "Blur" : false, - "Normal Font" : "TerminusTTF 12", - "Vertical Spacing" : 0.9856928, - "Disable Printing" : false, - "Ansi 7 Color" : { - "Green Component" : 0.8, - "Red Component" : 0.8, - "Blue Component" : 0.7764706 - }, - "AWDS Tab Directory" : "", - "AWDS Pane Option" : "No", - "Command" : "login -fpql hlissner \/usr\/local\/bin\/zsh", - "Terminal Type" : "xterm-256color", - "Horizontal Spacing" : 1, - "Reduce Flicker" : true, - "Option Key Sends" : 2, - "Blink Allowed" : false, - "Minimum Contrast" : 0, - "Ansi 15 Color" : { - "Green Component" : 0.972549, - "Red Component" : 0.972549, - "Blue Component" : 0.9490196 - }, - "Ansi 6 Color" : { - "Green Component" : 0.3294118, - "Red Component" : 0.2745098, - "Blue Component" : 0.3411765 - }, - "Transparency" : 0, - "Initial Text" : "tmux attach -t main || tmux new -s main", - "Background Color" : { - "Green Component" : 0.1122627, - "Red Component" : 0.09955534, - "Blue Component" : 0.1175956 - }, - "Screen" : 2, - "AWDS Window Option" : "No", - "Non Ascii Font" : "DejaVuSansMono 12", - "Ansi 13 Color" : { - "Green Component" : 0.4352941, - "Red Component" : 0.6196079, - "Blue Component" : 0.9960784 - }, - "Columns" : 100, - "Use Tab Color" : false, - "Visual Bell" : false, - "Custom Directory" : "No", - "Thin Strokes" : true, - "Set Local Environment Vars" : false -}, -{ - "Working Directory" : "\/Users\/hlissner", - "Prompt Before Closing 2" : 0, - "Selected Text Color" : { - "Green Component" : 1, - "Red Component" : 1, - "Blue Component" : 1 - }, - "Rows" : 40, - "Ansi 11 Color" : { - "Green Component" : 0.929411768913269, - "Red Component" : 0.9960784316062927, - "Blue Component" : 0.4235294163227081 - }, - "Use Italic Font" : true, - "Foreground Color" : { - "Green Component" : 0.6274510025978088, - "Red Component" : 0.6274510025978088, - "Blue Component" : 0.6274510025978088 - }, - "Right Option Key Sends" : 0, - "Character Encoding" : 4, - "Selection Color" : { - "Green Component" : 0.3024193644523621, - "Red Component" : 0.3024193644523621, - "Blue Component" : 0.3024193644523621 - }, - "Triggers" : [ - - ], - "Blend" : 0.3, - "Mouse Reporting" : true, - "Cursor Boost" : 0, - "Ansi 4 Color" : { - "Green Component" : 0.7607843279838562, - "Red Component" : 0.3372549116611481, - "Blue Component" : 0.8392156958580017 - }, - "Non-ASCII Anti Aliased" : true, - "Sync Title" : false, - "Disable Window Resizing" : true, - "Close Sessions On End" : false, - "Jobs to Ignore" : [ - "rlogin", - "ssh", - "slogin", - "telnet" - ], - "Scrollback With Status Bar" : false, - "Scrollback Lines" : 0, - "Scrollback in Alternate Screen" : true, - "Hide After Opening" : false, - "Prevent Opening in a Tab" : false, - "Flashing Bell" : false, - "Cursor Guide Color" : { - "Red Component" : 0.6499999761581421, - "Color Space" : "Calibrated", - "Blue Component" : 1, - "Alpha Component" : 0.3759259259259259, - "Green Component" : 0.9100000262260437 - }, - "BM Growl" : true, - "Ansi 3 Color" : { - "Green Component" : 0.5921568870544434, - "Red Component" : 0.9921568632125854, - "Blue Component" : 0.1215686276555061 - }, - "Use Non-ASCII Font" : false, - "Link Color" : { - "Red Component" : 0.023, - "Color Space" : "Calibrated", - "Blue Component" : 0.678, - "Alpha Component" : 1, - "Green Component" : 0.27 - }, - "Shortcut" : "", - "Background Image Location" : "", - "Bold Color" : { - "Green Component" : 1, - "Red Component" : 1, - "Blue Component" : 1 - }, - "Use Cursor Guide" : false, - "Unlimited Scrollback" : true, - "Custom Command" : "No", - "Smart Selection Rules" : [ - { - "notes" : "Word bounded by whitespace", - "regex" : "\\S+", - "precision" : "low" - }, - { - "notes" : "C++ namespace::identifier", - "regex" : "([a-zA-Z0-9_]+::)+[a-zA-Z0-9_]+", - "precision" : "normal" - }, - { - "notes" : "Paths", - "regex" : "\\~?\/?([[:letter:][:number:]._-]+\/+)+[[:letter:][:number:]._-]+\/?", - "precision" : "normal" - }, - { - "notes" : "Quoted string", - "regex" : "@?\"(?:[^\"\\\\]|\\\\.)*\"", - "precision" : "normal" - }, - { - "notes" : "Java\/Python include paths", - "regex" : "([[:letter:][:number:]._]+\\.)+[[:letter:][:number:]._]+", - "precision" : "normal" - }, - { - "notes" : "mailto URL", - "regex" : "\\bmailto:([a-z0-9A-Z_]+@)?([a-zA-Z0-9\\-]+\\.)*[a-zA-Z0-9\\-]+\\b", - "precision" : "normal" - }, - { - "notes" : "Obj-C selector", - "regex" : "@selector\\([^)]+\\)", - "precision" : "high" - }, - { - "notes" : "email address", - "regex" : "\\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,4}\\b", - "precision" : "high" - }, - { - "notes" : "HTTP URL", - "regex" : "https?:\/\/([a-z0-9A-Z]+(:[a-zA-Z0-9]+)?@)?[a-z0-9A-Z]+(\\.[a-z0-9A-Z]+)*((:[0-9]+)?)(\/[a-zA-Z0-9;\/\\.\\-_+%~?&@=#\\(\\)]*)?", - "precision" : "very_high" - }, - { - "notes" : "SSH URL", - "regex" : "\\bssh:([a-z0-9A-Z_]+@)?([a-zA-Z0-9\\-]+\\.)*[a-zA-Z0-9\\-]+\\b", - "precision" : "very_high" - }, - { - "notes" : "Telnet URL", - "regex" : "\\btelnet:([a-z0-9A-Z_]+@)?([a-zA-Z0-9\\-]+\\.)*[a-zA-Z0-9\\-]+\\b", - "precision" : "very_high" - } - ], - "Keyboard Map" : { - "0xf702-0x240000" : { - "Text" : "[1;5D", - "Action" : 10 - }, - "0xf700-0x260000" : { - "Text" : "[1;6A", - "Action" : 10 - }, - "0xf709-0x20000" : { - "Text" : "[17;2~", - "Action" : 10 - }, - "0xf70c-0x20000" : { - "Text" : "[20;2~", - "Action" : 10 - }, - "0xf729-0x20000" : { - "Text" : "[1;2H", - "Action" : 10 - }, - "0xf72b-0x40000" : { - "Text" : "[1;5F", - "Action" : 10 - }, - "0xf705-0x20000" : { - "Text" : "[1;2Q", - "Action" : 10 - }, - "0xf703-0x260000" : { - "Text" : "[1;6C", - "Action" : 10 - }, - "0xf700-0x220000" : { - "Text" : "[1;2A", - "Action" : 10 - }, - "0xf701-0x280000" : { - "Text" : "0x1b 0x1b 0x5b 0x42", - "Action" : 11 - }, - "0xf703-0x220000" : { - "Text" : "[1;2C", - "Action" : 10 - }, - "0xf701-0x240000" : { - "Text" : "[1;5B", - "Action" : 10 - }, - "0xf70d-0x20000" : { - "Text" : "[21;2~", - "Action" : 10 - }, - "0xf702-0x260000" : { - "Text" : "[1;6D", - "Action" : 10 - }, - "0xf729-0x40000" : { - "Text" : "[1;5H", - "Action" : 10 - }, - "0xf706-0x20000" : { - "Text" : "[1;2R", - "Action" : 10 - }, - "0xf700-0x280000" : { - "Text" : "0x1b 0x1b 0x5b 0x41", - "Action" : 11 - }, - "0xf70e-0x20000" : { - "Text" : "[23;2~", - "Action" : 10 - }, - "0xf702-0x220000" : { - "Text" : "[1;2D", - "Action" : 10 - }, - "0xf703-0x280000" : { - "Text" : "0x1b 0x1b 0x5b 0x43", - "Action" : 11 - }, - "0xf707-0x20000" : { - "Text" : "[1;2S", - "Action" : 10 - }, - "0xf700-0x240000" : { - "Text" : "[1;5A", - "Action" : 10 - }, - "0xf70a-0x20000" : { - "Text" : "[18;2~", - "Action" : 10 - }, - "0xf70f-0x20000" : { - "Text" : "[24;2~", - "Action" : 10 - }, - "0xf703-0x240000" : { - "Text" : "[1;5C", - "Action" : 10 - }, - "0xf701-0x260000" : { - "Text" : "[1;6B", - "Action" : 10 - }, - "0xf702-0x280000" : { - "Text" : "0x1b 0x1b 0x5b 0x44", - "Action" : 11 - }, - "0xf72b-0x20000" : { - "Text" : "[1;2F", - "Action" : 10 - }, - "0xf708-0x20000" : { - "Text" : "[15;2~", - "Action" : 10 - }, - "0xf701-0x220000" : { - "Text" : "[1;2B", - "Action" : 10 - }, - "0xf70b-0x20000" : { - "Text" : "[19;2~", - "Action" : 10 - }, - "0x9-0x40000" : { - "Text" : "9", - "Action" : 11 - }, - "0xf704-0x20000" : { - "Text" : "[1;2P", - "Action" : 10 - } - }, - "Log Directory" : "", - "Use Canonical Parser" : false, - "Ansi 14 Color" : { - "Green Component" : 0.6117647290229797, - "Red Component" : 0.5372549295425415, - "Blue Component" : 0.6313725709915161 - }, - "Ansi 2 Color" : { - "Green Component" : 0.7058823704719543, - "Red Component" : 0.5098039507865906, - "Blue Component" : 0.0784313753247261 - }, - "Background Image Is Tiled" : false, - "Send Code When Idle" : false, - "ASCII Anti Aliased" : false, - "Tags" : [ - - ], - "Ansi 9 Color" : { - "Green Component" : 0.3490196168422699, - "Red Component" : 1, - "Blue Component" : 0.5843137502670288 - }, - "Use Bold Font" : true, - "Silence Bell" : false, - "Ansi 12 Color" : { - "Green Component" : 0.929411768913269, - "Red Component" : 0.5490196347236633, - "Blue Component" : 1 - }, - "Window Type" : 0, - "Allow Title Reporting" : false, - "Use Bright Bold" : true, - "Cursor Text Color" : { - "Green Component" : 0, - "Red Component" : 0, - "Blue Component" : 0 - }, - "Default Bookmark" : "No", - "Cursor Color" : { - "Green Component" : 0.593540370464325, - "Red Component" : 0.9901629090309143, - "Blue Component" : 0.1207889840006828 - }, - "Disable Smcup Rmcup" : false, - "Name" : "Floating", - "Blinking Cursor" : true, - "Ansi 1 Color" : { - "Green Component" : 0.1490196138620377, - "Red Component" : 0.9764705896377563, - "Blue Component" : 0.4470588266849518 - }, - "Guid" : "1CF91C6A-9A1D-47DD-B451-1727769012EB", - "Ansi 8 Color" : { - "Green Component" : 0.3254902064800262, - "Red Component" : 0.3137255012989044, - "Blue Component" : 0.3294117748737335 - }, - "Ansi 10 Color" : { - "Green Component" : 0.8901960849761963, - "Red Component" : 0.7137255072593689, - "Blue Component" : 0.3294117748737335 - }, - "Idle Code" : 0, - "Badge Color" : { - "Red Component" : 1, - "Color Space" : "Calibrated", - "Blue Component" : 0, - "Alpha Component" : 0.5, - "Green Component" : 0 - }, - "Automatically Log" : false, - "Smart Cursor Color" : false, - "Semantic History" : { - "editor" : "com.sublimetext.3", - "action" : "best editor", - "text" : "" - }, - "Ambiguous Double Width" : false, - "Blur Radius" : 22.12692307692308, - "Ansi 0 Color" : { - "Green Component" : 0.1137254908680916, - "Red Component" : 0.105882354080677, - "Blue Component" : 0.1176470592617989 - }, - "Cursor Type" : 2, - "Blur" : false, - "Normal Font" : "TerminusTTF 12", - "Vertical Spacing" : 0.9947289156626505, - "Disable Printing" : false, - "Ansi 7 Color" : { - "Green Component" : 0.800000011920929, - "Red Component" : 0.800000011920929, - "Blue Component" : 0.7764706015586853 - }, - "Use HFS Plus Mapping" : false, - "Command" : "login -fpql hlissner \/usr\/local\/bin\/zsh", - "Terminal Type" : "xterm-256color", - "Horizontal Spacing" : 0.9944641848644578, - "Option Key Sends" : 2, - "Blink Allowed" : false, - "Minimum Contrast" : 0, - "Ansi 15 Color" : { - "Green Component" : 0.9725490212440491, - "Red Component" : 0.9725490212440491, - "Blue Component" : 0.9490196108818054 - }, - "Ansi 6 Color" : { - "Green Component" : 0.3294117748737335, - "Red Component" : 0.2745098173618317, - "Blue Component" : 0.3411764800548553 - }, - "Transparency" : 0.01959596893491124, - "Initial Text" : "", - "Background Color" : { - "Green Component" : 0.1137254908680916, - "Red Component" : 0.105882354080677, - "Blue Component" : 0.1176470592617989 - }, - "Screen" : -1, - "Bound Hosts" : [ - - ], - "Non Ascii Font" : "Monaco 14", - "Ansi 13 Color" : { - "Green Component" : 0.43529412150383, - "Red Component" : 0.6196078658103943, - "Blue Component" : 0.9960784316062927 - }, - "Columns" : 100, - "Visual Bell" : false, - "Custom Directory" : "No", - "Ansi 5 Color" : { - "Green Component" : 0.3294117748737335, - "Red Component" : 0.5490196347236633, - "Blue Component" : 0.9960784316062927 - }, - "Set Local Environment Vars" : true -} -] -} diff --git a/custom/thayer.itermcolors b/custom/thayer.itermcolors deleted file mode 100644 index f513dae3..00000000 --- a/custom/thayer.itermcolors +++ /dev/null @@ -1,213 +0,0 @@ - - - - - Ansi 0 Color - - Blue Component - 0.11764705926179886 - Green Component - 0.11372549086809158 - Red Component - 0.10588235408067703 - - Ansi 1 Color - - Blue Component - 0.44705882668495178 - Green Component - 0.14901961386203766 - Red Component - 0.97647058963775635 - - Ansi 10 Color - - Blue Component - 0.32941177487373352 - Green Component - 0.89019608497619629 - Red Component - 0.7137255072593689 - - Ansi 11 Color - - Blue Component - 0.42352941632270813 - Green Component - 0.92941176891326904 - Red Component - 0.99607843160629272 - - Ansi 12 Color - - Blue Component - 1 - Green Component - 0.92941176891326904 - Red Component - 0.54901963472366333 - - Ansi 13 Color - - Blue Component - 0.99607843160629272 - Green Component - 0.43529412150382996 - Red Component - 0.61960786581039429 - - Ansi 14 Color - - Blue Component - 0.63137257099151611 - Green Component - 0.61176472902297974 - Red Component - 0.5372549295425415 - - Ansi 15 Color - - Blue Component - 0.94901961088180542 - Green Component - 0.97254902124404907 - Red Component - 0.97254902124404907 - - Ansi 2 Color - - Blue Component - 0.078431375324726105 - Green Component - 0.70588237047195435 - Red Component - 0.50980395078659058 - - Ansi 3 Color - - Blue Component - 0.12156862765550613 - Green Component - 0.59215688705444336 - Red Component - 0.99215686321258545 - - Ansi 4 Color - - Blue Component - 0.83921569585800171 - Green Component - 0.7607843279838562 - Red Component - 0.33725491166114807 - - Ansi 5 Color - - Blue Component - 0.99607843160629272 - Green Component - 0.32941177487373352 - Red Component - 0.54901963472366333 - - Ansi 6 Color - - Blue Component - 0.34117648005485535 - Green Component - 0.32941177487373352 - Red Component - 0.27450981736183167 - - Ansi 7 Color - - Blue Component - 0.7764706015586853 - Green Component - 0.80000001192092896 - Red Component - 0.80000001192092896 - - Ansi 8 Color - - Blue Component - 0.32941177487373352 - Green Component - 0.32549020648002625 - Red Component - 0.31372550129890442 - - Ansi 9 Color - - Blue Component - 0.58431375026702881 - Green Component - 0.3490196168422699 - Red Component - 1 - - Background Color - - Blue Component - 0.11764705926179886 - Green Component - 0.11372549086809158 - Red Component - 0.10588235408067703 - - Bold Color - - Blue Component - 1 - Green Component - 1 - Red Component - 1 - - Cursor Color - - Blue Component - 0.12078898400068283 - Green Component - 0.59354037046432495 - Red Component - 0.99016290903091431 - - Cursor Text Color - - Blue Component - 0.0 - Green Component - 0.0 - Red Component - 0.0 - - Foreground Color - - Blue Component - 0.62745100259780884 - Green Component - 0.62745100259780884 - Red Component - 0.62745100259780884 - - Selected Text Color - - Blue Component - 1 - Green Component - 1 - Red Component - 1 - - Selection Color - - Blue Component - 0.30241936445236206 - Green Component - 0.30241936445236206 - Red Component - 0.30241936445236206 - - - diff --git a/custom/twily.itermcolors b/custom/twily.itermcolors deleted file mode 100644 index 850dc3aa..00000000 --- a/custom/twily.itermcolors +++ /dev/null @@ -1,357 +0,0 @@ - - - - - Ansi 0 Color - - Alpha Component - 1 - Blue Component - 0.0 - Color Space - Calibrated - Green Component - 0.0 - Red Component - 0.0 - - Ansi 1 Color - - Alpha Component - 1 - Blue Component - 0.47843137383460999 - Color Space - Calibrated - Green Component - 0.46666666865348816 - Red Component - 0.94901961088180542 - - Ansi 10 Color - - Alpha Component - 1 - Blue Component - 0.60000002384185791 - Color Space - Calibrated - Green Component - 0.80000001192092896 - Red Component - 0.60000002384185791 - - Ansi 11 Color - - Alpha Component - 1 - Blue Component - 0.40000000596046448 - Color Space - Calibrated - Green Component - 0.80000001192092896 - Red Component - 1 - - Ansi 12 Color - - Alpha Component - 1 - Blue Component - 0.80000001192092896 - Color Space - Calibrated - Green Component - 0.60000002384185791 - Red Component - 0.40000000596046448 - - Ansi 13 Color - - Alpha Component - 1 - Blue Component - 0.80000001192092896 - Color Space - Calibrated - Green Component - 0.60000002384185791 - Red Component - 0.80000001192092896 - - Ansi 14 Color - - Alpha Component - 1 - Blue Component - 0.80000001192092896 - Color Space - Calibrated - Green Component - 0.80000001192092896 - Red Component - 0.40000000596046448 - - Ansi 15 Color - - Alpha Component - 1 - Blue Component - 0.99999129772186279 - Color Space - Calibrated - Green Component - 0.99997437000274658 - Red Component - 1 - - Ansi 2 Color - - Alpha Component - 1 - Blue Component - 0.60000002384185791 - Color Space - Calibrated - Green Component - 0.80000001192092896 - Red Component - 0.60000002384185791 - - Ansi 3 Color - - Alpha Component - 1 - Blue Component - 0.40000000596046448 - Color Space - Calibrated - Green Component - 0.80000001192092896 - Red Component - 1 - - Ansi 4 Color - - Alpha Component - 1 - Blue Component - 0.80000001192092896 - Color Space - Calibrated - Green Component - 0.60000002384185791 - Red Component - 0.40000000596046448 - - Ansi 5 Color - - Alpha Component - 1 - Blue Component - 0.80000001192092896 - Color Space - Calibrated - Green Component - 0.60000002384185791 - Red Component - 0.80000001192092896 - - Ansi 6 Color - - Alpha Component - 1 - Blue Component - 0.80000001192092896 - Color Space - Calibrated - Green Component - 0.80000001192092896 - Red Component - 0.40000000596046448 - - Ansi 7 Color - - Alpha Component - 1 - Blue Component - 0.99999129772186279 - Color Space - Calibrated - Green Component - 0.99997437000274658 - Red Component - 1 - - Ansi 8 Color - - Alpha Component - 1 - Blue Component - 0.0 - Color Space - Calibrated - Green Component - 0.0 - Red Component - 0.0 - - Ansi 9 Color - - Alpha Component - 1 - Blue Component - 0.47843137383460999 - Color Space - Calibrated - Green Component - 0.46666666865348816 - Red Component - 0.94901961088180542 - - Background Color - - Alpha Component - 1 - Blue Component - 0.16306562721729279 - Color Space - Calibrated - Green Component - 0.14132377505302429 - Red Component - 0.15464302897453308 - - Badge Color - - Alpha Component - 0.5 - Blue Component - 0.0 - Color Space - Calibrated - Green Component - 0.0 - Red Component - 1 - - Bold Color - - Alpha Component - 1 - Blue Component - 0.80000001192092896 - Color Space - Calibrated - Green Component - 0.80000001192092896 - Red Component - 0.80000001192092896 - - Cursor Color - - Alpha Component - 1 - Blue Component - 0.80000001192092896 - Color Space - Calibrated - Green Component - 0.80000001192092896 - Red Component - 0.80000001192092896 - - Cursor Guide Color - - Alpha Component - 0.048295454545454544 - Blue Component - 0.99273347854614258 - Color Space - Calibrated - Green Component - 0.77991330623626709 - Red Component - 0.78832453489303589 - - Cursor Text Color - - Alpha Component - 1 - Blue Component - 0.17647059261798859 - Color Space - Calibrated - Green Component - 0.17647059261798859 - Red Component - 0.17647059261798859 - - Foreground Color - - Alpha Component - 1 - Blue Component - 0.90656566619873047 - Color Space - Calibrated - Green Component - 0.90656566619873047 - Red Component - 0.90656566619873047 - - Link Color - - Alpha Component - 1 - Blue Component - 0.25682991743087769 - Color Space - Calibrated - Green Component - 0.67422866821289062 - Red Component - 1 - - Selected Text Color - - Alpha Component - 1 - Blue Component - 0.80000001192092896 - Color Space - Calibrated - Green Component - 0.80000001192092896 - Red Component - 0.80000001192092896 - - Selection Color - - Alpha Component - 1 - Blue Component - 0.31764706969261169 - Color Space - Calibrated - Green Component - 0.31764706969261169 - Red Component - 0.31764706969261169 - - Tab Color - - Alpha Component - 1 - Blue Component - 0.0 - Color Space - Calibrated - Green Component - 0.0 - Red Component - 0.0 - - - diff --git a/dev/README.md b/dev/README.md new file mode 100644 index 00000000..e69de29b diff --git a/ghci b/dev/haskell/ghci similarity index 100% rename from ghci rename to dev/haskell/ghci diff --git a/dev/node/bootstrap b/dev/node/bootstrap new file mode 100755 index 00000000..e69de29b diff --git a/config/flake8 b/dev/python/.config/flake8 similarity index 100% rename from config/flake8 rename to dev/python/.config/flake8 diff --git a/dev/python/aliases.zsh b/dev/python/aliases.zsh new file mode 100644 index 00000000..74271cc3 --- /dev/null +++ b/dev/python/aliases.zsh @@ -0,0 +1,3 @@ +alias py='python' +alias pye='pyenv' +alias ipy='ipython' diff --git a/dev/python/init.zsh b/dev/python/init.zsh new file mode 100644 index 00000000..bda7aa13 --- /dev/null +++ b/dev/python/init.zsh @@ -0,0 +1,3 @@ +path=($HOME/.pyenv/bin $path) + +cache pyenv init - --no-rehash diff --git a/dev/python/install b/dev/python/install new file mode 100755 index 00000000..12a4072d --- /dev/null +++ b/dev/python/install @@ -0,0 +1,17 @@ +#!/bin/bash + +case "$OSTYPE" in + darwin*) + brew install pyenv + ;; + linux*) + if [ ! -d "$HOME/.pyenv" ]; then + git clone https://github.com/yyuu/pyenv.git $HOME/.pyenv + fi + ;; +esac + +PWD=$(pwd -P) +mkdir -p $HOME/.config + +[ -f "$HOME/.config/flake8" ] || ln -s "$PWD/dev/python/.config/flake8" "$HOME/.config/flake8" diff --git a/irbrc b/dev/ruby/.irbrc similarity index 100% rename from irbrc rename to dev/ruby/.irbrc diff --git a/pryrc b/dev/ruby/.pryrc similarity index 100% rename from pryrc rename to dev/ruby/.pryrc diff --git a/rspec b/dev/ruby/.rspec similarity index 100% rename from rspec rename to dev/ruby/.rspec diff --git a/dev/ruby/aliases.zsh b/dev/ruby/aliases.zsh new file mode 100644 index 00000000..ea4860e0 --- /dev/null +++ b/dev/ruby/aliases.zsh @@ -0,0 +1,11 @@ +alias rb="ruby" +alias rbe="rbenv" +alias rdb="pry -r" + +alias rk="noglob ${aliases[rk]:-rake}" +alias rkg="noglob ${aliases[rkg]:-rake -g}" + +alias bu="bundle" +alias bue="bundle exec" +alias bui="bundle install -path vendor" + diff --git a/dev/ruby/init.zsh b/dev/ruby/init.zsh new file mode 100644 index 00000000..d3833aef --- /dev/null +++ b/dev/ruby/init.zsh @@ -0,0 +1,5 @@ +path=($HOME/.rbenv/bin $path) + +export RUBYOPT=rubygems + +cache rbenv init - --no-rehash diff --git a/dev/ruby/install b/dev/ruby/install new file mode 100755 index 00000000..3f8472ba --- /dev/null +++ b/dev/ruby/install @@ -0,0 +1,12 @@ +#!/bin/bash + +case "$OSTYPE" in + darwin*) + brew install rbenv + ;; + linux*) + git clone https://github.com/rbenv/rbenv.git $HOME/.rbenv + cd $HOME/.rbenv && src/configure && make -C src + git clone https://github.com/rbenv/ruby-build.git $HOME/.rbenv/plugins/ruby-build + ;; +esac diff --git a/docker/aliases.zsh b/docker/aliases.zsh new file mode 100644 index 00000000..7c8df3d8 --- /dev/null +++ b/docker/aliases.zsh @@ -0,0 +1,4 @@ +alias dk='docker' +alias dkm='docker-machine' +alias dkc='docker-compose' +alias dki='eval $(docker-machine env)' diff --git a/docker/install b/docker/install new file mode 100755 index 00000000..e69de29b diff --git a/ctags b/editor/.ctags similarity index 100% rename from ctags rename to editor/.ctags diff --git a/editorconfig b/editor/.editorconfig similarity index 100% rename from editorconfig rename to editor/.editorconfig diff --git a/scss-lint.yml b/editor/.scss-lint.yml similarity index 100% rename from scss-lint.yml rename to editor/.scss-lint.yml diff --git a/editor/emacs/aliases.zsh b/editor/emacs/aliases.zsh new file mode 100644 index 00000000..e69de29b diff --git a/editor/emacs/bootstrap b/editor/emacs/bootstrap new file mode 100755 index 00000000..77da4e97 --- /dev/null +++ b/editor/emacs/bootstrap @@ -0,0 +1,28 @@ +#!/bin/bash + +case "$OSTYPE" in + darwin*) + brew install make cask python + brew tap railwaycat/emacsmacport + brew install emacs-mac --with-imagemagick --with-modern-icon --HEAD + ;; + linux*) + if [ -f /etc/arch-release ]; then + sudo pacman -S make emacs python2 + elif [ -f /etc/debian_version ]; then + sudo apt-get install make emacs python + fi + + if [ ! -d ~/.cask ] + then + curl -fsSL https://raw.githubusercontent.com/cask/cask/master/go | python + fi +esac + +if [ ! -d "$HOME/.emacs.d" ]; +then + repo "hlissner/.emacs.d" "$HOME/.emacs.d" + cd "$HOME/.emacs.d" + make install + make snippets +fi diff --git a/editor/emacs/init.zsh b/editor/emacs/init.zsh new file mode 100644 index 00000000..659d45e2 --- /dev/null +++ b/editor/emacs/init.zsh @@ -0,0 +1 @@ +path=(~/.cask/bin $path) diff --git a/editor/neovim/aliases.zsh b/editor/neovim/aliases.zsh new file mode 100644 index 00000000..14b7151b --- /dev/null +++ b/editor/neovim/aliases.zsh @@ -0,0 +1,2 @@ +alias vim='nvim' +alias v='vim' diff --git a/editor/neovim/bootstrap b/editor/neovim/bootstrap new file mode 100755 index 00000000..2957440c --- /dev/null +++ b/editor/neovim/bootstrap @@ -0,0 +1,25 @@ +#!/bin/bash + +command -v nvim >/dev/null && exit + +case "$OSTYPE" in + darwin*) + brew tap neovim/neovim + brew install make neovim + ;; + linux*) + if [ -f /etc/arch-release ]; then + sudo pacman --noconfirm -S make neovim + elif [ -f /etc/debian_version ]; then + # TODO + exit 1 + fi + ;; +esac + +if [ ! -d "$HOME/.vim" ] +then + git clone --recursive "hlissner/.vim" "$HOME/.vim" + cd "$HOME/.vim" + make install +fi diff --git a/editor/neovim/update b/editor/neovim/update new file mode 100755 index 00000000..fc619a16 --- /dev/null +++ b/editor/neovim/update @@ -0,0 +1,9 @@ +#!/bin/bash + +command -v nvim >/dev/null || exit + +if [ -d "$HOME/.vim" ] +then + cd "$HOME/.vim" + make update +fi diff --git a/editor/vim/aliases.zsh b/editor/vim/aliases.zsh new file mode 100644 index 00000000..1aebe11d --- /dev/null +++ b/editor/vim/aliases.zsh @@ -0,0 +1 @@ +alias v='vim' diff --git a/editor/vim/bootstrap b/editor/vim/bootstrap new file mode 100755 index 00000000..82095d8e --- /dev/null +++ b/editor/vim/bootstrap @@ -0,0 +1,22 @@ +#!/bin/bash + +case "$OSTYPE" in + darwin*) + brew install make vim + ;; + linux*) + if is-arch; then + sudo pacman -S make vim + else is-debian; then + # TODO + exit 1 + fi + ;; +esac + +if [ ! -d "$HOME/.vim" ] +then + git-repo "hlissner/.vim" "$HOME/.vim" + cd "$HOME/.vim" + make install +fi diff --git a/hgrc.style b/hgrc.style deleted file mode 100644 index d75446fd..00000000 --- a/hgrc.style +++ /dev/null @@ -1,16 +0,0 @@ -changeset = '\033[0;33m{node|short}\033[0m{branches}{bookmarks}\033[0m{tags} {desc|firstline|strip} \033[0;37m{author|person}, {date|age}\033[0m\n' - -changeset_quiet = '\033[0;33m{rev}\033[0m {desc|firstline|strip}\n' - -changeset_verbose = '\033[0;31m[{phase}]\033[0m \033[0;33m{rev}\033[0m:\033[0;33m{node|short}\033[0m{branches} {desc|firstline|strip} \033[1;30m({date|age} by {author|person}){bookmarks}\033[0m{tags}\n' - -start_branches = ' ' -branch = '\033[0;34m{branch}\033[0m' - -start_bookmarks = ' ' -bookmark = '\033[0;32m[{bookmark}]\033[0m ' -last_bookmark = '\033[0;32m[{bookmark}]\033[0m' - -start_tags = ' ' -tag = '\033[0;33m{tag}\033[0m, ' -last_tag = '\033[0;33m{tag}\033[0m' \ No newline at end of file diff --git a/install.sh b/install.sh deleted file mode 100755 index 0b112a58..00000000 --- a/install.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env bash - -_clone() { [ -d "$2" ] || git clone --recursive "$1" "$2"; } - -# In case this file was run via curl -_clone https://github.com/hlissner/dotfiles ~/.dotfiles -_clone https://github.com/hlissner/.vim ~/.vim -_clone https://github.com/tarjoilija/zgen ~/.zgen -_clone https://github.com/jimeh/tmuxifier ~/.tmuxifier - -if [ "$(name)" == "Darwin" ]; then - _clone https://github.com/hlissner/.hammerspoon ~/.hammerspoon -fi - -shopt -s extglob -for rcfile in "${HOME}"/.dotfiles/!(.*|bin|scripts|*.md|LICENSE|install.sh) -do - filep="$HOME/."$(basename "$rcfile") - - [ "$1" == "--force" ] && rm -f "$filep" - [ -e "$filep" ] || ln -vs "$rcfile" "$filep" -done diff --git a/curlrc b/os/.curlrc similarity index 100% rename from curlrc rename to os/.curlrc diff --git a/inputrc b/os/.inputrc similarity index 100% rename from inputrc rename to os/.inputrc diff --git a/os/README.md b/os/README.md new file mode 100644 index 00000000..e69de29b diff --git a/os/arch/.Xresources b/os/arch/.Xresources new file mode 100644 index 00000000..e009c991 --- /dev/null +++ b/os/arch/.Xresources @@ -0,0 +1,67 @@ +Xft.dpi: 72 +Xft.autohint: 0 +Xft.lcdfilter: lcddefault +Xft.hintstyle: hintfull +Xft.hinting: 1 +Xft.antialias: 1 +Xft.rgba: rgb + +! urxvt +urxvt*buffered: true +urxvt*cursorBlink: true +urxvt*underlineColor: yellow +urxvt*font: xft:terminus:size=9:antialias=false +urxvt*depth: 32 +urxvt*borderless: 1 +urxvt*scrollBar: false +urxvt*loginShell: true +urxvt*secondaryScroll: true +urxvt*saveLines: 5000 +urxvt.termName: rxvt-256color +urxvt.perl-ext-common: default,matcher +urxvt.urlLauncher: firefox +urxvt.matcher.button: 1 +urxvt.background: #22252c +urxvt.foreground: #bbc2cf + +! rofi +rofi.font: Terminus 9 +rofi.location: 1 +rofi.levenshtein-sort: 1 +rofi.width: 250 +rofi.lines: 10 +rofi.hide-scrollbar: true +rofi.bw: 0 + +! bg border +rofi.color-window: #22252c, #444449 +! bg fg bgalt hlbg hlfg +rofi.color-normal: #22252c, #bbc2cf, #262930, #444449, #bbc2cf +rofi.color-urgent: #22252c, #bb828f, #262930, #744449, #dbe2ef +rofi.color-active: #22252c, #bbc2cf, #262930, #444449, #dbe2ef + +! Colors +! dark0 + gray +*color0: #282828 +*color8: #928374 +! neutral_red + bright_red +*color1: #cc241d +*color9: #fb4934 +! neutral_green + bright_green +*color2: #98971a +*color10: #b8bb26 +! neutral_yellow + bright_yellow +*color3: #d79921 +*color11: #fabd2f +! neutral_blue + bright_blue +*color4: #458588 +*color12: #83a598 +! neutral_purple + bright_purple +*color5: #b16286 +*color13: #d3869b +! neutral_aqua + faded_aqua +*color6: #689d6a +*color14: #8ec07c +! light4 + light1 +*color7: #a89984 +*color15: #ebdbb2 diff --git a/os/arch/.config/bspwm/bspwmrc b/os/arch/.config/bspwm/bspwmrc new file mode 100755 index 00000000..0e035e88 --- /dev/null +++ b/os/arch/.config/bspwm/bspwmrc @@ -0,0 +1,72 @@ +#! /bin/sh + +running() { pgrep "$1" >/dev/null; } + + +bspc config border_width 4 +bspc config window_gap 14 +bspc config bottom_padding 2 +bspc config left_padding 4 +bspc config right_padding 4 +running panel || bspc config top_padding 2 + +bspc config split_ratio 0.50 +bspc config borderless_monocle true +bspc config gapless_monocle true +bspc config paddingless_monocle true +bspc config focus_by_distance true +bspc config history_aware_focus true + + +# +# Appearance +# + +bspc config normal_frame_opacity 0.0 +bspc config focused_frame_opacity 0.1 +bspc config normal_border_color "#22252c" +bspc config active_border_color "#1C1E20" +bspc config focused_border_color "#44474e" + + +# +# Displays +# + +i=1 +for monitor in $(bspc query -M); do + bspc monitor $monitor -n "$i" -d $1/{desktop,code,web,file,chat,art,misc,music} + let i++ +done +NMON=$i +unset i + + +# +# Rules +# + +bspc rule -a Gimp floating=on follow=on +bspc rule -a mplayer2 state=floating +bspc rule -a Kupfer.py focus=on +bspc rule -a Screenkey manage=off +bspc rule -a scratchpad sticky=on floating=on +bspc rule -a Emacs split_ratio=0.25 +bspc rule -a Firefox split_ratio=0.30 + + +# +# +# + +# wallpaper +feh --bg-scale $HOME/pictures/wallpaper + +# window manager helpers +running sxhkd || sxhkd & +running compton || compton & +# bar +running panel.sh || { cd ~/.config/panel && ./panel.sh & } + +# bittorrent sync +running rslsync || { cd $HOME && /usr/local/bin/rslsync; } diff --git a/os/arch/.config/compton.conf b/os/arch/.config/compton.conf new file mode 100644 index 00000000..f9b35dfd --- /dev/null +++ b/os/arch/.config/compton.conf @@ -0,0 +1,47 @@ +backend = "glx"; +paint-on-overlay = true; +glx-no-stencil = true; +glx-no-rebind-pixmap = true; +#vsync = "opengl-swc"; + +# Shadow +shadow = false; +no-dock-shadow = true; +no-dnd-shadow = true; +clear-shadow = true; +shadow-radius = 4; +shadow-offset-x = -4; +shadow-offset-y = -4; +shadow-opacity = 0.25; +# shadow-red +# shadow-green +# shadow-blue +shadow-exclude = [ "n:e:Notification" ]; + +# Opacity +menu-opacity = 0.95; +inactive-opacity = 0.96; +# frame-opacity = 0.8; +inactive-opacity-override = true; +opacity-rule = [ "35:class_g = 'Bspwm' && class_i = 'presel_feedback'" ]; + +# Fading +fading = true; +# fade-delta = 30; +fade-in-step = 0.06; +fade-out-step = 0.06; +# no-fading-openclose = true; + +# Other +#inactive-dim = 0.2; +mark-wmwin-focused = true; +mark-ovredir-focused = true; +detect-rounded-corners = true; + +# Window type settings +wintypes: +{ + tooltip = { fade = true; shadow = false; opacity = 0.85; }; +}; + + diff --git a/os/arch/.config/gtk-3.0/gtk.css b/os/arch/.config/gtk-3.0/gtk.css new file mode 100644 index 00000000..893a8447 --- /dev/null +++ b/os/arch/.config/gtk-3.0/gtk.css @@ -0,0 +1,11 @@ +.window-frame, .window-frame:backdrop { + box-shadow: 0 0 0 black; + border-style: none; + margin: 0; + border-radius: 0; +} + +.titlebar { + border-radius: 0; +} + diff --git a/os/arch/.config/panel/lemons/bluetooth.sh b/os/arch/.config/panel/lemons/bluetooth.sh new file mode 100755 index 00000000..e69de29b diff --git a/os/arch/.config/panel/lemons/gmail.sh b/os/arch/.config/panel/lemons/gmail.sh new file mode 100755 index 00000000..e69de29b diff --git a/os/arch/.config/panel/lemons/music.sh b/os/arch/.config/panel/lemons/music.sh new file mode 100755 index 00000000..e69de29b diff --git a/os/arch/.config/panel/lemons/updates.sh b/os/arch/.config/panel/lemons/updates.sh new file mode 100755 index 00000000..929abec1 --- /dev/null +++ b/os/arch/.config/panel/lemons/updates.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +while : +do + echo "U"$(checkupdates | wc -l) + sleep 3600 +done > "$PANEL_FIFO" & diff --git a/os/arch/.config/panel/lemons/volume.sh b/os/arch/.config/panel/lemons/volume.sh new file mode 100755 index 00000000..6f4f4be4 --- /dev/null +++ b/os/arch/.config/panel/lemons/volume.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +# volume messages will be sent when volume is changed +echo "V$(amixer get Master | sed -n 's/^.*\[\([0-9]\+\)%.*$/\1/p' | uniq)" > "$PANEL_FIFO" & + +# while : +# do +# echo "V$(amixer get Master | sed -n 's/^.*\[\([0-9]\+\)%.*$/\1/p' | uniq)" +# sleep 1 +# done > "$PANEL_FIFO" & diff --git a/os/arch/.config/panel/lemons/wifi.sh b/os/arch/.config/panel/lemons/wifi.sh new file mode 100755 index 00000000..2e23aa46 --- /dev/null +++ b/os/arch/.config/panel/lemons/wifi.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +while : +do + echo "I"$(awk 'NR==3 {print $3}' /proc/net/wireless) + sleep 5 +done > "$PANEL_FIFO" & diff --git a/os/arch/.config/panel/panel.sh b/os/arch/.config/panel/panel.sh new file mode 100755 index 00000000..ad4d70ca --- /dev/null +++ b/os/arch/.config/panel/panel.sh @@ -0,0 +1,41 @@ +#!/usr/bin/env dash + +# Quit if already running +if [ $(pgrep -cx "$(basename $0)") -gt 1 ] +then + echo "Lemonbar already running" + exit 1 +fi + +PWD=$(dirname $0) + +. $PWD/scripts/config.sh + +trap 'trap - TERM; kill 0' INT TERM QUIT EXIT + +# Bootstrap +[ -e "$PANEL_FIFO" ] && rm "$PANEL_FIFO" +mkfifo "$PANEL_FIFO" + +# +bspc config top_padding "$PANEL_HEIGHT" +bspc subscribe report > "$PANEL_FIFO" & +clock -sf 'T%A, %b %d::%I:%M %p' > "$PANEL_FIFO" & + +for comp in $PWD/lemons/*.sh +do + echo "INIT: $(basename $comp)" + . "$comp" +done + +$PWD/scripts/parse.sh < "$PANEL_FIFO" | \ + lemonbar \ + -a 32 \ + -g x$PANEL_HEIGHT \ + -f "$PANEL_FONT" \ + -f "$ICON_FONT" \ + -F "$COLOR_DEFAULT_FG" \ + -B "$COLOR_DEFAULT_BG" \ + | sh & + +wait diff --git a/os/arch/.config/panel/scripts/config.sh b/os/arch/.config/panel/scripts/config.sh new file mode 100755 index 00000000..3d7218e2 --- /dev/null +++ b/os/arch/.config/panel/scripts/config.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +PANEL_HEIGHT=24 +PANEL_FIFO=/tmp/panel-fifo +PANEL_FONT="gohufont:size=11:antialias=false" +ICON_FONT="siji:size=9:antialias=false" + +# Colors +FG="#bbc2cf" # 1a6582 +BG="#e022252c" +HIGHLIGHT="#00185b75" + +COLOR_DEFAULT_FG=$FG +COLOR_DEFAULT_BG=$BG +COLOR_MONITOR_FG="#8dbcdf" +COLOR_MONITOR_BG=$BG +COLOR_FOCUSED_MONITOR_FG="#b1d0e8" +COLOR_FOCUSED_MONITOR_BG=$BG +COLOR_FREE_FG="#155872" +COLOR_FREE_BG=$BG +COLOR_FOCUSED_FREE_FG="#000000" +COLOR_FOCUSED_FREE_BG=$HIGHLIGHT +COLOR_OCCUPIED_FG="#a7a5a5" +COLOR_OCCUPIED_BG=$BG +COLOR_FOCUSED_OCCUPIED_FG="#d6d3d2" +COLOR_FOCUSED_OCCUPIED_BG=$HIGHLIGHT +COLOR_URGENT_FG="#f15d66" +COLOR_URGENT_BG=$BG +COLOR_FOCUSED_URGENT_FG="#501d1f" +COLOR_FOCUSED_URGENT_BG="#d5443e" +COLOR_STATE_FG="#89b09c" +COLOR_STATE_BG=$BG diff --git a/os/arch/.config/panel/scripts/parse.sh b/os/arch/.config/panel/scripts/parse.sh new file mode 100755 index 00000000..a3c07bb8 --- /dev/null +++ b/os/arch/.config/panel/scripts/parse.sh @@ -0,0 +1,121 @@ +#!/usr/bin/env bash + +. $(dirname $0)/config.sh + +num_mon=$(bspc query -M | wc -l) + +declare -A ICONS +ICONS[desktop]='\ue1d7' +ICONS[code]='\ue1ec' +ICONS[art]='\ue1c7' +ICONS[web]='\ue26d' +ICONS[chat]='\ue19f' +ICONS[file]='\ue1e1' +ICONS[music]='\ue1a6' +ICONS[misc]='\ue140' + +while read -r line +do + data="${line#?}" + case $line in + E*) # TODO ethernet + ;; + T*) # clock output + date=" \ue267 ${data%::*} " + clock=" \ue016 ${data#*::} " + ;; + I*) # wifi + if [[ $data ]] + then + signal="\ue25d" + case "$data" in + 100|[6-9][0-9]*) signal="\ue261" ;; + [4-5][0-9]*) signal="\ue260" ;; + [2-3][0-9]*) signal="\ue25f" ;; + *) signal="\ue25e" ;; + esac + wifi=" $signal $(iwgetid -r) " + else + wifi=" %{F$COLOR_FREE_FG}\ue21a%{F-} " + fi + ;; + M*) # TODO mail + mail=" \ue1a8 2 " + ;; + S*) # TODO current song + playing=" \ue1a6 ... " + ;; + B*) # TODO bluetooth + bt="\ue00b" + ;; + W*) # bspwm's state + wm="" + IFS=':' + set -- $data + while [[ $# > 0 ]] + do + id=$1 + name=${id#??} + case $id in + [mM]*) + [[ $num_mon < 2 ]] && shift && continue + case $id in + m*) # monitor + FG=$COLOR_MONITOR_FG + BG=$COLOR_MONITOR_BG + ;; + M*) # focused monitor + FG=$COLOR_FOCUSED_MONITOR_FG + BG=$COLOR_FOCUSED_MONITOR_BG + ;; + esac + wm="${wm}%{F${FG}}%{B${BG}}%{A:bspc monitor -f ${id}:} ${name} %{A}%{B-}%{F-}" + ;; + [fFoOuU]*) + case $id in + f*) # free desktop + FG=$COLOR_FREE_FG + BG=$COLOR_FREE_BG + ;; + F*) # focused free desktop + FG=$COLOR_FOCUSED_FREE_FG + BG=$COLOR_FOCUSED_FREE_BG + ;; + o*) # occupied desktop + FG=$COLOR_OCCUPIED_FG + BG=$COLOR_OCCUPIED_BG + ;; + O*) # focused occupied desktop + FG=$COLOR_FOCUSED_OCCUPIED_FG + BG=$COLOR_FOCUSED_OCCUPIED_BG + ;; + u*) # urgent desktop + FG=$COLOR_URGENT_FG + BG=$COLOR_URGENT_BG + ;; + U*) # focused urgent desktop + FG=$COLOR_FOCUSED_URGENT_FG + BG=$COLOR_FOCUSED_URGENT_BG + ;; + esac + wm="${wm}%{F${FG}}%{B${BG}}%{A:bspc desktop -f ${id#?}:} ${name} %{A}%{B-}%{F-}" + ;; + esac + shift + done + ;; + U*) # updates + updates=" \ue00f $data updates " + ;; + V*) # volume + case "$data" in + 0|off) + vol="%{F$COLOR_FREE_FG}\ue202%{F-}" + ;; + *) vol="\ue203" + ;; + esac + ;; + esac + echo -e "%{l}${wm}${playing}%{r}${mail} ${wifi} ${date} ${clock} ${bt}${vol} " +done diff --git a/os/arch/.config/sxhkd/sxhkdrc b/os/arch/.config/sxhkd/sxhkdrc new file mode 100644 index 00000000..14c9d345 --- /dev/null +++ b/os/arch/.config/sxhkd/sxhkdrc @@ -0,0 +1,159 @@ +# +# wm independent hotkeys +# + +# terminal emulator +super + Return + urxvt + +# scratchpad +super + grave + xdotool search --onlyvisible --classname scratchpad windowunmap \ + || xdotool search --classname scratchpad windowmap \ + || termite --name scratchpad --class scratchpad --geometry 400x120 + +# program launcher +super + space + rofi -show run + +# make sxhkd reload its configuration files: +super + Escape + pkill -USR1 -x sxhkd + +# +# bspwm hotkeys +# + +# quit bspwm normally +super + alt + Escape + bspc quit + +# close and kill +super + {_,shift + }w + bspc node -{c,k} + +# alternate between the tiled and monocle layout +super + m + bspc desktop -l next + +# if the current node is automatic, send it to the last manual, otherwise pull the last leaf +super + y + bspc query -N -n focused.automatic && bspc node -n last.!automatic || bspc node last.leaf -n focused + +# swap the current node and the biggest node +super + g + bspc node -s biggest + +# +# state/flags +# + +# set the window state +super + {t,shift + t,s,f} + bspc node -t {tiled,pseudo_tiled,floating,fullscreen} + +# set the node flags +super + ctrl + {x,y,z} + bspc node -g {locked,sticky,private} + +# +# focus/swap +# + +# focus the node in the given direction +super + {_,shift + }{h,j,k,l} + bspc node -{f,s} {west,south,north,east} + +# focus the node for the given path jump +super + {p,b,comma,period} + bspc node -f @{parent,brother,first,second} + +# focus the next/previous node +super + {_,shift + }c + bspc node -f {next,prev} + +# focus the next/previous desktop +super + bracket{left,right} + bspc desktop -f {prev,next} + +# focus the last node/desktop +super + Tab + bspc node -f last + +# focus the older or newer node in the focus history +super + {o,i} + bspc wm -h off; \ + bspc node {older,newer} -f; \ + bspc wm -h on + +# focus or send to the given desktop +super + {_,shift + }{1-9,0} + bspc {desktop -f,node -d} '^{1-9,10}' + +# +# preselect +# + +# preselect the direction +super + ctrl + {h,j,k,l} + bspc node -p {west,south,north,east} + +# preselect the ratio +super + ctrl + {1-9} + bspc node -o 0.{1-9} + +# cancel the preselection for the focused node +super + ctrl + space + bspc node -p cancel + +# cancel the preselection for the focused desktop +super + ctrl + shift + space + bspc query -N -d | xargs -I id -n 1 bspc node id -p cancel + +# +# resize tiled/floating +# + +# expand the tiled space in the given direction +super + alt + {h,j,k,l} + bspc node {@west -r -10,@south -r +10,@north -r -10,@east -r +10} + +# contract the tiled space in the given direction +super + alt + shift + {h,j,k,l} + bspc node {@east -r -10,@north -r +10,@south -r -10,@west -r +10} + +# move a floating window +super + {Left,Down,Up,Right} + xdo move {-x -20,-y +20,-y -20,-x +20} + +# +# pointer focus/move/resize +# + +# focus +~button1 + bspc pointer -g focus + +# start move/resize +super + button{1-3} + bspc pointer -g {move,resize_side,resize_corner} + +# end move/resize +super + @button{1-3} + bspc pointer -u + +# +# Volume +# + +super + shift + {Down,Up} + amixer set Master 5%{-,+}; \ + echo "V$(amixer get Master | sed -n 's/^.*\[\([0-9]\+\)%.*$/\1/p' | uniq)" > /tmp/panel-fifo + +super + ctrl + shift + Up + amixer set Master unmute; \ + echo "V$(amixer get Master | sed -n 's/^.*\[\([0-9]\+\)%.*$/\1/p' | uniq)" > /tmp/panel-fifo + +super + ctrl + shift + Down + amixer set Master mute; \ + echo "V0" > /tmp/panel-fifo diff --git a/os/arch/.config/termite/config b/os/arch/.config/termite/config new file mode 100644 index 00000000..99ab33ff --- /dev/null +++ b/os/arch/.config/termite/config @@ -0,0 +1,32 @@ +[colors] +foreground = #839496 +foreground_bold = #eee8d5 +#foreground_dim = #888888 +# background = #22252c +background = rgba(34, 37, 44, 0.95) +cursor = #93a1a1 + +# if unset, will reverse foreground and background +#highlight = #839496 + +# colors from color0 to color254 can be set +color0 = #073642 +color1 = #dc322f +color2 = #859900 +color3 = #b58900 +color4 = #268bd2 +color5 = #d33682 +color6 = #2aa198 +color7 = #eee8d5 +color8 = #002b36 +color9 = #cb4b16 +color10 = #586e75 +color11 = #657b83 +color12 = #839496 +color13 = #6c71c4 +color14 = #93a1a1 +color15 = #fdf6e3 + +[options] +font = FontAwesome 12 +font = Terminus 12 diff --git a/os/arch/.ncmpcpp/bindings b/os/arch/.ncmpcpp/bindings new file mode 100644 index 00000000..c974797b --- /dev/null +++ b/os/arch/.ncmpcpp/bindings @@ -0,0 +1,389 @@ +#def_key "mouse" +# mouse_event +# +#def_key "up" +# scroll_up +# +#def_key "shift-up" +# select_item +# scroll_up +# +#def_key "down" +# scroll_down +# +#def_key "shift-down" +# select_item +# scroll_down +# +#def_key "[" +# scroll_up_album +# +#def_key "]" +# scroll_down_album +# +#def_key "{" +# scroll_up_artist +# +#def_key "}" +# scroll_down_artist +# +#def_key "page_up" +# page_up +# +#def_key "page_down" +# page_down +# +#def_key "home" +# move_home +# +#def_key "end" +# move_end +# +#def_key "insert" +# select_item +# +#def_key "enter" +# enter_directory +# +#def_key "enter" +# toggle_output +# +#def_key "enter" +# run_action +# +#def_key "enter" +# play_item +# +#def_key "space" +# add_item_to_playlist +# +#def_key "space" +# toggle_lyrics_update_on_song_change +# +#def_key "space" +# toggle_visualization_type +# +#def_key "delete" +# delete_playlist_items +# +#def_key "delete" +# delete_browser_items +# +#def_key "delete" +# delete_stored_playlist +# +#def_key "right" +# next_column +# +#def_key "right" +# slave_screen +# +#def_key "right" +# volume_up +# +#def_key "+" +# volume_up +# +#def_key "left" +# previous_column +# +#def_key "left" +# master_screen +# +#def_key "left" +# volume_down +# +#def_key "-" +# volume_down +# +#def_key ":" +# execute_command +# +#def_key "tab" +# next_screen +# +#def_key "shift-tab" +# previous_screen +# +#def_key "f1" +# show_help +# +#def_key "1" +# show_playlist +# +#def_key "2" +# show_browser +# +#def_key "2" +# change_browse_mode +# +#def_key "3" +# show_search_engine +# +#def_key "3" +# reset_search_engine +# +#def_key "4" +# show_media_library +# +#def_key "4" +# toggle_media_library_columns_mode +# +#def_key "5" +# show_playlist_editor +# +#def_key "6" +# show_tag_editor +# +#def_key "7" +# show_outputs +# +#def_key "8" +# show_visualizer +# +#def_key "=" +# show_clock +# +#def_key "@" +# show_server_info +# +#def_key "s" +# stop +# +#def_key "p" +# pause +# +#def_key ">" +# next +# +#def_key "<" +# previous +# +#def_key "ctrl-h" +# jump_to_parent_directory +# +#def_key "ctrl-h" +# replay_song +# +#def_key "backspace" +# jump_to_parent_directory +# +#def_key "backspace" +# replay_song +# +#def_key "f" +# seek_forward +# +#def_key "b" +# seek_backward +# +#def_key "r" +# toggle_repeat +# +#def_key "z" +# toggle_random +# +#def_key "y" +# save_tag_changes +# +#def_key "y" +# start_searching +# +#def_key "y" +# toggle_single +# +#def_key "R" +# toggle_consume +# +#def_key "Y" +# toggle_replay_gain_mode +# +#def_key "T" +# toggle_add_mode +# +#def_key "|" +# toggle_mouse +# +#def_key "#" +# toggle_bitrate_visibility +# +#def_key "Z" +# shuffle +# +#def_key "x" +# toggle_crossfade +# +#def_key "X" +# set_crossfade +# +#def_key "u" +# update_database +# +#def_key "ctrl-s" +# sort_playlist +# +#def_key "ctrl-s" +# toggle_browser_sort_mode +# +#def_key "ctrl-s" +# toggle_media_library_sort_mode +# +#def_key "ctrl-r" +# reverse_playlist +# +#def_key "ctrl-_" +# select_found_items +# +#def_key "/" +# find +# +#def_key "/" +# find_item_forward +# +#def_key "?" +# find +# +#def_key "?" +# find_item_backward +# +#def_key "." +# next_found_item +# +#def_key "," +# previous_found_item +# +#def_key "w" +# toggle_find_mode +# +#def_key "e" +# edit_song +# +#def_key "e" +# edit_library_tag +# +#def_key "e" +# edit_library_album +# +#def_key "e" +# edit_directory_name +# +#def_key "e" +# edit_playlist_name +# +#def_key "e" +# edit_lyrics +# +#def_key "i" +# show_song_info +# +#def_key "I" +# show_artist_info +# +#def_key "g" +# jump_to_position_in_song +# +#def_key "l" +# show_lyrics +# +#def_key "ctrl-v" +# select_range +# +#def_key "v" +# reverse_selection +# +#def_key "V" +# remove_selection +# +#def_key "B" +# select_album +# +#def_key "a" +# add_selected_items +# +#def_key "c" +# clear_playlist +# +#def_key "c" +# clear_main_playlist +# +#def_key "C" +# crop_playlist +# +#def_key "C" +# crop_main_playlist +# +#def_key "m" +# move_sort_order_up +# +#def_key "m" +# move_selected_items_up +# +#def_key "m" +# set_visualizer_sample_multiplier +# +#def_key "n" +# move_sort_order_down +# +#def_key "n" +# move_selected_items_down +# +#def_key "M" +# move_selected_items_to +# +#def_key "A" +# add +# +#def_key "S" +# save_playlist +# +#def_key "o" +# jump_to_playing_song +# +#def_key "G" +# jump_to_browser +# +#def_key "G" +# jump_to_playlist_editor +# +#def_key "~" +# jump_to_media_library +# +#def_key "E" +# jump_to_tag_editor +# +#def_key "U" +# toggle_playing_song_centering +# +#def_key "P" +# toggle_display_mode +# +#def_key "\\" +# toggle_interface +# +#def_key "!" +# toggle_separators_between_albums +# +#def_key "L" +# toggle_lyrics_fetcher +# +#def_key "F" +# toggle_fetching_lyrics_in_background +# +#def_key "ctrl-l" +# toggle_screen_lock +# +#def_key "`" +# toggle_library_tag_type +# +#def_key "`" +# refetch_lyrics +# +#def_key "`" +# add_random_items +# +#def_key "ctrl-p" +# set_selected_items_priority +# +#def_key "q" +# quit +# diff --git a/os/arch/.ncmpcpp/config b/os/arch/.ncmpcpp/config new file mode 100644 index 00000000..2385e4e7 --- /dev/null +++ b/os/arch/.ncmpcpp/config @@ -0,0 +1,481 @@ +##### directories ###### +ncmpcpp_directory = ~/.ncmpcpp + +## Directory for storing downloaded lyrics. +#lyrics_directory = ~/.lyrics + +##### connection settings ##### +#mpd_host = localhost +#mpd_port = 6600 +#mpd_connection_timeout = 5 + +## Needed for tag editor and file operations to work. +#mpd_music_dir = ~/music +#mpd_crossfade_time = 5 + +##### music visualizer ##### +## +## Note: In order to make music visualizer work you'll +## need to use mpd fifo output, whose format parameter +## has to be set to 44100:16:1 for mono visualization +## or 44100:16:2 for stereo visualization. Example +## configuration (it has to be put into mpd.conf): +## +## audio_output { +## type "fifo" +## name "Visualizer feed" +## path "/tmp/mpd.fifo" +## format "44100:16:2" +## } +## +#visualizer_fifo_path = /tmp/mpd.fifo + +## +## Note: Below parameter is needed for ncmpcpp +## to determine which output provides data for +## visualizer and thus allow syncing between +## visualization and sound as currently there +## are some problems with it. +## +#visualizer_output_name = Visualizer feed + +## +## If you set format to 44100:16:2, make it 'yes'. +## +#visualizer_in_stereo = yes + +## +## Multiply received samples by given value. Very +## useful for proper visualization of quiet music. +## +#visualizer_sample_multiplier = 1 + +## +## Note: Below parameter defines how often ncmpcpp +## has to "synchronize" visualizer and audio outputs. +## 30 seconds is optimal value, but if you experience +## synchronization problems, set it to lower value. +## Keep in mind that sane values start with >=10. +## +#visualizer_sync_interval = 30 + +## +## Note: To enable spectrum frequency visualization +## you need to compile ncmpcpp with fftw3 support. +## +# +## Available values: spectrum, wave, wave_filled, ellipse. +## +#visualizer_type = wave +# +#visualizer_look = ●▮ +# +#visualizer_color = blue, cyan, green, yellow, magenta, red +# +## Alternative subset of 256 colors for terminals that support it. +## +#visualizer_color = 41, 83, 119, 155, 185, 215, 209, 203, 197, 161 +# +##### system encoding ##### +## +## ncmpcpp should detect your charset encoding +## but if it failed to do so, you can specify +## charset encoding you are using here. +## +## Note: You can see whether your ncmpcpp build +## supports charset detection by checking output +## of `ncmpcpp --version`. +## +## Note: Since MPD uses UTF-8 by default, setting +## this option makes sense only if your encoding +## is different. +## +# +#system_encoding = "" +# +##### delays ##### +# +## Time of inactivity (in seconds) after playlist +## highlighting will be disabled (0 = always on). +## +#playlist_disable_highlight_delay = 5 +# +## Defines how long messages are supposed to be visible. +## +#message_delay_time = 5 +# +##### song format ##### +## +## For a song format you can use: +## +## %l - length +## %f - filename +## %D - directory +## %a - artist +## %A - album artist +## %t - title +## %b - album +## %y - date +## %n - track number (01/12 -> 01) +## %N - full track info (01/12 -> 01/12) +## %g - genre +## %c - composer +## %p - performer +## %d - disc +## %C - comment +## %P - priority +## $R - begin right alignment +## +## If you want to make sure that a part of the format is displayed +## only when certain tags are present, you can archieve it by +## grouping them with brackets, e.g. '{%a - %t}' will be evaluated +## to 'ARTIST - TITLE' if both tags are present or '' otherwise. +## It is also possible to define a list of alternatives by providing +## several groups and separating them with '|', e.g. '{%t}|{%f}' +## will be evaluated to 'TITLE' or 'FILENAME' if the former is not +## present. +## +## Note: If you want to set limit on maximal length of a tag, just +## put the appropriate number between % and character that defines +## tag type, e.g. to make album take max. 20 terminal cells, use '%20b'. +## +## In addition, formats support markers used for text attributes. +## They are followed by character '$'. After that you can put: +## +## - 0 - default window color (discards all other colors) +## - 1 - black +## - 2 - red +## - 3 - green +## - 4 - yellow +## - 5 - blue +## - 6 - magenta +## - 7 - cyan +## - 8 - white +## - 9 - end of current color +## - b - bold text +## - u - underline text +## - r - reverse colors +## - a - use alternative character set +## +## If you don't want to use a non-color attribute anymore, just put it +## again, but this time insert character '/' between '$' and attribute +## character, e.g. {$b%t$/b}|{$r%f$/r} will display bolded title tag +## or filename with reversed colors. +## +## If you want to use 256 colors and/or background colors in formats +## (the naming scheme is described below in section about color +## definitions), it can be done with the syntax $(COLOR), e.g. to set +## the artist tag to one of the non-standard colors and make it have +## yellow background, you need to write $(197_yellow)%a$(end). Note +## that for standard colors this is interchangable with attributes +## listed above. +## +## Note: colors can be nested. +## +# +#song_list_format = {%a - }{%t}|{$8%f$9}$R{$3(%l)$9} +# +#song_status_format = {{%a{ "%b"{ (%y)}} - }{%t}}|{%f} +# +#song_library_format = {%n - }{%t}|{%f} +# +# +#alternative_header_first_line_format = $b$1$aqqu$/a$9 {%t}|{%f} $1$atqq$/a$9$/b +# +#alternative_header_second_line_format = {{$4$b%a$/b$9}{ - $7%b$9}{ ($4%y$9)}}|{%D} +# +#now_playing_prefix = $b +# +#now_playing_suffix = $/b +# +#browser_playlist_prefix = "$2playlist$9 " +# +#selected_item_prefix = $6 +# +#selected_item_suffix = $9 +# +#modified_item_prefix = $3> $9 +# +## +## Note: attributes are not supported for the following variables. +## +#song_window_title_format = {%a - }{%t}|{%f} +## +## Note: Below variables are used for sorting songs in browser. +## The sort mode determines how songs are sorted, and can be used +## in combination with a sort format to specify a custom sorting format. +## Available values for browser_sort_mode are "name", "mtime", "format" +## and "noop". +## +# +#browser_sort_mode = name +# +#browser_sort_format = {%a - }{%t}|{%f} {(%l)} +# +##### columns settings ##### +## +## syntax of song columns list format is "column column etc." +## +## - syntax for each column is: +## +## (width of the column)[color of the column]{displayed tag} +## +## Note: Width is by default in %, if you want a column to +## have fixed size, add 'f' after the value, e.g. (10)[white]{a} +## will be the column that take 10% of screen (so the real width +## will depend on actual screen size), whereas (10f)[white]{a} +## will take 10 terminal cells, no matter how wide the screen is. +## +## - color is optional (if you want the default one, +## leave the field empty). +## +## Note: You can give a column additional attributes by putting appropriate +## character after displayed tag character. Available attributes are: +## +## - r - column will be right aligned +## - E - if tag is empty, empty tag marker won't be displayed +## +## You can also: +## +## - give a column custom name by putting it after attributes, +## separated with character ':', e.g. {lr:Length} gives you +## right aligned column of lengths named "Length". +## +## - define sequence of tags, that have to be displayed in case +## predecessor is empty in a way similar to the one in classic +## song format, i.e. using '|' character, e.g. {a|c|p:Owner} +## creates column named "Owner" that tries to display artist +## tag and then composer and performer if previous ones are +## not available. +## +# +#song_columns_list_format = (20)[]{a} (6f)[green]{NE} (50)[white]{t|f:Title} (20)[cyan]{b} (7f)[magenta]{l} +# +##### various settings ##### +# +## +## Note: Custom command that will be executed each +## time song changes. Useful for notifications etc. +## +#execute_on_song_change = "" +# +#playlist_show_mpd_host = no +# +#playlist_show_remaining_time = no +# +#playlist_shorten_total_times = no +# +#playlist_separate_albums = no +# +## +## Note: Possible display modes: classic, columns. +## +#playlist_display_mode = columns +# +#browser_display_mode = classic +# +#search_engine_display_mode = classic +# +#playlist_editor_display_mode = classic +# +#discard_colors_if_item_is_selected = yes +# +#incremental_seeking = yes +# +#seek_time = 1 +# +#volume_change_step = 2 +# +#autocenter_mode = no +# +#centered_cursor = no +# +## +## Note: You can specify third character which will +## be used to build 'empty' part of progressbar. +## +#progressbar_look = => +# +#progressbar_boldness = yes +# +## Available values: database, playlist. +## +#default_place_to_search_in = database +# +## Available values: classic, alternative. +## +#user_interface = classic +# +#data_fetching_delay = yes +# +## Available values: artist, album_artist, date, genre, composer, performer. +## +#media_library_primary_tag = artist +# +## Available values: wrapped, normal. +## +#default_find_mode = wrapped +# +#default_tag_editor_pattern = %n - %t +# +#header_visibility = yes +# +#statusbar_visibility = yes +# +#titles_visibility = yes +# +#header_text_scrolling = yes +# +#cyclic_scrolling = no +# +#lines_scrolled = 2 +# +#follow_now_playing_lyrics = no +# +#fetch_lyrics_for_current_song_in_background = no +# +#store_lyrics_in_song_dir = no +# +#generate_win32_compatible_filenames = yes +# +#allow_for_physical_item_deletion = no +# +## +## Note: If you set this variable, ncmpcpp will try to +## get info from last.fm in language you set and if it +## fails, it will fall back to english. Otherwise it will +## use english the first time. +## +## Note: Language has to be expressed as an ISO 639 alpha-2 code. +## +#lastfm_preferred_language = en +# +#show_hidden_files_in_local_browser = no +# +## +## How shall screen switcher work? +## +## - "previous" - switch between the current and previous screen. +## - "screen1,...,screenN" - switch between given sequence of screens. +## +## Screens available for use: help, playlist, browser, search_engine, +## media_library, playlist_editor, tag_editor, outputs, visualizer, clock. +## +#screen_switcher_mode = playlist, browser +# +## +## Note: You can define startup screen +## by choosing screen from the list above. +## +#startup_screen = playlist +# +## +## Note: You can define startup slave screen +## by choosing screen from the list above or +## an empty value for no slave screen. +## +#startup_slave_screen = "" +# +#startup_slave_screen_focus = no +# +## +## Default width of locked screen (in %). +## Acceptable values are from 20 to 80. +## +# +#locked_screen_width_part = 50 +# +#ask_for_locked_screen_width_part = yes +# +#jump_to_now_playing_song_at_start = yes +# +#ask_before_clearing_playlists = yes +# +#clock_display_seconds = no +# +#display_volume_level = yes +# +#display_bitrate = no +# +#display_remaining_time = no +# +## Available values: none, basic, extended, perl. +## +#regular_expressions = perl +# +## +## Note: If below is enabled, ncmpcpp will ignore leading +## "The" word while sorting items in browser, tags in +## media library, etc. +## +#ignore_leading_the = no +# +#block_search_constraints_change_if_items_found = yes +# +#mouse_support = yes +# +#mouse_list_scroll_whole_page = yes +# +#empty_tag_marker = +# +#tags_separator = " | " +# +#tag_editor_extended_numeration = no +# +#media_library_sort_by_mtime = no +# +#enable_window_title = yes +# +## +## Note: You can choose default search mode for search +## engine. Available modes are: +## +## - 1 - use mpd built-in searching (no regexes, pattern matching) +## - 2 - use ncmpcpp searching (pattern matching with support for regexes, +## but if your mpd is on a remote machine, downloading big database +## to process it can take a while +## - 3 - match only exact values (this mode uses mpd function for searching +## in database and local one for searching in current playlist) +## +search_engine_default_search_mode = 2 +external_editor = vim + +## Note: set to yes if external editor is a console application. +use_console_editor = yes + +##### colors definitions ##### +## +## It is possible to set a background color by setting a color +## value "_", e.g. red_black will set +## foregound color to red and background color to black. +## +## In addition, for terminals that support 256 colors it +## is possible to set one of them by using a number in range +## [1, 256] instead of color name, e.g. numerical value +## corresponding to red_black is 2_1. To find out if the +## terminal supports 256 colors, run ncmpcpp and check out +## the bottom of the help screen for list of available colors +## and their numerical values. +## +## Note: due to technical limitations of ncurses, if 256 colors +## are used, it is possible to either use only the colors with +## default background color, or all pairs from 1_1 up to 254_127, +## depending on the ncurses version used. +## +#colors_enabled = yes +#empty_tag_color = cyan +#header_window_color = default +#volume_color = default +#state_line_color = default +#state_flags_color = default +#main_window_color = yellow +#color1 = white +#color2 = green +#main_window_highlight_color = yellow +#progressbar_color = black +#progressbar_elapsed_color = green +#statusbar_color = default +#alternative_ui_separator_color = black +#active_column_color = red +#window_border_color = green +#active_window_border = red diff --git a/os/arch/.xprofile b/os/arch/.xprofile new file mode 100644 index 00000000..b19125b7 --- /dev/null +++ b/os/arch/.xprofile @@ -0,0 +1,8 @@ +sxhkd & +compton & + +# wallpaper +feh --bg-scale $HOME/pictures/wallpaper + +# Start bittorrent sync +pgrep rslsync >/dev/null || { cd $HOME && /usr/local/bin/rslsync; } diff --git a/os/arch/aliases.zsh b/os/arch/aliases.zsh new file mode 100644 index 00000000..ac3fcbc0 --- /dev/null +++ b/os/arch/aliases.zsh @@ -0,0 +1,14 @@ +alias ls="${aliases[ls]:-ls} --color=auto" + +alias open='xdg-open' + +alias pac='sudo pacman' +alias pacu='sudo pacman -Syu' + +if (( $+commands[xclip] )); then + alias y='xclip -selection clipboard -in' + alias p='xclip -selection clipboard -out' +elif (( $+commands[xsel] )); then + alias y='xsel --clipboard --input' + alias p='xsel --clipboard --output' +fi diff --git a/os/arch/install b/os/arch/install new file mode 100755 index 00000000..b80936fb --- /dev/null +++ b/os/arch/install @@ -0,0 +1,46 @@ +#!/bin/bash + +PWD=$(dirname $0) + +sudo pacman --noconfirm -S \ + wget curl make tmux rsync tree the_silver_searcher bc \ + wpa_supplicant wpa_actiond dhcpcd netctl dialog \ + xorg-init xorg-server xorg-xandr xorg-xrdb xorg-xmodmap xorg-fonts-75dpi xorg-xfd xdotool \ + lightdm bspwm sxhkd compton feh \ + rofi rxvt-unicode firefox mpd ncmpcpp \ + obs-studio youtube-dl + +install() { + local cmd="$1" + local repo="$2" + + local dest=$(basename -s .git "$repo") + command -v "$cmd" >/dev/null && return + TEMP=$(mktemp -d) + cd "$TEMP" + if [ ! -d "$dest" ] + then + git clone "$repo" "$dest" + pushd "$dest" + makepkg -sri --noconfirm + popd + fi + rm -rf "$TEMP" +} + +# Bar utilities +install lemonbar https://aur.archlinux.org/lemonbar-xft-git.git +install xtitle https://aur.archlinux.org/xtitle.git +install clock https://aur.archlinux.org/sutils-git.git +install xdo https://aur.archlinux.org/xdo-git.git +install siji https://aur.archlinux.org/siji-git.git + +# WM Greeter +if [ ! -d /usr/share/lightdm-webkit ] +then + install "" https://aur.archlinux.org/lightdm-webkit-greeter.git +fi + +# Utilities +install git-crypt https://aur.archlinux.org/git-crypt.git +install fasd https://aur.archlinux.org/fasd-git.git diff --git a/os/arch/update b/os/arch/update new file mode 100755 index 00000000..2a7c1bad --- /dev/null +++ b/os/arch/update @@ -0,0 +1,3 @@ +#!/bin/bash + +sudo pacman -Syu diff --git a/os/macos/aliases.zsh b/os/macos/aliases.zsh new file mode 100644 index 00000000..aa0d8f3d --- /dev/null +++ b/os/macos/aliases.zsh @@ -0,0 +1,16 @@ +alias ls='ls -G' +alias ls="${aliases[ls]:-ls} -G" + +alias date='gdate' + +alias y='pbcopy' +alias p='pbpaste' + +alias br='brew' +alias bru='brew update && brew upgrade --all && brew cleanup' +alias brc='brew cask' + +# OS X has no `md5sum`, so use `md5` as a fallback +is-callable md5sum || alias md5sum="md5" +# OS X has no `sha1sum`, so use `shasum` as a fallback +is-callable sha1sum || alias sha1sum="shasum" diff --git a/os/macos/install b/os/macos/install new file mode 100755 index 00000000..36f33b0b --- /dev/null +++ b/os/macos/install @@ -0,0 +1,10 @@ +#!/bin/bash + +# Install homebrew +if ! command -v brew; +then + ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" + + # Installing essentials + brew install wget curl make +fi diff --git a/os/macos/macos.zsh b/os/macos/macos.zsh new file mode 100644 index 00000000..e9cf5cd3 --- /dev/null +++ b/os/macos/macos.zsh @@ -0,0 +1,18 @@ +export BROWSER='open' + +# export CC=/usr/bin/clang +# export CXX=/usr/bin/clang++ +# export CXXFLAGS="-I/usr/local/include" +export C_INCLUDE_PATH="/usr/local/include" +export CPLUS_INCLUDE_PATH="/usr/local/include" +export LIBRARY_PATH="/usr/local/lib" +# export LDFLAGS="-L/usr/local/lib" + +if [[ "$OSTYPE" == darwin* ]]; then + [[ -x /usr/libexec/path_helper ]] && eval $(/usr/libexec/path_helper -s) +fi + +export LESS='-g -i -M -R -S -w -z-4' +if is-callable lesspipe; then + export LESSOPEN='| /usr/bin/env lesspipe %s 2>&-' +fi diff --git a/os/macos/update b/os/macos/update new file mode 100755 index 00000000..88012669 --- /dev/null +++ b/os/macos/update @@ -0,0 +1,11 @@ +#!/bin/bash + +if command -v brew; +then + brew update + brew upgrade --all + brew cleanup + brew prune +else + 2>&1 echo "homebrew wasn't found" +fi diff --git a/osx b/osx deleted file mode 100755 index 8ce02c9a..00000000 --- a/osx +++ /dev/null @@ -1,592 +0,0 @@ -#!/usr/bin/env bash - -# ~/.osx — https://mths.be/osx - -# Ask for the administrator password upfront -sudo -v - -# Keep-alive: update existing `sudo` time stamp until `.osx` has finished -while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null & - -############################################################################### -# General UI/UX # -############################################################################### - -# Set computer name (as done via System Preferences → Sharing) -#sudo scutil --set ComputerName "0x6D746873" -#sudo scutil --set HostName "0x6D746873" -#sudo scutil --set LocalHostName "0x6D746873" -#sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName -string "0x6D746873" - -# Set standby delay to 24 hours (default is 1 hour) -sudo pmset -a standbydelay 86400 - -# Disable the sound effects on boot -sudo nvram SystemAudioVolume=" " - -# Disable transparency in the menu bar and elsewhere on Yosemite -# defaults write com.apple.universalaccess reduceTransparency -bool true - -# Menu bar: hide the Time Machine, Volume, and User icons -# for domain in ~/Library/Preferences/ByHost/com.apple.systemuiserver.*; do -# defaults write "${domain}" dontAutoLoad -array \ -# "/System/Library/CoreServices/Menu Extras/TimeMachine.menu" \ -# "/System/Library/CoreServices/Menu Extras/Volume.menu" \ -# "/System/Library/CoreServices/Menu Extras/User.menu" -# done -# defaults write com.apple.systemuiserver menuExtras -array \ -# "/System/Library/CoreServices/Menu Extras/Bluetooth.menu" \ -# "/System/Library/CoreServices/Menu Extras/AirPort.menu" \ -# "/System/Library/CoreServices/Menu Extras/Battery.menu" \ -# "/System/Library/CoreServices/Menu Extras/Clock.menu" - -# Set highlight color to green -# defaults write NSGlobalDomain AppleHighlightColor -string "0.764700 0.976500 0.568600" - -# Set sidebar icon size to medium -# defaults write NSGlobalDomain NSTableViewDefaultSizeMode -int 2 - -# Always show scrollbars -# defaults write NSGlobalDomain AppleShowScrollBars -string "Always" -# Possible values: `WhenScrolling`, `Automatic` and `Always` - -# Disable the over-the-top focus ring animation -defaults write NSGlobalDomain NSUseAnimatedFocusRing -bool false - -# Disable smooth scrolling -# (Uncomment if you’re on an older Mac that messes up the animation) -#defaults write NSGlobalDomain NSScrollAnimationEnabled -bool false - -# Increase window resize speed for Cocoa applications -defaults write NSGlobalDomain NSWindowResizeTime -float 0.001 - -# Expand save panel by default -defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true -defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode2 -bool true - -# Expand print panel by default -defaults write NSGlobalDomain PMPrintingExpandedStateForPrint -bool true -defaults write NSGlobalDomain PMPrintingExpandedStateForPrint2 -bool true - -# Save to disk (not to iCloud) by default -defaults write NSGlobalDomain NSDocumentSaveNewDocumentsToCloud -bool false - -# Automatically quit printer app once the print jobs complete -defaults write com.apple.print.PrintingPrefs "Quit When Finished" -bool true - -# Disable the “Are you sure you want to open this application?” dialog -defaults write com.apple.LaunchServices LSQuarantine -bool false - -# Remove duplicates in the “Open With” menu (also see `lscleanup` alias) -/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user - -# Display ASCII control characters using caret notation in standard text views -# Try e.g. `cd /tmp; unidecode "\x{0000}" > cc.txt; open -e cc.txt` -defaults write NSGlobalDomain NSTextShowsControlCharacters -bool true - -# Disable Resume system-wide -defaults write com.apple.systempreferences NSQuitAlwaysKeepsWindows -bool false - -# Disable automatic termination of inactive apps -defaults write NSGlobalDomain NSDisableAutomaticTermination -bool true - -# Disable the crash reporter -#defaults write com.apple.CrashReporter DialogType -string "none" - -# Set Help Viewer windows to non-floating mode -defaults write com.apple.helpviewer DevMode -bool true - -# Fix for the ancient UTF-8 bug in QuickLook (https://mths.be/bbo) -# Commented out, as this is known to cause problems in various Adobe apps :( -# See https://github.com/mathiasbynens/dotfiles/issues/237 -#echo "0x08000100:0" > ~/.CFUserTextEncoding - -# Reveal IP address, hostname, OS version, etc. when clicking the clock -# in the login window -sudo defaults write /Library/Preferences/com.apple.loginwindow AdminHostInfo HostName - -# Restart automatically if the computer freezes -sudo systemsetup -setrestartfreeze on - -# Never go into computer sleep mode -sudo systemsetup -setcomputersleep Off > /dev/null - -# Check for software updates daily, not just once per week -defaults write com.apple.SoftwareUpdate ScheduleFrequency -int 1 - -# Disable Notification Center and remove the menu bar icon -# launchctl unload -w /System/Library/LaunchAgents/com.apple.notificationcenterui.plist 2> /dev/null - -# Disable smart quotes as they’re annoying when typing code -defaults write NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled -bool false - -# Disable smart dashes as they’re annoying when typing code -defaults write NSGlobalDomain NSAutomaticDashSubstitutionEnabled -bool false - -############################################################################### -# SSD-specific tweaks # -############################################################################### - -# Disable local Time Machine snapshots -sudo tmutil disablelocal - -# Disable hibernation (speeds up entering sleep mode) -sudo pmset -a hibernatemode 0 - -# Remove the sleep image file to save disk space -sudo rm /private/var/vm/sleepimage -# Create a zero-byte file instead… -sudo touch /private/var/vm/sleepimage -# …and make sure it can’t be rewritten -sudo chflags uchg /private/var/vm/sleepimage - -# Disable the sudden motion sensor as it’s not useful for SSDs -sudo pmset -a sms 0 - -############################################################################### -# Trackpad, mouse, keyboard, Bluetooth accessories, and input # -############################################################################### - -# Trackpad: enable tap to click for this user and for the login screen -defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -bool true -defaults -currentHost write NSGlobalDomain com.apple.mouse.tapBehavior -int 1 -defaults write NSGlobalDomain com.apple.mouse.tapBehavior -int 1 - -# Trackpad: map bottom right corner to right-click -defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadCornerSecondaryClick -int 2 -defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadRightClick -bool true -defaults -currentHost write NSGlobalDomain com.apple.trackpad.trackpadCornerClickBehavior -int 1 -defaults -currentHost write NSGlobalDomain com.apple.trackpad.enableSecondaryClick -bool true - -# Disable “natural” (Lion-style) scrolling -defaults write NSGlobalDomain com.apple.swipescrolldirection -bool false - -# Increase sound quality for Bluetooth headphones/headsets -defaults write com.apple.BluetoothAudioAgent "Apple Bitpool Min (editable)" -int 40 - -# Enable full keyboard access for all controls -# (e.g. enable Tab in modal dialogs) -defaults write NSGlobalDomain AppleKeyboardUIMode -int 3 - -# Use scroll gesture with the Ctrl (^) modifier key to zoom -defaults write com.apple.universalaccess closeViewScrollWheelToggle -bool true -defaults write com.apple.universalaccess HIDScrollZoomModifierMask -int 262144 -# Follow the keyboard focus while zoomed in -defaults write com.apple.universalaccess closeViewZoomFollowsFocus -bool true - -# Disable press-and-hold for keys in favor of key repeat -defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false - -# Set a blazingly fast keyboard repeat rate -defaults write NSGlobalDomain KeyRepeat -int 0 - -# Set language and text formats -# defaults write NSGlobalDomain AppleLanguages -array "en" "en" -defaults write NSGlobalDomain AppleLocale -string "en_US@currency=CAD" -defaults write NSGlobalDomain AppleMeasurementUnits -string "Centimeters" -defaults write NSGlobalDomain AppleMetricUnits -bool true - -# Set the timezone; see `sudo systemsetup -listtimezones` for other values -sudo systemsetup -settimezone "America/Toronto" > /dev/null - -# Disable auto-correct -defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false - -# Stop iTunes from responding to the keyboard media keys -#launchctl unload -w /System/Library/LaunchAgents/com.apple.rcd.plist 2> /dev/null - -############################################################################### -# Screen # -############################################################################### - -# Require password immediately after sleep or screen saver begins -# defaults write com.apple.screensaver askForPassword -int 1 -# defaults write com.apple.screensaver askForPasswordDelay -int 0 - -# Save screenshots to the desktop -defaults write com.apple.screencapture location -string "${HOME}/Desktop" - -# Save screenshots in PNG format (other options: BMP, GIF, JPG, PDF, TIFF) -defaults write com.apple.screencapture type -string "png" - -# Disable shadow in screenshots -defaults write com.apple.screencapture disable-shadow -bool true - -# Enable subpixel font rendering on non-Apple LCDs -defaults write NSGlobalDomain AppleFontSmoothing -int 2 - -# Enable HiDPI display modes (requires restart) -# sudo defaults write /Library/Preferences/com.apple.windowserver DisplayResolutionEnabled -bool true - -############################################################################### -# Finder # -############################################################################### - -# Finder: allow quitting via ⌘ + Q; doing so will also hide desktop icons -defaults write com.apple.finder QuitMenuItem -bool true - -# Finder: disable window animations and Get Info animations -defaults write com.apple.finder DisableAllAnimations -bool true - -# Set Desktop as the default location for new Finder windows -# For other paths, use `PfLo` and `file:///full/path/here/` -defaults write com.apple.finder NewWindowTarget -string "PfDe" -defaults write com.apple.finder NewWindowTargetPath -string "file://${HOME}/Desktop/" - -# Show icons for hard drives, servers, and removable media on the desktop -defaults write com.apple.finder ShowExternalHardDrivesOnDesktop -bool true -defaults write com.apple.finder ShowHardDrivesOnDesktop -bool true -defaults write com.apple.finder ShowMountedServersOnDesktop -bool true -defaults write com.apple.finder ShowRemovableMediaOnDesktop -bool true - -# Finder: show hidden files by default -#defaults write com.apple.finder AppleShowAllFiles -bool true - -# Finder: show all filename extensions -defaults write NSGlobalDomain AppleShowAllExtensions -bool true - -# Finder: show status bar -defaults write com.apple.finder ShowStatusBar -bool true - -# Finder: show path bar -defaults write com.apple.finder ShowPathbar -bool true - -# Display full POSIX path as Finder window title -defaults write com.apple.finder _FXShowPosixPathInTitle -bool true - -# When performing a search, search the current folder by default -defaults write com.apple.finder FXDefaultSearchScope -string "SCcf" - -# Disable the warning when changing a file extension -defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false - -# Enable spring loading for directories -defaults write NSGlobalDomain com.apple.springing.enabled -bool true - -# Remove the spring loading delay for directories -defaults write NSGlobalDomain com.apple.springing.delay -float 1 - -# Avoid creating .DS_Store files on network volumes -defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true - -# Disable disk image verification -defaults write com.apple.frameworks.diskimages skip-verify -bool true -defaults write com.apple.frameworks.diskimages skip-verify-locked -bool true -defaults write com.apple.frameworks.diskimages skip-verify-remote -bool true - -# Automatically open a new Finder window when a volume is mounted -defaults write com.apple.frameworks.diskimages auto-open-ro-root -bool true -defaults write com.apple.frameworks.diskimages auto-open-rw-root -bool true -defaults write com.apple.finder OpenWindowForNewRemovableDisk -bool true - -# Show item info near icons on the desktop and in other icon views -/usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:showItemInfo true" ~/Library/Preferences/com.apple.finder.plist -/usr/libexec/PlistBuddy -c "Set :FK_StandardViewSettings:IconViewSettings:showItemInfo true" ~/Library/Preferences/com.apple.finder.plist -/usr/libexec/PlistBuddy -c "Set :StandardViewSettings:IconViewSettings:showItemInfo true" ~/Library/Preferences/com.apple.finder.plist - -# Show item info to the right of the icons on the desktop -/usr/libexec/PlistBuddy -c "Set DesktopViewSettings:IconViewSettings:labelOnBottom false" ~/Library/Preferences/com.apple.finder.plist - -# Enable snap-to-grid for icons on the desktop and in other icon views -/usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist -/usr/libexec/PlistBuddy -c "Set :FK_StandardViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist -/usr/libexec/PlistBuddy -c "Set :StandardViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist - -# Increase grid spacing for icons on the desktop and in other icon views -/usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:gridSpacing 100" ~/Library/Preferences/com.apple.finder.plist -/usr/libexec/PlistBuddy -c "Set :FK_StandardViewSettings:IconViewSettings:gridSpacing 100" ~/Library/Preferences/com.apple.finder.plist -/usr/libexec/PlistBuddy -c "Set :StandardViewSettings:IconViewSettings:gridSpacing 100" ~/Library/Preferences/com.apple.finder.plist - -# Increase the size of icons on the desktop and in other icon views -/usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:iconSize 80" ~/Library/Preferences/com.apple.finder.plist -/usr/libexec/PlistBuddy -c "Set :FK_StandardViewSettings:IconViewSettings:iconSize 80" ~/Library/Preferences/com.apple.finder.plist -/usr/libexec/PlistBuddy -c "Set :StandardViewSettings:IconViewSettings:iconSize 80" ~/Library/Preferences/com.apple.finder.plist - -# Use column view in all Finder windows by default -# Four-letter codes for the other view modes: `icnv`, `clmv`, `Flwv` -defaults write com.apple.finder FXPreferredViewStyle -string "clmv" - -# Disable the warning before emptying the Trash -defaults write com.apple.finder WarnOnEmptyTrash -bool false - -# Enable AirDrop over Ethernet and on unsupported Macs running Lion -defaults write com.apple.NetworkBrowser BrowseAllInterfaces -bool true - -# Enable the MacBook Air SuperDrive on any Mac -# sudo nvram boot-args="mbasd=1" - -# Show the ~/Library folder -chflags nohidden ~/Library - -# Remove Dropbox’s green checkmark icons in Finder -# file=/Applications/Dropbox.app/Contents/Resources/emblem-dropbox-uptodate.icns -# [ -e "${file}" ] && mv -f "${file}" "${file}.bak" - -# Expand the following File Info panes: -# “General”, “Open with”, and “Sharing & Permissions” -defaults write com.apple.finder FXInfoPanesExpanded -dict \ - General -bool true \ - OpenWith -bool true \ - Privileges -bool true - -############################################################################### -# Dock, Dashboard, and hot corners # -############################################################################### - -# Enable highlight hover effect for the grid view of a stack (Dock) -defaults write com.apple.dock mouse-over-hilite-stack -bool true - -# Set the icon size of Dock items to 36 pixels -defaults write com.apple.dock tilesize -int 36 - -# Change minimize/maximize window effect -# defaults write com.apple.dock mineffect -string "scale" - -# Minimize windows into their application’s icon -defaults write com.apple.dock minimize-to-application -bool true - -# Enable spring loading for all Dock items -defaults write com.apple.dock enable-spring-load-actions-on-all-items -bool true - -# Show indicator lights for open applications in the Dock -defaults write com.apple.dock show-process-indicators -bool true - -# Wipe all (default) app icons from the Dock -# This is only really useful when setting up a new Mac, or if you don’t use -# the Dock to launch apps. -#defaults write com.apple.dock persistent-apps -array - -# Show only open applications in the Dock -#defaults write com.apple.dock static-only -bool true - -# Don’t animate opening applications from the Dock -defaults write com.apple.dock launchanim -bool false - -# Speed up Mission Control animations -defaults write com.apple.dock expose-animation-duration -float 0.1 - -# Don’t group windows by application in Mission Control -# (i.e. use the old Exposé behavior instead) -defaults write com.apple.dock expose-group-by-app -bool false - -# Disable Dashboard -defaults write com.apple.dashboard mcx-disabled -bool true - -# Don’t show Dashboard as a Space -defaults write com.apple.dock dashboard-in-overlay -bool true - -# Don’t automatically rearrange Spaces based on most recent use -defaults write com.apple.dock mru-spaces -bool false - -# Remove the auto-hiding Dock delay -defaults write com.apple.dock autohide-delay -float 0 - -# Remove the animation when hiding/showing the Dock -# defaults write com.apple.dock autohide-time-modifier -float 0 - -# Automatically hide and show the Dock -defaults write com.apple.dock autohide -bool true - -# Make Dock icons of hidden applications translucent -defaults write com.apple.dock showhidden -bool true - -############################################################################### -# Safari & WebKit # -############################################################################### - -# Privacy: don’t send search queries to Apple -defaults write com.apple.Safari UniversalSearchEnabled -bool false -defaults write com.apple.Safari SuppressSearchSuggestions -bool true - -# Press Tab to highlight each item on a web page -defaults write com.apple.Safari WebKitTabToLinksPreferenceKey -bool true -defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2TabsToLinks -bool true - -# Show the full URL in the address bar (note: this still hides the scheme) -defaults write com.apple.Safari ShowFullURLInSmartSearchField -bool true - -# Set Safari’s home page to `about:blank` for faster loading -defaults write com.apple.Safari HomePage -string "about:blank" - -# Prevent Safari from opening ‘safe’ files automatically after downloading -defaults write com.apple.Safari AutoOpenSafeDownloads -bool false - -# Allow hitting the Backspace key to go to the previous page in history -defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2BackspaceKeyNavigationEnabled -bool true - -# Hide Safari’s bookmarks bar by default -defaults write com.apple.Safari ShowFavoritesBar -bool false - -# Hide Safari’s sidebar in Top Sites -defaults write com.apple.Safari ShowSidebarInTopSites -bool false - -# Disable Safari’s thumbnail cache for History and Top Sites -defaults write com.apple.Safari DebugSnapshotsUpdatePolicy -int 2 - -# Enable Safari’s debug menu -defaults write com.apple.Safari IncludeInternalDebugMenu -bool true - -# Make Safari’s search banners default to Contains instead of Starts With -defaults write com.apple.Safari FindOnPageMatchesWordStartsOnly -bool false - -# Remove useless icons from Safari’s bookmarks bar -defaults write com.apple.Safari ProxiesInBookmarksBar "()" - -# Enable the Develop menu and the Web Inspector in Safari -defaults write com.apple.Safari IncludeDevelopMenu -bool true -defaults write com.apple.Safari WebKitDeveloperExtrasEnabledPreferenceKey -bool true -defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2DeveloperExtrasEnabled -bool true - -# Add a context menu item for showing the Web Inspector in web views -defaults write NSGlobalDomain WebKitDeveloperExtras -bool true - -############################################################################### -# Spotlight # -############################################################################### - -# Hide Spotlight tray-icon (and subsequent helper) -sudo chmod 600 /System/Library/CoreServices/Search.bundle/Contents/MacOS/Search - -# Disable Spotlight indexing for any volume that gets mounted and has not yet -# been indexed before. -# Use `sudo mdutil -i off "/Volumes/foo"` to stop indexing any volume. -sudo defaults write /.Spotlight-V100/VolumeConfiguration Exclusions -array "/Volumes" - -# Change indexing order and disable some search results -# Yosemite-specific search results (remove them if you are using OS X 10.9 or older): -# MENU_DEFINITION -# MENU_CONVERSION -# MENU_EXPRESSION -# MENU_SPOTLIGHT_SUGGESTIONS (send search queries to Apple) -# MENU_WEBSEARCH (send search queries to Apple) -# MENU_OTHER -defaults write com.apple.spotlight orderedItems -array \ - '{"enabled" = 1;"name" = "APPLICATIONS";}' \ - '{"enabled" = 1;"name" = "SYSTEM_PREFS";}' \ - '{"enabled" = 1;"name" = "DIRECTORIES";}' \ - '{"enabled" = 0;"name" = "PDF";}' \ - '{"enabled" = 0;"name" = "FONTS";}' \ - '{"enabled" = 0;"name" = "DOCUMENTS";}' \ - '{"enabled" = 0;"name" = "MESSAGES";}' \ - '{"enabled" = 0;"name" = "CONTACT";}' \ - '{"enabled" = 0;"name" = "EVENT_TODO";}' \ - '{"enabled" = 0;"name" = "IMAGES";}' \ - '{"enabled" = 0;"name" = "BOOKMARKS";}' \ - '{"enabled" = 0;"name" = "MUSIC";}' \ - '{"enabled" = 0;"name" = "MOVIES";}' \ - '{"enabled" = 0;"name" = "PRESENTATIONS";}' \ - '{"enabled" = 0;"name" = "SPREADSHEETS";}' \ - '{"enabled" = 0;"name" = "SOURCE";}' \ - '{"enabled" = 0;"name" = "MENU_DEFINITION";}' \ - '{"enabled" = 0;"name" = "MENU_OTHER";}' \ - '{"enabled" = 0;"name" = "MENU_CONVERSION";}' \ - '{"enabled" = 0;"name" = "MENU_EXPRESSION";}' \ - '{"enabled" = 0;"name" = "MENU_WEBSEARCH";}' \ - '{"enabled" = 0;"name" = "MENU_SPOTLIGHT_SUGGESTIONS";}' - -# Load new settings before rebuilding the index -killall mds > /dev/null 2>&1 - -# Make sure indexing is enabled for the main volume -sudo mdutil -i on / > /dev/null - -# Rebuild the index from scratch -sudo mdutil -E / > /dev/null - -############################################################################### -# iTerm 2 # -############################################################################### - -# Don’t display the annoying prompt when quitting iTerm -defaults write com.googlecode.iterm2 PromptOnQuit -bool false - -############################################################################### -# Time Machine # -############################################################################### - -# Prevent Time Machine from prompting to use new hard drives as backup volume -defaults write com.apple.TimeMachine DoNotOfferNewDisksForBackup -bool true - -# Disable local Time Machine backups -hash tmutil &> /dev/null && sudo tmutil disablelocal - -############################################################################### -# Activity Monitor # -############################################################################### - -# Show the main window when launching Activity Monitor -defaults write com.apple.ActivityMonitor OpenMainWindow -bool true - -# Visualize CPU usage in the Activity Monitor Dock icon -defaults write com.apple.ActivityMonitor IconType -int 5 - -# Show all processes in Activity Monitor -defaults write com.apple.ActivityMonitor ShowCategory -int 0 - -# Sort Activity Monitor results by CPU usage -defaults write com.apple.ActivityMonitor SortColumn -string "CPUUsage" -defaults write com.apple.ActivityMonitor SortDirection -int 0 - -############################################################################### -# Address Book, Dashboard, iCal, TextEdit, and Disk Utility # -############################################################################### - -# Use plain text mode for new TextEdit documents -defaults write com.apple.TextEdit RichText -int 0 -# Open and save files as UTF-8 in TextEdit -defaults write com.apple.TextEdit PlainTextEncoding -int 4 -defaults write com.apple.TextEdit PlainTextEncodingForWrite -int 4 - -# Enable the debug menu in Disk Utility -defaults write com.apple.DiskUtility DUDebugMenuEnabled -bool true -defaults write com.apple.DiskUtility advanced-image-options -bool true - -############################################################################### -# Google Chrome & Google Chrome Canary # -############################################################################### - -# Allow installing user scripts via GitHub Gist or Userscripts.org -defaults write com.google.Chrome ExtensionInstallSources -array "https://gist.githubusercontent.com/" "http://userscripts.org/*" -defaults write com.google.Chrome.canary ExtensionInstallSources -array "https://gist.githubusercontent.com/" "http://userscripts.org/*" - -# Use the system-native print preview dialog -defaults write com.google.Chrome DisablePrintPreview -bool true -defaults write com.google.Chrome.canary DisablePrintPreview -bool true - -# Expand the print dialog by default -defaults write com.google.Chrome PMPrintingExpandedStateForPrint2 -bool true -defaults write com.google.Chrome.canary PMPrintingExpandedStateForPrint2 -bool true - -############################################################################### -# Transmission.app # -############################################################################### - -# Don’t prompt for confirmation before downloading -defaults write org.m0k.transmission DownloadAsk -bool false - -# Trash original torrent files -defaults write org.m0k.transmission DeleteOriginalTorrent -bool true - -# Hide the donate message -defaults write org.m0k.transmission WarningDonate -bool false -# Hide the legal disclaimer -defaults write org.m0k.transmission WarningLegal -bool false - -############################################################################### -# Tweetbot.app # -############################################################################### - -# Bypass the annoyingly slow t.co URL shortener -defaults write com.tapbots.TweetbotMac OpenURLsDirectly -bool true - -############################################################################### -# Kill affected applications # -############################################################################### - -for app in "Activity Monitor" "Address Book" "Calendar" "Contacts" "cfprefsd" \ - "Dock" "Finder" "Google Chrome" "Google Chrome Canary" "Mail" "Messages" \ - "Opera" "Safari" "SizeUp" "Spectacle" "SystemUIServer" "Terminal" \ - "Transmission" "Tweetbot" "Twitter" "iCal"; do - killall "${app}" &> /dev/null -done -echo "Done. Note that some of these changes require a logout/restart to take effect." diff --git a/rcrc b/rcrc deleted file mode 100644 index 9e391928..00000000 --- a/rcrc +++ /dev/null @@ -1 +0,0 @@ -EXCLUDES="README.md LICENSE Brewfile custom" diff --git a/recipes/callisto b/recipes/callisto new file mode 100644 index 00000000..7219e2bc --- /dev/null +++ b/recipes/callisto @@ -0,0 +1,3 @@ +os/deb +editor/vim +shell/zsh diff --git a/recipes/europa b/recipes/europa new file mode 100644 index 00000000..bc7d7189 --- /dev/null +++ b/recipes/europa @@ -0,0 +1,5 @@ +os/macos +browser +editor/{emacs,neovim} +shell/zsh +vcs/* diff --git a/recipes/ganymede b/recipes/ganymede new file mode 100644 index 00000000..37da7587 --- /dev/null +++ b/recipes/ganymede @@ -0,0 +1,6 @@ +os/macos +browser +dev/* +editor/{emacs,neovim} +shell/zsh +vcs/* diff --git a/recipes/io b/recipes/io new file mode 100644 index 00000000..08c90339 --- /dev/null +++ b/recipes/io @@ -0,0 +1,7 @@ +os/arch +browser +docker +dev/* +editor/{emacs,neovim} +shell/zsh +vcs/* diff --git a/recipes/remote b/recipes/remote new file mode 100644 index 00000000..1f94b17b --- /dev/null +++ b/recipes/remote @@ -0,0 +1,3 @@ +os/deb +shell/bash +editor/vim diff --git a/recipes/thebe b/recipes/thebe new file mode 100644 index 00000000..41475da4 --- /dev/null +++ b/recipes/thebe @@ -0,0 +1,7 @@ +os/arch +vcs/* +shell/zsh +editor/emacs +editor/neovim +dev/* +browser diff --git a/shell/README.md b/shell/README.md new file mode 100644 index 00000000..e69de29b diff --git a/shell/aliases.sh b/shell/aliases.sh new file mode 100644 index 00000000..7c69861f --- /dev/null +++ b/shell/aliases.sh @@ -0,0 +1,14 @@ +alias q='exit' +alias clr='clear' +alias sudo='sudo ' + +alias ..='cd ..' +alias ...='cd ../..' +alias ....='cd ../../..' +alias -- -='cd -' + +alias ls="${aliases[ls]:-ls} --group-directories-first" +alias l='ls -l' +alias ll='ls -la' + +alias ln='ln -v' # verbose ln diff --git a/bash_profile b/shell/bash/.bash_profile similarity index 100% rename from bash_profile rename to shell/bash/.bash_profile diff --git a/bashrc b/shell/bash/.bashrc similarity index 100% rename from bashrc rename to shell/bash/.bashrc diff --git a/shell/bash/README.md b/shell/bash/README.md new file mode 100644 index 00000000..7eefae63 --- /dev/null +++ b/shell/bash/README.md @@ -0,0 +1,3 @@ +# Bash + +I use bash on remote debian/centOS systems where I can't install zsh. diff --git a/shell/bash/aliases.bash b/shell/bash/aliases.bash new file mode 100644 index 00000000..5f62a694 --- /dev/null +++ b/shell/bash/aliases.bash @@ -0,0 +1 @@ +source $DOTFILES/shell/aliases.sh diff --git a/bash/config b/shell/bash/config.bash similarity index 100% rename from bash/config rename to shell/bash/config.bash diff --git a/bash/prompt b/shell/bash/prompt.bash similarity index 100% rename from bash/prompt rename to shell/bash/prompt.bash diff --git a/shell/common.sh b/shell/common.sh new file mode 100644 index 00000000..a17722f4 --- /dev/null +++ b/shell/common.sh @@ -0,0 +1,45 @@ +#!/bin/bash + +CACHE_DIR="$DOTFILES/shell/zsh/cache" + +is-callable() { command -v "$1" >/dev/null; } +is-interactive() { [[ $- == *i* ]]; } +is-root() { [[ "$UID" -eq 0 ]]; } +is-ssh() { [[ "$SSH_CONNECTION" != '' ]]; } + +info() { printf "\r[ \033[00;34m..\033[0m ] $1\n"; } +success() { printf "\r\033[2K[ \033[00;32mOK\033[0m ] $1\n"; } +fail() { printf "\r\033[2K[\033[0;31mFAIL\033[0m] $1\n"; echo; exit; } + +load () { source "$DOTFILES/$*"; } + +loadall () { + for file in "$DOTFILES"/$1/*.zsh; + do + source "$file" + done +} + +cache() { + [ -z "$CACHE_DIR" ] && error "Cache not set!" + [ ! -d "$CACHE_DIR" ] && mkdir -p "$CACHE_DIR" + + is-callable "$1" || return 1 + local cache="${CACHE_DIR}/$1-$(basename $SHELL)" + if ! [[ -f "$cache" && -s "$cache" ]]; then + echo "Caching $1" + $@ > "$cache" 2> /dev/null + fi + source $cache +} + +cache-clear() { + [ -d "$CACHE_DIR" ] && rm -f "$CACHE_DIR/*" +} + +repo() { + if [ ! -d "$2" ]; + then + git clone "https://github.com/$1" "$2" + fi +} diff --git a/shell/fasd/fasd.zsh b/shell/fasd/fasd.zsh new file mode 100644 index 00000000..c7e194d8 --- /dev/null +++ b/shell/fasd/fasd.zsh @@ -0,0 +1 @@ +cache fasd --init posix-alias zsh-hook zsh-ccomp zsh-ccomp-install zsh-wcomp zsh-wcomp-install diff --git a/shell/fasd/install b/shell/fasd/install new file mode 100755 index 00000000..2662d7be --- /dev/null +++ b/shell/fasd/install @@ -0,0 +1,21 @@ +#!/bin/bash + +case "$OSTYPE" in + darwin*) + brew install fasd + ;; + linux*) + if [ -f /etc/arch-release ] + then + mkdir -p $HOME/build && cd $HOME/build + git clone https://aur.archlinux.org/fasd.git fasd + cd fasd + makepkg -sri + elif [ -f /etc/debian_version ]; + then + sudo add-apt-repository ppa:aacebedo/fasd + sudo apt update + sudo apt install fasd + fi + ;; +esac diff --git a/tmux.conf b/shell/tmux/.tmux.conf similarity index 94% rename from tmux.conf rename to shell/tmux/.tmux.conf index b1b26fc1..2f7874e5 100644 --- a/tmux.conf +++ b/shell/tmux/.tmux.conf @@ -123,11 +123,11 @@ set -g status-interval 30 set -g status-justify left set -g status-right-length 100 set -g status-left-length 80 -set -g status-left "#(~/.dotfiles/tmux/conf-status.sh left) " -set -g status-right "#(~/.dotfiles/tmux/conf-status.sh right) " +set -g status-left "#($DOTFILES/shell/tmux/scripts/conf-status.sh left) " +set -g status-right "#($DOTFILES/shell/tmux/scripts/conf-status.sh right) " set -g window-status-format " #I #W:#T " set -g window-status-current-format " › #W:#T " #### -run-shell "~/.dotfiles/tmux/prefix_highlight.tmux" +run-shell "$DOTFILES/shell/tmux/scripts/prefix_highlight.tmux" diff --git a/shell/tmux/aliases.zsh b/shell/tmux/aliases.zsh new file mode 100644 index 00000000..262985e0 --- /dev/null +++ b/shell/tmux/aliases.zsh @@ -0,0 +1,27 @@ +alias ta='tmux attach' +alias tl='tmux ls' + +if [ -n "$TMUX" ]; then + alias t='tmux' + alias tf='tmux find-window' + # Detach all other clients to this session + alias mine='tmux detach -a' + # Send command to other tmux window + tt() { tmux send-keys -t .+ C-u && tmux set-buffer "$*" && tmux paste-buffer -t .+ && tmux send-keys -t .+ Enter; } + # Create new session (from inside one) + tn() { + local name="${1:-`basename $PWD`}" + TMUX= tmux new-session -d -s "$name" + tmux switch-client -t "$name" + tmux display-message "Session #S created" + } +else + t() { + if (( $# > 0 )); then + tmux $@ || tmux attach -t main + else tmux new -s main; fi + } + + # Start grouped session so I can be in two different windows in one session + tdup() { tmux new-session -t "${1:-`tmux display-message -p '#S'`}"; } +fi diff --git a/shell/tmux/install b/shell/tmux/install new file mode 100755 index 00000000..eee5ddc2 --- /dev/null +++ b/shell/tmux/install @@ -0,0 +1,13 @@ +#!/bin/bash + +case "$OSTYPE" in + darwin*) + brew install tmux + ;; + linux*) + if [ -f /etc/arch-release ]; then + sudo pacman -S tmux + elif [ -f /etc/debian-version ]; then + sudo apt-get install tmux + fi +esac diff --git a/tmux/conf-status.sh b/shell/tmux/scripts/conf-status.sh similarity index 100% rename from tmux/conf-status.sh rename to shell/tmux/scripts/conf-status.sh diff --git a/tmux/conf.sh b/shell/tmux/scripts/conf.sh similarity index 100% rename from tmux/conf.sh rename to shell/tmux/scripts/conf.sh diff --git a/tmux/prefix_highlight.tmux b/shell/tmux/scripts/prefix_highlight.tmux similarity index 100% rename from tmux/prefix_highlight.tmux rename to shell/tmux/scripts/prefix_highlight.tmux diff --git a/tmux/swap-pane.sh b/shell/tmux/scripts/swap-pane.sh similarity index 100% rename from tmux/swap-pane.sh rename to shell/tmux/scripts/swap-pane.sh diff --git a/shell/zsh/.zshenv b/shell/zsh/.zshenv new file mode 100644 index 00000000..645f0ada --- /dev/null +++ b/shell/zsh/.zshenv @@ -0,0 +1,29 @@ +export DOTFILES="$HOME/.dotfiles" + +source "$DOTFILES/shell/common.sh" + +## Paths +# Ensure path arrays do not contain duplicates. +typeset -gU cdpath fpath mailpath path + +path=( + $DOTFILES/bin + $HOME/bin + /usr/local/{,s}bin + $path +) + +fpath=( + $DOTFILES/shell/zsh/completions + $DOTFILES/shell/zsh/functions + $fpath +) + +export EDITOR=$(is-callable nvim && echo 'nvim' || echo 'vim') +export VISUAL=$EDITOR +export LESS='-g -i -M -R -S -w -z-4' +if is-callable lesspipe; then + export LESSOPEN='| /usr/bin/env lesspipe %s 2>&-' +fi + +[[ -z "$LANG" ]] && export LANG='en_US.UTF-8' diff --git a/shell/zsh/.zshrc b/shell/zsh/.zshrc new file mode 100644 index 00000000..272d58c0 --- /dev/null +++ b/shell/zsh/.zshrc @@ -0,0 +1,31 @@ +### zshrc +# +# By Henrik Lissner +# + +repo "tarjoilija/zgen" "$HOME/.zgen" + +source "$HOME/.zgen/zgen.zsh" +if ! zgen saved; +then + info "Creating zgen save" + + cache-clear + + zgen load hlissner/zsh-autopair "autopair.zsh" + zgen load zsh-users/zsh-history-substring-search + zgen load zsh-users/zsh-completions src + + is-ssh || zgen load zsh-users/zsh-syntax-highlighting + + zgen save +fi + +[ -f "$HOME/.zshrc.local" ] && source "$HOME/.zshrc.local" + +for file in $DOTFILES/.enabled.d/*/*.zsh; +do + source "$file" +done + +# Done! diff --git a/shell/zsh/README.md b/shell/zsh/README.md new file mode 100644 index 00000000..e69de29b diff --git a/shell/zsh/aliases.zsh b/shell/zsh/aliases.zsh new file mode 100644 index 00000000..cee3217b --- /dev/null +++ b/shell/zsh/aliases.zsh @@ -0,0 +1,58 @@ +#!/usr/bin/env zsh + +load shell/aliases.sh + + +zman() { PAGER="less -g -s '+/^ "$1"'" man zshall; } +alias \?='since @$last' + +## Compilers, interpretors 'n builders ####################################### +alias mk='make' +alias exe='exercism' + +## Redefined tools ########################################################### +# Always enable colored `grep` output +# Note: `GREP_OPTIONS="--color=auto"` is deprecated, hence the alias usage. +alias grep='grep --color=auto' +alias fgrep='fgrep --color=auto' +alias egrep='egrep --color=auto' + +alias ag='noglob ag' +alias gurl='curl --compressed' +alias mkdir='mkdir -p' +alias rsyncd='rsync -va --delete' # Hard sync two directories +alias ssh='ssh -C' # Compression for all ssh connections +alias wget='wget -c' # Resume dl if possible +alias ydl='youtube-dl' + +take() { mkdir "$1" && cd "$1"; } + +## New tools ################################################################# +# Intuitive map function +# For example, to list all directories that contain a certain file: find . -name +# .gitattributes | map dirname +alias map="xargs -n1" + +hex() { echo -n $@ | xxd -psdu; } + +# Canonical hex dump; some systems have this symlinked +is-callable hd || alias hd="hexdump -C" + +## Remote resources ########################################################## +# URL-encode strings +alias urlencode='python -c "import sys, urllib as ul; print ul.quote_plus(sys.argv[1]);"' +# find conflicted dropbox files +alias findc="find . -iname '*conflicted*' -type f -exec echo '\"{}\" ' \;" +# Send to sprunge.us +alias bin="curl -s -F 'sprunge=<-' http://sprunge.us | head -n 1 | tr -d '\r\n ' | y" +# IP addresses +alias publicip="dig +short myip.opendns.com @resolver1.opendns.com" +alias localip="ipconfig getifaddr en0" +alias ips="ifconfig -a | grep -o 'inet6\? \(addr:\)\?\s\?\(\(\([0-9]\+\.\)\{3\}[0-9]\+\)\|[a-fA-F0-9:]\+\)' | awk '{ sub(/inet6? (addr:)? ?/, \"\"); print }'" +# View HTTP traffic +alias sniff="sudo ngrep -d 'en0' -t '^(GET|POST) ' 'tcp and port 80'" +alias httpdump="sudo tcpdump -i en0 -n -s 0 -w - | grep -a -o -E \"Host\: .*|GET \/.*\"" +# Make URL REQUEST shortcuts +for method in GET HEAD POST PUT DELETE TRACE OPTIONS; do + alias "$method"="lwp-request -m '$method'" +done diff --git a/shell/zsh/cache/.git-keep b/shell/zsh/cache/.git-keep new file mode 100644 index 00000000..e69de29b diff --git a/shell/zsh/cache/rbenv-zsh b/shell/zsh/cache/rbenv-zsh new file mode 100644 index 00000000..cf1f275a --- /dev/null +++ b/shell/zsh/cache/rbenv-zsh @@ -0,0 +1,17 @@ +export PATH="/home/hlissner/.rbenv/shims:${PATH}" +export RBENV_SHELL=zsh +source '/home/hlissner/.rbenv/libexec/../completions/rbenv.zsh' +rbenv() { + local command + command="$1" + if [ "$#" -gt 0 ]; then + shift + fi + + case "$command" in + rehash|shell) + eval "$(rbenv "sh-$command" "$@")";; + *) + command rbenv "$command" "$@";; + esac +} diff --git a/shell/zsh/cache/zhistory b/shell/zsh/cache/zhistory new file mode 100644 index 00000000..2c24ec42 --- /dev/null +++ b/shell/zsh/cache/zhistory @@ -0,0 +1,301 @@ +: 1475970991:0;cd ~/.dotfiles/bin +: 1475971528:0;which +: 1475971558:0;w +: 1475971607:0;which q +: 1475972852:0;cd ~/.dotfiles/.conf.d +: 1475973024:0;exit +: 1475973301:0;z conf dot +: 1475973304:0;fasd conf dot +: 1475973307:0;fasd -d conf dot +: 1475973310:0;fasd -z conf dot +: 1475973316:0;cd work/conf +: 1475973319:0;man touch +: 1475973330:0;touch dotfiles +: 1475973335:0;cd dotfiles +: 1475973337:0;touch * +: 1475973339:0;ls -l +: 1475973341:0;ls -la +: 1476001275:0;clr +: 1476001310:0;pac +: 1476001797:0;cd cvs +: 1476001831:0;rmdir vim-lite +: 1476001833:0;cd vim +: 1476001838:0;vim aliases.zsh +: 1476001844:0;nvim aliases.zsh +: 1476001970:0;cd ~/.dotfiles +: 1476001979:0;ln -s ../editor/vim +: 1476001985:0;v +: 1476001999:0;cd emac +: 1476002012:0;vim bootstrap +: 1476002074:0;v ../../bootstrap +: 1476002078:0;nvim ../../bootstrap +: 1476002319:0;nvim bootstrap +: 1476002434:0;./bootstrap +: 1476002449:0;./bootstrap editor/emacs +: 1476002485:0;cd emacs +: 1476002500:0;./bootstrap editor/vim +: 1476002516:0;z dotf +: 1476002539:0;v ../arch/aliases.zsh +: 1476002553:0;mkdir deb +: 1476002618:0;l --color=auto +: 1476002625:0;cd .dotfiles/.conf.d +: 1476002628:0;cd .. +: 1476002637:0;cd ar +: 1476002642:0;cd .conf.d/arch +: 1476002715:0;v zsh/aliases +: 1476002834:0;../osx +: 1476002873:0;which l +: 1476002879:0;which ls +: 1476003036:0;mv tmux shell/ +: 1476003048:0;mkdir fasd fzf +: 1476003059:0;touch aliases.zsh +: 1476003064:0;rm aliases.zsh +: 1476003101:0;which noglob +: 1476003108:0;../zsh +: 1476003162:0;emacs aliases.zsh +: 1476003169:0;emacs -nw aliases.zsh +: 1476003322:0;mv aliases.zsh docker.zsh +: 1476003323:0;v docker.zsh +: 1476003382:0;cd shell +: 1476003401:0;v zsh/aliases.zsh +: 1476003432:0;cd zsh +: 1476003485:0;cd fasd +: 1476003496:0;touch fasd.zsh +: 1476003497:0;v fasd.zsh +: 1476003913:0;$TET +: 1476003916:0;$TET || echo 1 +: 1476003920:0;$TET && echo 1 +: 1476004355:0;cd Desktop +: 1476004359:0;rmdir Dsek +: 1476004361:0;rmdir Desktop +: 1476004381:0;./bootstrap vcs/git +: 1476004383:0;cd .conf.d +: 1476004398:0;g +: 1476004452:0;v ~/.dotfiles.old/zshrc +: 1476004928:0;cd .dotfiles.old +: 1476004933:0;v zshrc +: 1476004941:0;../.dotfiles +: 1476004959:0;v shell/common.sh +: 1476005183:0;pac -Ss rbenv +: 1476005187:0;pac -Ss ruby +: 1476005203:0;pac -S ruby +: 1476005348:0;cd ~/.dotfiles/dev/ruby +: 1476005935:0;cd dev/ruby +: 1476005956:0;va l +: 1476006945:0;cd editor +: 1476006949:0;cp -r vim vimtest +: 1476006950:0;cd vimtest +: 1476006993:0;touch .testdot +: 1476007282:0;./bootstrap editor/vimtest +: 1476007288:0;rm .testdot +: 1476009586:0;cd builds +: 1476009599:0;man makepkg +: 1476009656:0;pac -Ss fasd +: 1476009732:0;chmod +x in +: 1476009756:0;mkdir cpp +: 1476009760:0;cd vcs +: 1476009762:0;cd git +: 1476010066:0;pac -Ss hub +: 1476010074:0;echo $OSTYPE +: 1476010201:0;pac -Ss git +: 1476010366:0;cd /usr/local +: 1476010368:0;cd bin +: 1476010379:0;v ~/.zshrc +: 1476010389:0;v ~/.dotfiles/shell/zsh/.zshenv +: 1476010402:0;test-colors +: 1476010434:0;v .gitconfig +: 1476010490:0;k +: 1476010499:0;cd hg +: 1476010525:0;ag .conf.d +: 1476010556:0;mv .conf.d .enabled.d +: 1476010567:0;cd browser +: 1476010570:0;cat bootstrap +: 1476010583:0;rm install +: 1476010588:0;cd docker +: 1476010683:0;cd ~/.dotfiles.old +: 1476010687:0;v osx +: 1476010809:0;v Brewfile +: 1476010813:0;rm Brewfile +: 1476010815:0;v macos.zsh +: 1476010825:0;v zshenv +: 1476011013:0;cd shell/zsh +: 1476011015:0;v .zshrc +: 1476011043:0;which pac +: 1476011057:0;v aliases.sh +: 1476011060:0;which sudo +: 1476011067:0;sudo pacman -Syu +: 1476011077:0;rm /var/lib/pacman/db.lck +: 1476011080:0;sudo rm /var/lib/pacman/db.lck +: 1476011083:0;pac -Syu +: 1476011109:0;cd tmux +: 1476011111:0;v aliases.zsh +: 1476011130:0;cd .dotfiles/dev/ruby +: 1476011133:0;v .rspec +: 1476011147:0;... +: 1476011151:0;./bootstrap dev/ruby +: 1476011169:0;rbenv versions +: 1476011171:0;rbenv install +: 1476011176:0;rbenv install --list +: 1476011181:0;rbenv install --list | $PAGER +: 1476011183:0;rbenv install --list | less +: 1476011216:0;rbenv install 2.3.1 +: 1476011233:0;v tmux.conf +: 1476011282:0;mv tmux.conf .tmux.conf +: 1476011286:0;cd scripts +: 1476011291:0;touch install +: 1476011335:0;pac -Ss tmux +: 1476011378:0;chmod +x install +: 1476011392:0;../dev/rubyu +: 1476011393:0;../dev/ruby +: 1476011471:0;rbenv install 2.1 +: 1476011478:0;rbenv install 1.9 +: 1476011509:0;rm update +: 1476011521:0;touch update +: 1476011523:0;chmod +x update +: 1476011528:0;v update bootstrap +: 1476011592:0;v shell/fasd/install +: 1476011653:0;v editor/emacs/bootstrap +: 1476011700:0;ag INIT +: 1476011843:0;cd os +: 1476011846:0;cd osx +: 1476011849:0;cp install update +: 1476011920:0;cd arch +: 1476011924:0;cp bootstrap update +: 1476011927:0;mv bootstrap install +: 1476011928:0;v update +: 1476011988:0;v os/osx/install +: 1476012011:0;pacman --help +: 1476012014:0;pacman -F +: 1476012015:0;pacman -D +: 1476012018:0;usdo pacman -D +: 1476012020:0;sudo pacman -D +: 1476012024:0;sudo pacman -F +: 1476012029:0;pac -F +: 1476012032:0;-U +: 1476012033:0;pac -U +: 1476012038:0;pac -h +: 1476012051:0;;w +: 1476012072:0;pac -Ss sxhkd +: 1476012082:0;pac -Ss urxvt +: 1476012095:0;cd ~/.config +: 1476012136:0;pac -Ss xorg +: 1476012183:0;pac -S xorg +: 1476012193:0;pac -S xorg --noconfirm +: 1476012208:0;pac -Ss xorg | grep installed +: 1476012277:0;pac --noconfirm -S tmux +: 1476012322:0;pac -Ss wpa +: 1476012335:0;pac -Ss dhcp +: 1476012340:0;pac -Ss netctl +: 1476012350:0;pac -Ss dialog +: 1476012358:0;pac -Ss wifi +: 1476012367:0;pac -Ss wifi-menu +: 1476012392:0;move .config +: 1476012398:0;mv bspwm .config/ +: 1476012404:0;mv sxhkd .config/ +: 1476012430:0;cd ../builds +: 1476012631:0;pac -Ss font +: 1476012633:0;pac -Ss fontawes +: 1476012634:0;pac -Ss font-awe +: 1476012636:0;pac -Ss awesome +: 1476012787:0;pac -R bar +: 1476012789:0;pac -R lemonbar +: 1476012793:0;pac -Ss lemonbar +: 1476012802:0;git clone +: 1476012815:0;git clone https://aur.archlinux.org/lemonbar-xft-git.git +: 1476012820:0;cd lemonbar-xft-git +: 1476012822:0;makepkg -sri +: 1476012841:0;lemonbuddy_wrapper main +: 1476012902:0;v .xprofile +: 1476012917:0;ps aux | grep lemonbuddy +: 1476012921:0;sudo kill 732 +: 1476012960:0;cd ruby +: 1476012979:0;eval $(rbenv init - --norehash) +: 1476012982:0;eval $(rbenv init --norehash) +: 1476012989:0;eval $(rbenv init --norehash -) +: 1476013005:0;eval $(rbenv init --no-rehash -) +: 1476013009:0;eval $(rbenv init -) +: 1476013023:0;rbenv init - --no-rehash +: 1476013028:0;eval `rbenv init - --no-rehash` +: 1476013045:0;echo $(echo 5) +: 1476013052:0;eval $(rbenv init - --no-rehash) +: 1476013149:0;echo $PATH +: 1476013183:0;rbenv +: 1476013190:0;echo $CACHE_DIR +: 1476013198:0;cd .dotfiles/shell/zsh/cache +: 1476013200:0;cat rbenv-zsh +: 1476013230:0;cd systemd-bus-proxy +: 1476013232:0;- +: 1476013243:0;cp ../ruby/init.zsh . +: 1476013258:0;cp ../ruby/install . +: 1476013259:0;v in +: 1476013357:0;../ruby +: 1476013367:0;../python +: 1476013369:0;v init.zsh +: 1476013413:0;v ../ruby/install +: 1476013429:0;pyenv +: 1476013518:0;cd notes +: 1476013518:0;la +: 1476013538:0;for file in ./.*; do echo $file; done +: 1476013549:0;for file in .*; do echo $file; done +: 1476013704:0; +: 1476013711:0;cd ~/.dotfiles/.enabled.d +: 1476013714:0;rm vimtest +: 1476013726:0;cd dev/python +: 1476013770:0;../.. +: 1476013821:0;for file in .*; do\ + echo $file\ +done +: 1476013831:0;for file in ../.*; do\ + echo $file\ +done +: 1476013866:0;bash +: 1476014033:0;./bootstrap dev/python +: 1476014120:0;cd /dev/py +: 1476014121:0;cd /dev/python +: 1476014123:0;cd dev +: 1476014132:0;mkdir .config +: 1476014139:0;mv flake8 .config/ +: 1476014177:0;man ln +: 1476014209:0;cd python +: 1476014211:0;v install +: 1476014306:0;v bootstrap +: 1476014381:0;cd .enabled.d +: 1476014383:0;rm python +: 1476014384:0;cd +: 1476014389:0;cd .config +: 1476014394:0;cd .dotfiles +: 1476014396:0;.. +: 1476014402:0;cat .xsel.log +: 1476014409:0;rm .xsel.log +: 1476014416:0;cat .xsession-errors +: 1476014418:0;cat .xsession-errors.old +: 1476014420:0;l +: 1476014426:0;rm .xsession-errors* +: 1476014427:0;ll +: 1476014438:0;q +: 1476014439:0;l +: 1476014440:0;ll +: 1476014443:0;ll -1 +: 1476014445:0;ls -l1 +: 1476014447:0;ls -1 +: 1476014451:0;ls -1a +: 1476014457:0;.. +: 1476014460:0;./bootstrap dev/python +: 1476014465:0;ls -1 +: 1476014467:0;ls -1a +: 1476014471:0;cd .config +: 1476014471:0;l +: 1476014482:0;v bootstrap +: 1476014493:0;cd dev/python +: 1476014494:0;l +: 1476014496:0;v install +: 1476014624:0;l +: 1476014626:0;rm flake8 +: 1476014629:0;../.dotfiles +: 1476014631:0;./bootstrap dev/python +: 1476014634:0;../.config +: 1476014634:0;l +: 1476015688:0;realpath +: 1476016121:0;z conf dotf +: 1476016123:0;cd .. +: 1476016127:0;mv .dotfiles .dotfiles.new diff --git a/zsh/completion b/shell/zsh/completion.zsh similarity index 98% rename from zsh/completion rename to shell/zsh/completion.zsh index 0e1e72f9..e20d9c6c 100644 --- a/zsh/completion +++ b/shell/zsh/completion.zsh @@ -1,4 +1,4 @@ -#!/usr/bin/env zsh +is-interactive || exit ## Options setopt COMPLETE_IN_WORD # Complete from both ends of a word. @@ -15,7 +15,7 @@ unsetopt CASE_GLOB # Use caching to make completion for commands such as dpkg and apt usable. zstyle ':completion::complete:*' use-cache on -zstyle ':completion::complete:*' cache-path "${CACHE_DIR}/zcompcache" +zstyle ':completion::complete:*' cache-path "$CACHE_DIR/zcompcache" # Case-insensitive (all), partial-word, and then substring completion. zstyle ':completion:*' matcher-list '' \ diff --git a/zsh/completions/_brew b/shell/zsh/completions/_brew similarity index 100% rename from zsh/completions/_brew rename to shell/zsh/completions/_brew diff --git a/zsh/completions/_lsarchive b/shell/zsh/completions/_lsarchive similarity index 100% rename from zsh/completions/_lsarchive rename to shell/zsh/completions/_lsarchive diff --git a/zsh/completions/_unarchive b/shell/zsh/completions/_unarchive similarity index 100% rename from zsh/completions/_unarchive rename to shell/zsh/completions/_unarchive diff --git a/zsh/config b/shell/zsh/config.zsh similarity index 95% rename from zsh/config rename to shell/zsh/config.zsh index 903a5c32..ae6f8c5b 100644 --- a/zsh/config +++ b/shell/zsh/config.zsh @@ -1,8 +1,6 @@ -#!/usr/bin/env zsh - ## Plugins -TMUXIFIER="$HOME/.tmuxifier" -TMUXIFIER_LAYOUT_PATH="$HOME/.tmux/layouts" +TMUXIFIER="$DOTFILES/tmux/tmuxifier" +TMUXIFIER_LAYOUT_PATH="$DOTFILES/tmux/tmuxifier/layouts" ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets) ## General @@ -27,7 +25,7 @@ unsetopt HUP # Don't kill jobs on shell exit. unsetopt CHECK_JOBS # Don't report on jobs when shell exit. ## History -HISTFILE="${CACHE_DIR}/zhistory" +HISTFILE="$CACHE_DIR/zhistory" HISTSIZE=10000 # Max events to store in internal history. SAVEHIST=10000 # Max events to store in history file. diff --git a/shell/zsh/install b/shell/zsh/install new file mode 100755 index 00000000..85c60440 --- /dev/null +++ b/shell/zsh/install @@ -0,0 +1,25 @@ +#!/bin/bash + +if [[ "$SHELL" != *zsh ]] +then + case "$OSTYPE" in + darwin*) + brew install zsh + + # Add homebrewed zsh to /etc/shells + if ! grep '/usr/local/bin/zsh' /etc/shells >/dev/null; + then + sudo bash -c "echo '/usr/local/bin/zsh' >> /etc/shells" + fi + ;; + linux*) + if [ -f /etc/arch-release ]; then + sudo pacman --noconfirm -S zsh + elif [ -f /etc/debian_version ]; then + sudo apt-get install zsh + fi + ;; + esac + + chsh -s $(which zsh) +fi diff --git a/zsh/keybinds b/shell/zsh/keybinds.zsh similarity index 99% rename from zsh/keybinds rename to shell/zsh/keybinds.zsh index f48b8326..7b0b85cd 100644 --- a/zsh/keybinds +++ b/shell/zsh/keybinds.zsh @@ -1,4 +1,4 @@ -#!/usr/bin/env zsh +is-interactive || exit # Ran into an issue where the surround module wasn't working if KEYTIMEOUT is <= 10. # Specifically, (delete|change)-surround immediately abort into insert mode if @@ -8,9 +8,8 @@ export KEYTIMEOUT=15 autoload -U is-at-least -bindkey -v - ## vi-mode ############### +bindkey -v bindkey -M viins 'jk' vi-cmd-mode # bindkey -M viins '^I' expand-or-complete-prefix diff --git a/zsh/prompt b/shell/zsh/prompt.zsh similarity index 95% rename from zsh/prompt rename to shell/zsh/prompt.zsh index de22ab8d..28372229 100644 --- a/zsh/prompt +++ b/shell/zsh/prompt.zsh @@ -1,6 +1,7 @@ -#!/usr/bin/env zsh # Based off Pure +is-interactive || exit + _strlen() { echo ${#${(S%%)1//$~%([BSUbfksu]|([FB]|){*})/}}; } # fastest possible way to check if repo is dirty @@ -92,10 +93,10 @@ prompt_init() { if [[ -z "$SSH_CONNECTION" ]] then N_MODE="%F{green}## " - I_MODE="%(?.%F{blue}.%F{red})λ " + I_MODE="%(?.%F{yellow}.%F{red})λ " else N_MODE="%F{red}### " - I_MODE="%(?.%F{magenta}.%F{red})λ " + I_MODE="%(?.%F{green}.%F{red})λ " fi RPROMPT='%F{cyan}${vcs_info_msg_0_}$(prompt_git_dirty)' # Branch + dirty indicator @@ -103,7 +104,7 @@ prompt_init() { RPROMPT+='%f' # end PROMPT='$prompt_username' # username - PROMPT+='%F{cyan}%~ %f' # path + PROMPT+='%F{blue}%~ %f' # path PROMPT+='${PROMPT_SYMBOL:-$ }' # Prompt (red if $? == 0) PROMPT+='%f' #end } diff --git a/vcs/README.md b/vcs/README.md new file mode 100644 index 00000000..e69de29b diff --git a/gitconfig b/vcs/git/.gitconfig similarity index 97% rename from gitconfig rename to vcs/git/.gitconfig index d21bb318..cfd4a7fb 100644 --- a/gitconfig +++ b/vcs/git/.gitconfig @@ -34,8 +34,6 @@ autosquash = true [push] default = simple -[credential] - helper = osxkeychain [alias] root = rev-parse --show-toplevel diff --git a/gitignore b/vcs/git/.gitignore similarity index 100% rename from gitignore rename to vcs/git/.gitignore diff --git a/vcs/git/aliases.zsh b/vcs/git/aliases.zsh new file mode 100644 index 00000000..d0d8e6bf --- /dev/null +++ b/vcs/git/aliases.zsh @@ -0,0 +1,32 @@ +is-callable 'hub' && alias git='hub' +g() { [ $# -eq 0 ] && git status --short || git $*; } + +alias gbr='git browse' +alias gi='git init' +alias gs='git status' +alias gsu='git submodule' +alias gsq='git rebase -i origin/master' +alias gco='git checkout' +alias gcoo='git checkout --' +alias gc='git commit' +alias gcl='git clone' +alias gcm='noglob git commit -m' +alias gcma='noglob git commit --amend -m' +alias gcf='noglob git commit --fixup' +alias gd='git diff' +alias gp='git push' +alias gpb='git push origin' +alias gpt='git push --follow-tags' +alias gpl='git pull' +alias ga='git add' +alias gau='git add -u' +alias gb='git branch' +alias gbd='git branch -D' +alias gap='git add --patch' +alias gr='git reset HEAD' +alias gt='git tag' +alias gtd='git tag -d' +alias gta='git tag -a' +alias gl='git log --oneline --decorate' +alias gls='git ls-files' + diff --git a/vcs/git/install b/vcs/git/install new file mode 100755 index 00000000..b44fb1d2 --- /dev/null +++ b/vcs/git/install @@ -0,0 +1,18 @@ +#!/bin/bash + +command -v git >/dev/null && command -v hub >/dev/null && exit + +case "$OSTYPE" in + darwin*) + brew install git hub + ;; + linux*) + if [ -f /etc/arch-release ]; then + sudo pacman --noconfirm -S git hub + elif [ -f /etc/debian-version ]; then + sudo apt-get -y install git + mkdir -p $HOME/builds && cd $HOME/builds + git clone https://github.com/github/hub.git && cd hub + make install prefix=/usr/local + fi +esac diff --git a/vcs/hg/.hgignore b/vcs/hg/.hgignore new file mode 100644 index 00000000..61ad2d68 --- /dev/null +++ b/vcs/hg/.hgignore @@ -0,0 +1,9 @@ +syntax: glob + +*.pyc +.DS_Store +Desktop.ini +._* +Thumbs.db +.Spotlight-V100 +.Trashes diff --git a/hgrc b/vcs/hg/.hgrc similarity index 100% rename from hgrc rename to vcs/hg/.hgrc diff --git a/vcs/hg/install b/vcs/hg/install new file mode 100755 index 00000000..1f74566e --- /dev/null +++ b/vcs/hg/install @@ -0,0 +1,15 @@ +#!/bin/bash + +command -v hg >/dev/null && exit + +case "$OSTYPE" in + darwin*) + brew install mercurial + ;; + linux*) + if [ -f /etc/arch-release ]; then + sudo pacman --noconfirm -S mercurial + elif [ -f /etc/debian-version ]; then + sudo apt-get -y mercurial + fi +esac diff --git a/zsh/aliases b/zsh/aliases deleted file mode 100644 index 146f7f66..00000000 --- a/zsh/aliases +++ /dev/null @@ -1,266 +0,0 @@ -#!/usr/bin/env zsh -autoload -U zmv - -alias ?='since @$last' - -zman() { PAGER="less -g -s '+/^ "$1"'" man zshall; } - -# Compilers, interpretors 'n builders -alias rk="noglob ${aliases[rk]:-rake}" -alias rkg="noglob ${aliases[rkg]:-rake -g}" - - -## Named Directories ######################################################### - -W=~/Dropbox/work -DL=~/Downloads -LOGS=/var/log - -# Editors -is-callable 'nvim' && alias vim=nvim -alias v='vim' -if is-callable 'emacs'; then - if [[ "$OSTYPE" == darwin* ]]; then - alias emacs='emacs -nw' - e() { # Emacs version of v - if pgrep Emacs 2>&1 >/dev/null; then - emacsclient -n $@ - else - /Applications/Emacs.app/Contents/MacOS/Emacs $@ & - fi - } - else - alias e='emacsclient -n' - fi - - ediff() { e --eval "(ediff-files \"$1\" \"$2\")"; } -fi - - -## Fast folder navigation #################################################### -alias b="back" -back() { # Jump to a parent directory - dir=$({ - _path=$PWD - while [[ -n "$_path" && "$_path" != "/" ]]; do - _path=$(dirname "$_path") - echo "$_path" - done - } | grep -i "$*" | tail -1) && cd "$dir" -} - -## Redefined tools ########################################################### -# Always enable colored `grep` output -# Note: `GREP_OPTIONS="--color=auto"` is deprecated, hence the alias usage. -alias grep='grep --color=auto' -alias fgrep='fgrep --color=auto' -alias egrep='egrep --color=auto' - -alias ssh='ssh -C' # Compression for all ssh connections -alias ag='noglob ag' -alias l="ls -l" -alias ll="ls -1" -alias la="ls -la" -alias ln="ln -v" # Verbose ln -alias wget='wget -c' # Resume dl if possible -alias rsyncd='rsync -va --delete' # Hard sync two directories -alias mkdir='mkdir -p' -alias gurl='curl --compressed' -alias ydl='youtube-dl' -take() { mkdir "$1" && cd "$1"; } - - -## pbcopy/pbpaste, ls & open ################################################# -# Detect which `ls` flavor is in use -if ls --color > /dev/null 2>&1; then # GNU `ls` - colorflag="--color" -else # OS X `ls` - colorflag="-G" -fi -alias ls="command ls -F ${colorflag}" -case $OSTYPE in - "darwin"*) # is OSX - alias ls="ls -G" - alias date="gdate" - ;; - "linux"*) - alias open='xdg-open' - alias ls="ls --color=auto" - - if (( $+commands[xclip] )); then - alias pbcopy='xclip -selection clipboard -in' - alias pbpaste='xclip -selection clipboard -out' - elif (( $+commands[xsel] )); then - alias pbcopy='xsel --clipboard --input' - alias pbpaste='xsel --clipboard --output' - fi - ;; - "cygwin"*) - alias open='cygstart' - alias pbcopy='tee > /dev/clipboard' - alias pbpaste='cat /dev/clipboard' - ;; -esac -o() { open ${*:-.}; } # By default, open cwd -alias y='pbcopy' # Yank to clipboard -alias yy='tr -d '\n' | pbcopy' # Strip newlines + copy to clipboard -alias p='pbpaste' # Echo clipboard contents - - -## New tools ################################################################# -alias q='exit' -alias clr='clear' -# Enable aliases to be sudo’ed -alias sudo='sudo ' -alias ..="cd .." -alias ...="cd ../.." -alias ....="cd ../../.." -alias -- -="cd -" -# Intuitive map function -# For example, to list all directories that contain a certain file: find . -name -# .gitattributes | map dirname -alias map="xargs -n1" - -hex() { echo -n $@ | xxd -psdu; } - -# Canonical hex dump; some systems have this symlinked -is-callable hd || alias hd="hexdump -C" -# OS X has no `md5sum`, so use `md5` as a fallback -is-callable md5sum || alias md5sum="md5" -# OS X has no `sha1sum`, so use `shasum` as a fallback -is-callable sha1sum || alias sha1sum="shasum" - -## Remote resources -# URL-encode strings -alias urlencode='python -c "import sys, urllib as ul; print ul.quote_plus(sys.argv[1]);"' -# find conflicted dropbox files -alias findc="find . -iname '*conflicted*' -type f -exec echo '\"{}\" ' \;" -# Send to sprunge.us -alias bin="curl -s -F 'sprunge=<-' http://sprunge.us | head -n 1 | tr -d '\r\n ' | y" -# IP addresses -alias ip="dig +short myip.opendns.com @resolver1.opendns.com" -alias localip="ipconfig getifaddr en0" -alias ips="ifconfig -a | grep -o 'inet6\? \(addr:\)\?\s\?\(\(\([0-9]\+\.\)\{3\}[0-9]\+\)\|[a-fA-F0-9:]\+\)' | awk '{ sub(/inet6? (addr:)? ?/, \"\"); print }'" -# View HTTP traffic -alias sniff="sudo ngrep -d 'en0' -t '^(GET|POST) ' 'tcp and port 80'" -alias httpdump="sudo tcpdump -i en0 -n -s 0 -w - | grep -a -o -E \"Host\: .*|GET \/.*\"" -# Make URL REQUEST shortcuts -for method in GET HEAD POST PUT DELETE TRACE OPTIONS; do - alias "$method"="lwp-request -m '$method'" -done - - -## Compilers, interpretors 'n builders ####################################### -alias va='vagrant' -alias py='python' -alias pye='pyenv' -alias rb='ruby' -alias rbe='rbenv' -alias rdb='pry -r' -alias bu='bundle' -alias bue='bundle exec' -alias bui='bundle install -path vendor' -alias ans='ansible' -alias ansp='ansible-playbook' -alias fabg='noglob fab -f ~/.dotfiles/ansible/fabfile.py' -alias rk='rake' -alias rkg='rake -g' -alias mk='make' -alias exe='exercism' -alias c11='clang++ -std=c++11' -alias dk='docker' -alias dkm='docker-machine' -alias dkc='docker-compose' -alias dki='eval $(docker-machine env)' - -case $OSTYPE in - "darwin"*) # is OSX - # Homebrew - alias br='brew' - alias bru='brew update && brew upgrade --all && brew cleanup' - alias brc='brew cask' - alias codekit='open -a CodeKit' - ;; - "linux"*) - is-callable apt-get && \ - alias apt='sudo apt-get' && \ - alias aptu'sudo apt-get update && sudo apt-get upgrade' - is-callable pacman && \ - alias pac='sudo pacman' && \ - alias pacu='sudo pacman -Syu' - ;; - "cygwin"*) - ;; -esac - - -## GIT ####################################################################### -is-callable 'hub' && alias git='hub' -g() { [ $# -eq 0 ] && git status --short || git $*; } - -alias gbr='git browse' -alias gi='git init' -alias gs='git status' -alias gsu='git submodule' -alias gsq='git rebase -i origin/master' -alias gco='git checkout' -alias gcoo='git checkout --' -alias gc='git commit' -alias gcl='git clone' -alias gcm='noglob git commit -m' -alias gcma='noglob git commit --amend -m' -alias gcf='noglob git commit --fixup' -alias gd='git diff' -alias gp='git push' -alias gpb='git push origin' -alias gpt='git push --follow-tags' -alias gpl='git pull' -alias ga='git add' -alias gau='git add -u' -alias gb='git branch' -alias gbd='git branch -D' -alias gap='git add --patch' -alias gr='git reset HEAD' -alias gt='git tag' -alias gtd='git tag -d' -alias gta='git tag -a' -alias gl='git log --oneline --decorate' -alias gls='git ls-files' - -# transmission-remote -if is-callable 'transmission-remote'; then - alias bt='transmission-remote server' - alias bt-clear='bt -t all -r' - alias btl='transmission-list server' -fi - -# Tmux -if is-callable 'tmux'; then - alias ta='tmux attach' - alias tl='tmux ls' - - if [[ -n $TMUX ]]; then - alias t='tmux' - alias tf='tmux find-window' - # Detach all other clients to this session - alias mine='tmux detach -a' - # Send command to other tmux window - tt() { tmux send-keys -t .+ C-u && tmux set-buffer "$*" && tmux paste-buffer -t .+ && tmux send-keys -t .+ Enter; } - # Create new session (from inside one) - tn() { - local name="${1:-`basename $PWD`}" - TMUX= tmux new-session -d -s "$name" - tmux switch-client -t "$name" - tmux display-message "Session #S created" - } - else - t() { - if (( $# > 0 )); then - tmux $@ || tmux attach -t main - else tmux new -s main; fi - } - - # Start grouped session so I can be in two different windows in one session - tdup() { tmux new-session -t "${1:-`tmux display-message -p '#S'`}"; } - fi -fi diff --git a/zshenv b/zshenv deleted file mode 100644 index c08319fe..00000000 --- a/zshenv +++ /dev/null @@ -1,68 +0,0 @@ -source $HOME/.dotfiles/.common.sh - -## Paths -# Ensure path arrays do not contain duplicates. -typeset -gU cdpath fpath mailpath path - -## -export RUST_SRC_PATH=$HOME/Dropbox/lib/rust/src -export GOPATH=$HOME/Dropbox/work/go -export ANDROID_HOME=/usr/local/opt/android-sdk -export ANDROID_SDK=/usr/local/Cellar/android-sdk/24.2 -export RUBYOPT=rubygems - -# OSX Only -if [[ -x /usr/libexec/path_helper ]]; then - eval $(/usr/libexec/path_helper -s) -fi -path=( - ./node_modules/.bin - $DOTFILES/{bin,scripts} - $HOME/.tmuxifier/bin - $HOME/.{rb,py}env/{bin,shims} - $HOME/.composer/vendor/bin - $HOME/bin - $GOPATH/bin - $ANDROID_HOME/platform-tools - $ANDROID_HOME/tools - /usr/local/{,s}bin - $path -) - -fpath=( - ~/.zsh/completions - $fpath -) - -# Browser -export BROWSER='open' - -# Editors -export EDITOR=$(is-callable nvim && echo 'nvim' || echo 'vim') -export VISUAL=$EDITOR - -# export CC=/usr/bin/clang -# export CXX=/usr/bin/clang++ -# export CXXFLAGS="-I/usr/local/include" -export C_INCLUDE_PATH="/usr/local/include" -export CPLUS_INCLUDE_PATH="/usr/local/include" -export LIBRARY_PATH="/usr/local/lib" -# export LDFLAGS="-L/usr/local/lib" - -export LESS='-g -i -M -R -S -w -z-4' -if is-callable lesspipe; then - export LESSOPEN='| /usr/bin/env lesspipe %s 2>&-' -fi - -# Temporary Files -if [[ ! -d "$TMPDIR" ]]; then - export TMPDIR="/tmp/$USER" - mkdir -p -m 700 "$TMPDIR" -fi - -TMPPREFIX="${TMPDIR%/}/zsh" -[[ ! -d "$TMPPREFIX" ]] && mkdir -p "$TMPPREFIX" - -[[ -z "$LANG" ]] && export LANG='en_US.UTF-8' - -autoload -U colors && colors diff --git a/zshrc b/zshrc deleted file mode 100644 index f00a9caa..00000000 --- a/zshrc +++ /dev/null @@ -1,39 +0,0 @@ -### zshrc -# By Henrik Lissner - -if [ ! -d ~/.zgen ]; then - echo "Zgen isn't installed! Run install.sh" - exit 1 -fi - -source ~/.zsh/config - -source ~/.zgen/zgen.zsh -if ! zgen saved; then - echo "Creating zgen save" - [[ -d "$CACHE_DIR" ]] && rm -f "$CACHE_DIR/*" - - zgen load hlissner/zsh-autopair "autopair.zsh" - zgen load zsh-users/zsh-history-substring-search - zgen load zsh-users/zsh-completions src - is-ssh || zgen load zsh-users/zsh-syntax-highlighting - - zgen save -fi - -if is-interactive; then - source ~/.zsh/keybinds - source ~/.zsh/prompt - source ~/.zsh/completion -fi - -cache rbenv init - --no-rehash -cache pyenv init - --no-rehash -if is-interactive; then - cache fasd --init posix-alias zsh-hook zsh-ccomp zsh-ccomp-install zsh-wcomp zsh-wcomp-install - cache tmuxifier init - -fi - -source ~/.zsh/aliases - -# Done!