Skip to content

Instantly share code, notes, and snippets.

@adelarsq
Forked from jonathan-soifer/dotfiles
Created May 23, 2019 13:35
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adelarsq/b4a350fa459c48ba2f9dbaff8be2f7f4 to your computer and use it in GitHub Desktop.
Save adelarsq/b4a350fa459c48ba2f9dbaff8be2f7f4 to your computer and use it in GitHub Desktop.
System and Shell setting for happiness and productivity
# Softwares that I currently use:
• Productivity Related Software (VPN, 1Password, CleanMyMac, Alfred, BetterSnapTool, DisableMonitor, Unarchiver)
• Design Related Software (Sketch, Zeplin, Skyfonts, Wacom, Adobe Photoshop, Adobe Illustrator)
• Terminal Software (iTerm2, Z-Shell, Oh My ZSH, Agnoster Fcamblor Theme, Z Script - Jump Around)
• Terminal Related Tools (xcode-tools, homebrew, git, nvm, rvm, ripgrep, ngrok, curl, eslint)
• Fonts (Source Code Pro for iTerm2 and Spacemacs, Fira Code Symbol for Spacemacs)
• Video Related Software (Adobe After Effects, Premiere, ScreenFlick, QuickTime)
• Browsers Extensions (1Password, Pocket, React DevTools, Redux DevTools)
• Communication Related Software (Zoom.us, What'sapp, Slack, Mac Mail)
• Music/Audio Related Software (Spotify, Boom 2, Soundcleod)
• Office Related Software (Word, Excel, Adobe Acrobat)
• Coding Related Software (Postman, Docker, )
• Browsers (Brave, Safari, Firefox, Chrome)
• Code Editors (MacVim, Spacemacs)
Globally installed JS packages: eslint, prettier, babel-eslint eslint-plugin-react
Wanting to add:
Omnigraffle and FinalCut. Someday.
#!/usr/bin/env zsh
# Checks if there's a frame open
emacsclient -n -e "(if (> (length (frame-list)) 1) 't)" 2> /dev/null | grep t &> /dev/null
if [ "$?" -eq "1" ]; then
echo "Emacs already running, connecting..."
emacsclient -a '' -nqc "$@" &> /dev/null
else
echo "Starting Emacs with a server..."
emacsclient -nq "$@" &> /dev/null
fi
{
"extends": "airbnb"
}
[user]
signingkey = [your-signing-key]
name = [Your Name]
email = [your.email@example.com]
[push]
default = current
[commit]
gpgsign = true
[gpg]
program = /usr/local/bin/gpg
[core]
excludesfile = /Users/[your home folder]/.gitignore_global
editor = /usr/bin/vim
# Mac Weird Files
.DS_Store
# Yarn Error Logs
yarn-error.log
# The Universe
node_modules/
# Generally, the Rails Universe
vendor/
# Emacs/Spacemacs Project Management
.projectile
# RVM Project Specific Ruby details
*.versions.conf
# ctags for navigating sources
tags/
tags.lock
# Tern: persistent server pid file
.tern-port
# Prettier JS
.prettierrc*
# ESLint JS
.eslintrc
# Add RVM to PATH for scripting. Make sure this is the last PATH variable change.
export PATH="$PATH:$HOME/.rvm/bin"
;; -*- mode: emacs-lisp -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Configuration Layers declaration.
You should not put any user code in this function besides modifying the variable
values."
(setq-default
;; Base distribution to use. This is a layer contained in the directory
;; `+distribution'. For now available distributions are `spacemacs-base'
;; or `spacemacs'. (default 'spacemacs)
dotspacemacs-distribution 'spacemacs
;; Lazy installation of layers (i.e. layers are installed only when a file
;; with a supported type is opened). Possible values are `all', `unused'
;; and `nil'. `unused' will lazy install only unused layers (i.e. layers
;; not listed in variable `dotspacemacs-configuration-layers'), `all' will
;; lazy install any layer that support lazy installation even the layers
;; listed in `dotspacemacs-configuration-layers'. `nil' disable the lazy
;; installation feature and you have to explicitly list a layer in the
;; variable `dotspacemacs-configuration-layers' to install it.
;; (default 'unused)
dotspacemacs-enable-lazy-installation 'unused
;; If non-nil then Spacemacs will ask for confirmation before installing
;; a layer lazily. (default t)
dotspacemacs-ask-for-lazy-installation t
;; If non-nil layers with lazy install support are lazy installed.
;; List of additional paths where to look for configuration layers.
;; Paths must have a trailing slash (i.e. `~/.mycontribs/')
dotspacemacs-configuration-layer-path '()
;; List of configuration layers to load.
dotspacemacs-configuration-layers
'(
elixir
org
nginx
php
python
rust
(auto-completion :variables
auto-completion-return-key-behavior nil
auto-completion-tab-key-behavior 'complete
auto-completion-enable-sort-by-usage t
auto-completion-private-snippets-directory nil
auto-completion-enable-snippets-in-popup t)
(better-defaults :variables
better-defaults-move-to-beginning-of-code-first t
better-defaults-move-to-end-of-code-first t)
(shell :variables
shell-default-shell 'multi-term
shell-default-height 30
shell-default-term-shell "/usr/local/bin/zsh"
shell-default-position 'bottom)
scheme
helm
emacs-lisp
git
theming
themes-megapack
ruby
(ruby :variables ruby-version-manager 'rvm)
ruby-on-rails
react
html
(markdown :variables markdown-live-preview-engine 'vmd)
yaml
osx
syntax-checking
)
;; List of additional packages that will be installed without being
;; wrapped in a layer. If you need some configuration for these
;; packages, then consider creating a layer. You can also put the
;; configuration in `dotspacemacs/user-config'.
dotspacemacs-additional-packages '()
;; A list of packages that cannot be updated.
dotspacemacs-frozen-packages '()
;; A list of packages that will not be installed and loaded.
dotspacemacs-excluded-packages '(firebelly-theme
niflheim-theme
pastels-on-dark-theme
tronesque-theme)
;; Defines the behaviour of Spacemacs when installing packages.
;; Possible values are `used-only', `used-but-keep-unused' and `all'.
;; `used-only' installs only explicitly used packages and uninstall any
;; unused packages as well as their unused dependencies.
;; `used-but-keep-unused' installs only the used packages but won't uninstall
;; them if they become unused. `all' installs *all* packages supported by
;; Spacemacs and never uninstall them. (default is `used-only')
dotspacemacs-install-packages 'used-only))
(defun dotspacemacs/init ()
"Initialization function.
This function is called at the very startup of Spacemacs initialization
before layers configuration.
You should not put any user code in there besides modifying the variable
values."
;; This setq-default sexp is an exhaustive list of all the supported
;; spacemacs settings.
(setq-default
;; If non nil ELPA repositories are contacted via HTTPS whenever it's
;; possible. Set it to nil if you have no way to use HTTPS in your
;; environment, otherwise it is strongly recommended to let it set to t.
;; This variable has no effect if Emacs is launched with the parameter
;; `--insecure' which forces the value of this variable to nil.
;; (default t)
dotspacemacs-elpa-https t
;; Maximum allowed time in seconds to contact an ELPA repository.
dotspacemacs-elpa-timeout 50
;; If non nil then spacemacs will check for updates at startup
;; when the current branch is not `develop'. Note that checking for
;; new versions works via git commands, thus it calls GitHub services
;; whenever you start Emacs. (default nil)
dotspacemacs-check-for-update t
;; If non-nil, a form that evaluates to a package directory. For example, to
;; use different package directories for different Emacs versions, set this
;; to `emacs-version'.
dotspacemacs-elpa-subdirectory nil
;; One of `vim', `emacs' or `hybrid'.
;; `hybrid' is like `vim' except that `insert state' is replaced by the
;; `hybrid state' with `emacs' key bindings. The value can also be a list
;; with `:variables' keyword (similar to layers). Check the editing styles
;; section of the documentation for details on available variables.
;; (default 'vim)
dotspacemacs-editing-style 'vim
;; If non nil output loading progress in `*Messages*' buffer. (default nil)
dotspacemacs-verbose-loading nil
;; Specify the startup banner. Default value is `official', it displays
;; the official spacemacs logo. An integer value is the index of text
;; banner, `random' chooses a random text banner in `core/banners'
;; directory. A string value must be a path to an image format supported
;; by your Emacs build.
;; If the value is nil then no banner is displayed. (default 'official)
dotspacemacs-startup-banner 'official
;; List of items to show in startup buffer or an association list of
;; the form `(list-type . list-size)`. If nil then it is disabled.
;; Possible values for list-type are:
;; `recents' `bookmarks' `projects' `agenda' `todos'."
;; List sizes may be nil, in which case
;; `spacemacs-buffer-startup-lists-length' takes effect.
dotspacemacs-startup-lists '((recents . 0)
(projects . 10))
;; True if the home buffer should respond to resize events.
dotspacemacs-startup-buffer-responsive t
;; Default major mode of the scratch buffer (default `text-mode')
dotspacemacs-scratch-mode 'text-mode
;; List of themes, the first of the list is loaded when spacemacs starts.
;; Press <SPC> T n to cycle to the next theme in the list (works great
;; with 2 themes variants, one dark and one light)
dotspacemacs-themes '(spacemacs-dark
monokai)
;; If non nil the cursor color matches the state color in GUI Emacs.
dotspacemacs-colorize-cursor-according-to-state t
;; Default font, or prioritized list of fonts. `powerline-scale' allows to
;; quickly tweak the mode-line size to make separators look not too crappy.
dotspacemacs-default-font '("Source Code Pro"
:size 13
:weight normal
:width normal
:powerline-scale 1.1)
;; The leader key
dotspacemacs-leader-key "SPC"
;; The key used for Emacs commands (M-x) (after pressing on the leader key).
;; (default "SPC")
dotspacemacs-emacs-command-key "SPC"
;; The key used for Vim Ex commands (default ":")
dotspacemacs-ex-command-key ":"
;; The leader key accessible in `emacs state' and `insert state'
;; (default "M-m")
dotspacemacs-emacs-leader-key "M-m"
;; Major mode leader key is a shortcut key which is the equivalent of
;; pressing `<leader> m`. Set it to `nil` to disable it. (default ",")
dotspacemacs-major-mode-leader-key ","
;; Major mode leader key accessible in `emacs state' and `insert state'.
;; (default "C-M-m")
dotspacemacs-major-mode-emacs-leader-key "C-M-m"
;; These variables control whether separate commands are bound in the GUI to
;; the key pairs C-i, TAB and C-m, RET.
;; Setting it to a non-nil value, allows for separate commands under <C-i>
;; and TAB or <C-m> and RET.
;; In the terminal, these pairs are generally indistinguishable, so this only
;; works in the GUI. (default nil)
dotspacemacs-distinguish-gui-tab t
;; If non nil `Y' is remapped to `y$' in Evil states. (default nil)
dotspacemacs-remap-Y-to-y$ t
;; If non-nil, the shift mappings `<' and `>' retain visual state if used
;; there. (default t)
dotspacemacs-retain-visual-state-on-shift t
;; If non-nil, J and K move lines up and down when in visual mode.
;; (default nil)
dotspacemacs-visual-line-move-text nil
;; If non nil, inverse the meaning of `g' in `:substitute' Evil ex-command.
;; (default nil)
dotspacemacs-ex-substitute-global nil
;; Name of the default layout (default "Default")
dotspacemacs-default-layout-name "Default Layout"
;; If non nil the default layout name is displayed in the mode-line.
;; (default nil)
dotspacemacs-display-default-layout nil
;; If non nil then the last auto saved layouts are resume automatically upon
;; start. (default nil)
dotspacemacs-auto-resume-layouts nil
;; Size (in MB) above which spacemacs will prompt to open the large file
;; literally to avoid performance issues. Opening a file literally means that
;; no major mode or minor modes are active. (default is 1)
dotspacemacs-large-file-size 1
;; Location where to auto-save files. Possible values are `original' to
;; auto-save the file in-place, `cache' to auto-save the file to another
;; file stored in the cache directory and `nil' to disable auto-saving.
;; (default 'cache)
dotspacemacs-auto-save-file-location nil
;; Maximum number of rollback slots to keep in the cache. (default 5)
dotspacemacs-max-rollback-slots 5
;; If non nil, `helm' will try to minimize the space it uses. (default nil)
dotspacemacs-helm-resize t
;; if non nil, the helm header is hidden when there is only one source.
;; (default nil)
dotspacemacs-helm-no-header nil
;; define the position to display `helm', options are `bottom', `top',
;; `left', or `right'. (default 'bottom)
dotspacemacs-helm-position 'bottom
;; Controls fuzzy matching in helm. If set to `always', force fuzzy matching
;; in all non-asynchronous sources. If set to `source', preserve individual
;; source settings. Else, disable fuzzy matching in all sources.
;; (default 'always)
dotspacemacs-helm-use-fuzzy 'always
;; If non nil the paste micro-state is enabled. When enabled pressing `p`
;; several times cycle between the kill ring content. (default nil)
dotspacemacs-enable-paste-transient-state nil
;; Which-key delay in seconds. The which-key buffer is the popup listing
;; the commands bound to the current keystroke sequence. (default 0.4)
dotspacemacs-which-key-delay 0.4
;; Which-key frame position. Possible values are `right', `bottom' and
;; `right-then-bottom'. right-then-bottom tries to display the frame to the
;; right; if there is insufficient space it displays it at the bottom.
;; (default 'bottom)
dotspacemacs-which-key-position 'bottom
;; If non nil a progress bar is displayed when spacemacs is loading. This
;; may increase the boot time on some systems and emacs builds, set it to
;; nil to boost the loading time. (default t)
dotspacemacs-loading-progress-bar t
;; If non nil the frame is fullscreen when Emacs starts up. (default nil)
;; (Emacs 24.4+ only)
dotspacemacs-fullscreen-at-startup nil
;; If non nil `spacemacs/toggle-fullscreen' will not use native fullscreen.
;; Use to disable fullscreen animations in OSX. (default nil)
dotspacemacs-fullscreen-use-non-native nil
;; If non nil the frame is maximized when Emacs starts up.
;; Takes effect only if `dotspacemacs-fullscreen-at-startup' is nil.
;; (default nil) (Emacs 24.4+ only)
dotspacemacs-maximized-at-startup nil
;; A value from the range (0..100), in increasing opacity, which describes
;; the transparency level of a frame when it's active or selected.
;; Transparency can be toggled through `toggle-transparency'. (default 90)
dotspacemacs-active-transparency 90
;; A value from the range (0..100), in increasing opacity, which describes
;; the transparency level of a frame when it's inactive or deselected.
;; Transparency can be toggled through `toggle-transparency'. (default 90)
dotspacemacs-inactive-transparency 90
;; If non nil show the titles of transient states. (default t)
dotspacemacs-show-transient-state-title t
;; If non nil show the color guide hint for transient state keys. (default t)
dotspacemacs-show-transient-state-color-guide t
;; If non nil unicode symbols are displayed in the mode line. (default t)
dotspacemacs-mode-line-unicode-symbols t
;; If non nil smooth scrolling (native-scrolling) is enabled. Smooth
;; scrolling overrides the default behavior of Emacs which recenters point
;; when it reaches the top or bottom of the screen. (default t)
dotspacemacs-smooth-scrolling t
;; Control line numbers activation.
;; If set to `t' or `relative' line numbers are turned on in all `prog-mode' and
;; `text-mode' derivatives. If set to `relative', line numbers are relative.
;; This variable can also be set to a property list for finer control:
;; '(:relative nil
;; :disabled-for-modes dired-mode
;; doc-view-mode
;; markdown-mode
;; org-mode
;; pdf-view-mode
;; text-mode
;; :size-limit-kb 1000)
;; (default nil)
dotspacemacs-line-numbers `relative
;; Code folding method. Possible values are `evil' and `origami'.
;; (default 'evil)
dotspacemacs-folding-method 'evil
;; If non-nil smartparens-strict-mode will be enabled in programming modes.
;; (default nil)
dotspacemacs-smartparens-strict-mode nil
;; If non-nil pressing the closing parenthesis `)' key in insert mode passes
;; over any automatically added closing parenthesis, bracket, quote, etc…
;; This can be temporary disabled by pressing `C-q' before `)'. (default nil)
dotspacemacs-smart-closing-parenthesis nil
;; Select a scope to highlight delimiters. Possible values are `any',
;; `current', `all' or `nil'. Default is `all' (highlight any scope and
;; emphasis the current one). (default 'all)
dotspacemacs-highlight-delimiters 'all
;; If non nil, advise quit functions to keep server open when quitting.
;; (default nil)
dotspacemacs-persistent-server nil
;; List of search tool executable names. Spacemacs uses the first installed
;; tool of the list. Supported tools are `ag', `pt', `ack' and `grep'.
;; (default '("ag" "pt" "ack" "grep"))
dotspacemacs-search-tools '("ag" "pt" "ack" "grep")
;; The default package repository used if no explicit repository has been
;; specified with an installed package.
;; Not used for now. (default nil)
dotspacemacs-default-package-repository nil
;; Delete whitespace while saving buffer. Possible values are `all'
;; to aggressively delete empty line and long sequences of whitespace,
;; `trailing' to delete only the whitespace at end of lines, `changed'to
;; delete only whitespace for changed lines or `nil' to disable cleanup.
;; (default nil)
dotspacemacs-whitespace-cleanup `trailing
))
(defun dotspacemacs/user-init ()
"Initialization function for user code.
It is called immediately after `dotspacemacs/init', before layer configuration
executes.
This function is mostly useful for variables that need to be set
before packages are loaded. If you are unsure, you should try in setting them in
`dotspacemacs/user-config' first."
;; Rebind <SPC>,q,q from spacemacs/prompt-kill-emacs to spacemacs/frame-killer
(evil-leader/set-key "q q" 'spacemacs/frame-killer)
)
(defun dotspacemacs/user-config ()
"Configuration function for user code.
This function is called at the very end of Spacemacs initialization after
layers configuration.
This is the place where most of your configurations should be done. Unless it is
explicitly specified that a variable should be set before a package is loaded,
you should place your code here."
;; Fixes NeoTree "cannot make side window the only window" error
;; https://github.com/jaypei/emacs-neotree/issues/226
(setq helm-split-window-in-side-p t)
;; Avoid the Creation of lockfiles ".#"
(setq create-lockfiles nil)
;; React Snippets Yasnippets
(require 'react-snippets)
;; REACT / HTML / CSS / JavaScript Indenting
(setq-default
;; js2-mode
js2-basic-offset 2
;; JSON
js-indent-level 2
;; web-mode
css-indent-offset 2
web-mode-markup-indent-offset 2
web-mode-css-indent-offset 2
web-mode-code-indent-offset 2
web-mode-attr-indent-offset 2)
;; Fix Web-Mode (and related modes like React)
;; Auto Completion. Do not start from 0 because Emmet
(setq-local company-minimum-prefix-length 2)
;; Let's use Ripgrep instead of Ag or Ack or Grep
(custom-set-variables
'(helm-ag-base-command "rg --no-heading"))
;; React's (Element's Attributes, Concatenations, Contiguous Function Calls)
(with-eval-after-load 'web-mode
(add-to-list 'web-mode-indentation-params '("lineup-args" . nil))
(add-to-list 'web-mode-indentation-params '("lineup-concats" . nil))
(add-to-list 'web-mode-indentation-params '("lineup-calls" . nil)))
;; Indenting Guide
(indent-guide-global-mode)
;; Automatically Line Wraps when opening a file (Org Mode)
(global-visual-line-mode 1)
;; Configure ORG TODO States
(setq org-todo-keywords
'((sequence "TODO" "DOING" "BLOCKED" "CANCELLED" "DONE")))
;; Fira code
;; This works when using emacs --daemon + emacsclient
(add-hook 'after-make-frame-functions (lambda (frame) (set-fontset-font t '(#Xe100 . #Xe16f) "Fira Code Symbol")))
;; This works when using emacs without server/client
(set-fontset-font t '(#Xe100 . #Xe16f) "Fira Code Symbol")
;; I haven't found one statement that makes both of the above situations work, so I use both for now
(defconst fira-code-font-lock-keywords-alist
(mapcar (lambda (regex-char-pair)
`(,(car regex-char-pair)
(0 (prog1 ()
(compose-region (match-beginning 1)
(match-end 1)
;; The first argument to concat is a string containing a literal tab
,(concat " " (list (decode-char 'ucs (cadr regex-char-pair)))))))))
'(("\\(www\\)" #Xe100)
("[^/]\\(\\*\\*\\)[^/]" #Xe101)
("\\(\\*\\*\\*\\)" #Xe102)
("\\(\\*\\*/\\)" #Xe103)
("\\(\\*>\\)" #Xe104)
("[^*]\\(\\*/\\)" #Xe105)
("\\(\\\\\\\\\\)" #Xe106)
("\\(\\\\\\\\\\\\\\)" #Xe107)
("\\({-\\)" #Xe108)
("\\(\\[\\]\\)" #Xe109)
("\\(::\\)" #Xe10a)
("\\(:::\\)" #Xe10b)
("[^=]\\(:=\\)" #Xe10c)
("\\(!!\\)" #Xe10d)
("\\(!=\\)" #Xe10e)
("\\(!==\\)" #Xe10f)
("\\(-}\\)" #Xe110)
("\\(--\\)" #Xe111)
("\\(---\\)" #Xe112)
("\\(-->\\)" #Xe113)
("[^-]\\(->\\)" #Xe114)
("\\(->>\\)" #Xe115)
("\\(-<\\)" #Xe116)
("\\(-<<\\)" #Xe117)
("\\(-~\\)" #Xe118)
("\\(#{\\)" #Xe119)
("\\(#\\[\\)" #Xe11a)
("\\(##\\)" #Xe11b)
("\\(###\\)" #Xe11c)
("\\(####\\)" #Xe11d)
("\\(#(\\)" #Xe11e)
("\\(#\\?\\)" #Xe11f)
("\\(#_\\)" #Xe120)
("\\(#_(\\)" #Xe121)
("\\(\\.-\\)" #Xe122)
("\\(\\.=\\)" #Xe123)
("\\(\\.\\.\\)" #Xe124)
("\\(\\.\\.<\\)" #Xe125)
("\\(\\.\\.\\.\\)" #Xe126)
("\\(\\?=\\)" #Xe127)
("\\(\\?\\?\\)" #Xe128)
("\\(;;\\)" #Xe129)
("\\(/\\*\\)" #Xe12a)
("\\(/\\*\\*\\)" #Xe12b)
("\\(/=\\)" #Xe12c)
("\\(/==\\)" #Xe12d)
("\\(/>\\)" #Xe12e)
("\\(//\\)" #Xe12f)
("\\(///\\)" #Xe130)
("\\(&&\\)" #Xe131)
("\\(||\\)" #Xe132)
("\\(||=\\)" #Xe133)
("[^|]\\(|=\\)" #Xe134)
("\\(|>\\)" #Xe135)
("\\(\\^=\\)" #Xe136)
("\\(\\$>\\)" #Xe137)
("\\(\\+\\+\\)" #Xe138)
("\\(\\+\\+\\+\\)" #Xe139)
("\\(\\+>\\)" #Xe13a)
("\\(=:=\\)" #Xe13b)
("[^!/]\\(==\\)[^>]" #Xe13c)
("\\(===\\)" #Xe13d)
("\\(==>\\)" #Xe13e)
("[^=]\\(=>\\)" #Xe13f)
("\\(=>>\\)" #Xe140)
("\\(<=\\)" #Xe141)
("\\(=<<\\)" #Xe142)
("\\(=/=\\)" #Xe143)
("\\(>-\\)" #Xe144)
("\\(>=\\)" #Xe145)
("\\(>=>\\)" #Xe146)
("[^-=]\\(>>\\)" #Xe147)
("\\(>>-\\)" #Xe148)
("\\(>>=\\)" #Xe149)
("\\(>>>\\)" #Xe14a)
("\\(<\\*\\)" #Xe14b)
("\\(<\\*>\\)" #Xe14c)
("\\(<|\\)" #Xe14d)
("\\(<|>\\)" #Xe14e)
("\\(<\\$\\)" #Xe14f)
("\\(<\\$>\\)" #Xe150)
("\\(<!--\\)" #Xe151)
("\\(<-\\)" #Xe152)
("\\(<--\\)" #Xe153)
("\\(<->\\)" #Xe154)
("\\(<\\+\\)" #Xe155)
("\\(<\\+>\\)" #Xe156)
("\\(<=\\)" #Xe157)
("\\(<==\\)" #Xe158)
("\\(<=>\\)" #Xe159)
("\\(<=<\\)" #Xe15a)
("\\(<>\\)" #Xe15b)
("[^-=]\\(<<\\)" #Xe15c)
("\\(<<-\\)" #Xe15d)
("\\(<<=\\)" #Xe15e)
("\\(<<<\\)" #Xe15f)
("\\(<~\\)" #Xe160)
("\\(<~~\\)" #Xe161)
("\\(</\\)" #Xe162)
("\\(</>\\)" #Xe163)
("\\(~@\\)" #Xe164)
("\\(~-\\)" #Xe165)
("\\(~=\\)" #Xe166)
("\\(~>\\)" #Xe167)
("[^<]\\(~~\\)" #Xe168)
("\\(~~>\\)" #Xe169)
("\\(%%\\)" #Xe16a)
;; ("\\(x\\)" #Xe16b) This ended up being hard to do properly so i'm leaving it out.
("[^:=]\\(:\\)[^:=]" #Xe16c)
("[^\\+<>]\\(\\+\\)[^\\+<>]" #Xe16d)
("[^\\*/<>]\\(\\*\\)[^\\*/<>]" #Xe16f))))
(defun add-fira-code-symbol-keywords ()
(font-lock-add-keywords nil fira-code-font-lock-keywords-alist))
(add-hook 'prog-mode-hook
#'add-fira-code-symbol-keywords)
;; Use Prettier when saving
(add-hook 'js2-mode-hook 'prettier-js-mode)
(add-hook 'web-mode-hook 'prettier-js-mode)
(setq prettier-js-args '(
"--single-quote"
"--print-width" "100"
"--no-semi" false
))
;; Fix separators
(setq ns-use-srgb-colorspace nil)
;; (setq powerline-default-separator 'utf-8)
;; Theme Customizations
(setq theming-modifications
'((solarized
;; Provide a sort of "on-off" modeline whereby the current buffer has a nice
;; bright blue background, and all the others are in cream.
;; TODO: Change to use variables here. However, got error:
;; (Spacemacs) Error in dotspacemacs/user-config: Wrong type argument: stringp, pd-blue
(mode-line :foreground "#e9e2cb" :background "#2075c7" :inverse-video nil)
(powerline-active1 :foreground "#e9e2cb" :background "#2075c7" :inverse-video nil)
(powerline-active2 :foreground "#e9e2cb" :background "#2075c7" :inverse-video nil)
(mode-line-inactive :foreground "#2075c7" :background "#e9e2cb" :inverse-video nil)
(powerline-inactive1 :foreground "#2075c7" :background "#e9e2cb" :inverse-video nil)
(powerline-inactive2 :foreground "#2075c7" :background "#e9e2cb" :inverse-video nil)
;; Make a really prominent helm selection line.
(helm-selection :foreground "white" :background "#2075c7" :inverse-video nil)
;; See comment above about dotspacemacs-colorize-cursor-according-to-state.
(cursor :background "#b58900")
)))
(set-terminal-parameter nil 'background-mode 'dark)
(set-frame-parameter nil 'background-mode 'dark)
(spacemacs/load-theme 'monokai)
)
;; Do not write anything past this comment. This is where Emacs will
;; auto-generate custom variable definitions.
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(evil-want-Y-yank-to-eol t)
'(helm-ag-base-command "rg --no-heading")
'(org-agenda-files
(quote
("~/productivity/Personal.org" "~/productivity/Developer-Workflow-Improvements.org" "~/productivity/Developer-Knowledge-Improvements.org" "~/productivity/movinga.org")))
'(package-selected-packages
(quote
(prettier-js markdown-mode inflections pcre2el spinner ob-elixir skewer-mode json-snatcher json-reformat parent-mode request haml-mode flycheck-mix flycheck-credo flx iedit anzu goto-chg undo-tree highlight autothemer web-completion-data company-terraform terraform-mode async helm-tramp nginx-mode dash ruby-hash-syntax react-snippets yasnippet-snippets company-quickhelp powerline multiple-cursors packed gitignore-mode avy git-commit flycheck-rust flycheck-pos-tip flycheck dotenv-mode phpunit phpcbf php-extras php-auto-yasnippets drupal-mode php-mode hydra projectile inf-ruby js2-mode s org-projectile org-category-capture org-present org-pomodoro alert log4e gntp org-mime org-download htmlize gnuplot yapfify pyvenv pytest pyenv-mode py-isort pip-requirements live-py-mode hy-mode helm-pydoc cython-mode company-anaconda anaconda-mode pythonic org-plus-contrib company smartparens evil helm helm-core yasnippet magit magit-popup ghub with-editor rake rust-mode simple-httpd define-word zenburn-theme zen-and-art-theme yaml-mode xterm-color ws-butler winum white-sand-theme which-key web-mode web-beautify volatile-highlights vmd-mode vi-tilde-fringe uuidgen use-package unfill underwater-theme ujelly-theme twilight-theme twilight-bright-theme twilight-anti-bright-theme toxi-theme toml-mode toc-org tao-theme tangotango-theme tango-plus-theme tango-2-theme tagedit sunny-day-theme sublime-themes subatomic256-theme subatomic-theme spaceline spacegray-theme soothe-theme solarized-theme soft-stone-theme soft-morning-theme soft-charcoal-theme smyx-theme smeargle slim-mode shell-pop seti-theme scss-mode sass-mode rvm ruby-tools ruby-test-mode rubocop rspec-mode robe reverse-theme reveal-in-osx-finder restart-emacs rebecca-theme rbenv rainbow-delimiters railscasts-theme racer purple-haze-theme pug-mode projectile-rails professional-theme popwin planet-theme phoenix-dark-pink-theme phoenix-dark-mono-theme persp-mode pbcopy paradox osx-trash osx-dictionary orgit organic-green-theme org-bullets open-junk-file omtose-phellack-theme oldlace-theme occidental-theme obsidian-theme noctilux-theme neotree naquadah-theme mwim mustang-theme multi-term move-text monokai-theme monochrome-theme molokai-theme moe-theme mmm-mode minitest minimal-theme material-theme markdown-toc majapahit-theme magit-gitflow madhat2r-theme macrostep lush-theme lorem-ipsum livid-mode linum-relative link-hint light-soap-theme launchctl json-mode js2-refactor js-doc jbeans-theme jazz-theme ir-black-theme inkpot-theme indent-guide hungry-delete hl-todo highlight-parentheses highlight-numbers highlight-indentation heroku-theme hemisu-theme helm-themes helm-swoop helm-projectile helm-mode-manager helm-make helm-gitignore helm-flx helm-descbinds helm-css-scss helm-company helm-c-yasnippet helm-ag hc-zenburn-theme gruvbox-theme gruber-darker-theme grandshell-theme gotham-theme google-translate golden-ratio gitconfig-mode gitattributes-mode git-timemachine git-messenger git-link gh-md geiser gandalf-theme fuzzy flx-ido flatui-theme flatland-theme fill-column-indicator feature-mode farmhouse-theme fancy-battery eyebrowse expand-region exotica-theme exec-path-from-shell evil-visualstar evil-visual-mark-mode evil-unimpaired evil-tutor evil-surround evil-search-highlight-persist evil-numbers evil-nerd-commenter evil-mc evil-matchit evil-magit evil-lisp-state evil-indent-plus evil-iedit-state evil-exchange evil-escape evil-ediff evil-args evil-anzu eval-sexp-fu espresso-theme eshell-z eshell-prompt-extras esh-help emmet-mode elisp-slime-nav dumb-jump dracula-theme django-theme diminish darktooth-theme darkokai-theme darkmine-theme darkburn-theme dakrone-theme cyberpunk-theme company-web company-tern company-statistics column-enforce-mode color-theme-sanityinc-tomorrow color-theme-sanityinc-solarized coffee-mode clues-theme clean-aindent-mode chruby cherry-blossom-theme cargo busybee-theme bundler bubbleberry-theme birds-of-paradise-plus-theme badwolf-theme auto-yasnippet auto-highlight-symbol auto-compile apropospriate-theme anti-zenburn-theme ample-zen-theme ample-theme alect-themes aggressive-indent afternoon-theme adaptive-wrap ace-window ace-link ace-jump-helm-line ac-ispell)))
'(tramp-default-host "" nil (tramp))
'(tramp-syntax (quote default) nil (tramp)))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)
" ===== Fundamentals ============
set nocompatible " Use Vim instead of Vi
set modelines=0 " Prevent modeline security issues
set hidden " Manage multiple buffers effectively
let mapleader="," " Change leader to a comma, easier to type
filetype off " Vundle Require
" ===== Amenities ===============
set relativenumber " Relative Numbering on the side
set number " Precise number on the exact line
set showcmd " Incomplete commands on the bottom
set showmode " Show current mode down the bottom
set gcr=a:blinkon0 " Disable cursor blink
set visualbell " No sounds
set autoread " Reload files on file change outside Vim
set backspace=indent,eol,start " Backspace behavior compatibility
set cursorline " Highlights current line
set ttyfast " Optimized speed to terminal (BS)
set ruler " Display ruler at the bottom
set laststatus=2 " Always displays the status line
" ===== Powerline =================
let g:lightline = {
\ 'colorscheme': 'powerline',
\ 'active': {
\ 'right': [ [ 'lineinfo' ],
\ [ 'percent' ],
\ [ 'fileformat', 'fileencoding', 'filetype', 'charvaluehex' ] ],
\ 'left': [ [ 'mode', 'paste' ],
\ [ 'gitbranch', 'readonly', 'filename', 'modified' ] ]
\ },
\ 'component': {
\ 'charvaluehex': '0x%B',
\ },
\ 'component_function': {
\ 'gitbranch': 'fugitive#statusline'
\ },
\ }
" Make it beautiful - colors and fonts
if has("gui_running")
"tell the term has 256 colors
set t_Co=256
" Show tab number (useful for Cmd-1, Cmd-2.. mapping)
autocmd VimEnter * set guitablabel=%N:\ %t\ %M
set lines=60
set columns=190
if has("gui_gtk2")
set guifont=Inconsolata\ XL\ 12,Inconsolata\ 15,Monaco\ 12
else
set guifont=Inconsolata\ XL:h14,Inconsolata:h16,Monaco:h14
end
else
let g:CSApprox_loaded = 1
" For people using a terminal that is not Solarized
if exists("g:yadr_using_unsolarized_terminal")
let g:solarized_termcolors=256
let g:solarized_termtrans=1
end
endif
" ===== Fuzzy Search (CTRLP) ===========
let g:ctrlp_user_command = ['.git/', 'git --git-dir=%s/.git ls-files -oc --exclude-standard']
" ===== Abbreviations ===========
" so ~/.vim/bundle/abbr/plugin/abbr.vim "rlb, rld, pry!, cl!
" Disable the scrollbars (NERDTree)
set guioptions-=r
set guioptions-=L
" Disable the macvim toolbar
set guioptions-=T
" ===== Scrolling ===============
set scrolloff=8 " Scroll when 8 lines away from margins
set sidescrolloff=15 " How near the cursor must come to the border
set sidescroll=3 " How many chars to move
" ===== Handling Files ==========
set encoding=utf-8 " UTF-8 Encoding to avoid server issues
set noswapfile " Avoid using Swap Files. Text is in memory
set nobackup " Prevent Backup files
set nowb " Prevent Backup files
set history=1000 " Amount of :cmdline history
" ===== Searching ===============
set ignorecase " Ignore search case, if all-lowercase
set smartcase " Follow search case, if mixed cases
set gdefault " Substitutions are global by default no need for /g
set incsearch " Find the next match as we type
set showmatch " Jump to the matching brace {[( when inserting one
set matchtime=3 " Timing to jump to matching brace
set hlsearch " Highlight searches by default
set tags=tags " Set the cTags directory
" ===== Persistent Undo =========
" Keep undo history across sessions, by storing in file.
if has('persistent_undo') && !isdirectory(expand('~').'/.vim/backups')
silent !mkdir ~/.vim/backups > /dev/null 2>&1
set undodir=~/.vim/backups
set undofile
endif
" ===== Indentation =============
set expandtab " Transform Tabs into spaces
set tabstop=2 " Expand Tabs to 2 spaces
set softtabstop=2 "
set shiftwidth=2 " Reindent Operations using << and >>
set autoindent " Copy indent from current line on the next line
set smartindent " Match braces indentation (inside blocks)
set smarttab "
nnoremap p p=`]<C-o> " Autoindent pasted text with p
nnoremap P P=`]<C-o> " Autoindent pasted text with P
" ===== Folds ===================
set foldmethod=indent " Fold based on indent
set foldnestmax=9 " Deepest fold is 3 levels
set nofoldenable " Dont fold by default
" ===== Completion ==============
set wildmenu " Menu at the bottom of the window Ctrl-n Ctrl-p
set wildmode=list:longest " Recursive matching of command
set wildignore=*.o,*.obj,*~ " IGNORE FILES:
set wildignore+=*vim/backups*
set wildignore+=*sass-cache*
set wildignore+=*DS_Store*
set wildignore+=vendor/rails/**
set wildignore+=vendor/cache/**
set wildignore+=*.gem
set wildignore+=log/**
set wildignore+=tmp/**
set wildignore+=*.png,*.jpg,*.gif
set wildignore+=*/tmp/*,*.so,*.swp,*.zip
set wildignore+=_build/**
" ===== FORCE hjkl ==============
nnoremap <up> :bn<CR>
nnoremap <down> :bp<CR>
nnoremap <left> :tabp<CR>
nnoremap <right> :tabn<CR>
inoremap <up> <nop>
inoremap <down> <nop>
inoremap <left> <nop>
inoremap <right> <nop>
nnoremap j gj
nnoremap k gk
" ===== Move around brackets ====
nnoremap <leader><space> :noh<cr>
nnoremap <tab> %
vnoremap <tab> %
" ===== Line Wrapping ===========
set wrap
set textwidth=80
set formatoptions=qrn1
" set colorcolumn=85
" ===== Invisible Characters ====
set list
set listchars=tab:\ \ ,trail:·
" ===== VUNDLE ==================
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" Let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
" The best git wrapper of all time
Plugin 'tpope/vim-fugitive'
Plugin 'jreybert/vimagit'
" A light and configurable statusline/tabline
Plugin 'itchyny/lightline.vim'
Plugin 'itchyny/vim-gitbranch'
" Colorthemes
Plugin 'flazz/vim-colorschemes'
" Extends the matchability of the % key
Plugin 'vim-scripts/matchit.zip'
" Autocomplete brackets and whatnot
Plugin 'jiangmiao/auto-pairs'
" Autocomplete or 'Wisely End' Blocks
Plugin 'tpope/vim-endwise.git'
" Runs RSpec from within Vim
Plugin 'skwp/vim-iterm-rspec'
" A Front for ag, the_silver_searcher
Plugin 'rking/ag.vim'
Plugin 'jremmen/vim-ripgrep'
" Emmet HTML Autocompletion
Plugin 'mattn/emmet-vim'
" Full path fuzzy file, buffer, mru, tag,... finder
Plugin 'ctrlpvim/ctrlp.vim'
" Mappings to easily delete, change and add blocks
Plugin 'tpope/vim-surround'
" Remaps . (dot) in a way that plugins can tap into it
Plugin 'tpope/vim-repeat'
" NERDTree Directory and Files Explorer
Plugin 'scrooloose/nerdtree'
" NERDTree Tabs
Plugin 'jistr/vim-nerdtree-tabs'
" SplitJoin code: Blocks and Tags
Plugin 'AndrewRadev/splitjoin.vim'
" Tabularize and Indent Code
Plugin 'godlygeek/tabular'
" Autocomplete Languages Syntax
Plugin 'Shougo/neocomplete.git'
" Allow Multiple Cursors and multline editing
Plugin 'kristijanhusak/vim-multiple-cursors'
" Open Remote Terminal Sessions
Plugin 'christoomey/vim-tmux-navigator'
" Refreshes the tags on file save
Plugin 'ludovicchabant/vim-gutentags'
" LANGUAGE SPECIFIC FILES HANDLED BY POLYGLOT
Plugin 'sheerun/vim-polyglot'
" RUBY ON RAILS Specific Plugins
" ******************************
" Extracting Methods and Renaming Variables
Plugin 'ecomba/vim-ruby-refactoring'
" Improved Syntax Highlighting for RSpec
Plugin 'keith/rspec.vim'
" Ruby Snippets
Plugin 'MarcWeber/vim-addon-mw-utils'
Plugin 'tomtom/tlib_vim'
Plugin 'garbas/vim-snipmate'
" Easy navigation of the Rails directory structure
Plugin 'tpope/vim-rails'
" ERLANG Specific Plugins
" ***********************
Plugin 'vim-erlang/vim-erlang-compiler'
Plugin 'vim-erlang/vim-erlang-omnicomplete'
Plugin 'vim-erlang/vim-erlang-tags'
" ELIXIR / PHOENIX Specific Plugins
" *********************************
" Elixir Project's Information
Plugin 'slashmili/alchemist.vim'
let g:alchemist_tag_disable = 1
" For auto completion press <C-x><C-o> while your are in INSERT mode.
Plugin 'c-brenn/phoenix.vim'
Plugin 'tpope/vim-projectionist'
" Autocompletion Snippets
" They are installed to ~/.vim/bundle/vim-snippets/snippets
" We must make a ln -s THATDIR ~/.vim/snippets
Plugin 'honza/vim-snippets'
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
" ===== Bundle's Settings =========
so ~/.vim/bundle/ag.vim/plugin/ag.vim
so ~/.vim/bundle/ctrlp.vim/plugin/ctrlp.vim
so ~/.vim/bundle/lightline.vim/plugin/lightline.vim
so ~/.vim/bundle/neocomplete/plugin/neocomplete.vim
so ~/.vim/bundle/nerdtree/plugin/NERD_tree.vim
so ~/.vim/bundle/vim-surround/plugin/surround.vim
so ~/.vim/bundle/vim-fugitive/plugin/fugitive.vim
so ~/.vim/bundle/vim-iterm-rspec/plugin/iterm-rspec.vim
so ~/.vim/bundle/vim-multiple-cursors/plugin/multiple_cursors.vim
so ~/.vim/bundle/vim-rails/plugin/rails.vim
so ~/.vim/bundle/vim-ruby-refactoring/plugin/ruby-refactoring.vim
" ===== Styling =================
syntax enable " Syntax highlighting
set background=dark " Dark Background
set noshowmode " Hide additonal --INSERT-- (unnecessary)
colorscheme solarized " Set Theme
" ===== Custom Keymaps =========
" No F1 Key, thanks
inoremap <F1> <ESC>
nnoremap <F1> <ESC>
vnoremap <F1> <ESC>
" NERDTree Toggle
map <space>ft :NERDTreeToggle<CR>
" List open Buffers
map <space>bb :buffers<CR>
" Ripgrep/Find text in project
nnoremap <space>sp :Rg<space>
" Find file by filename
nnoremap <space>pf :CtrlP<CR>
" Start Magit
nnoremap <space>gs :Magit<CR>
" Fast trailing whitespace stripping
nnoremap <leader>W :%s/\s\+$//<cr>:let @/=''<CR>
" Fold HTML Tags
nnoremap <leader>ft Vatzf
" Expand HTML Tags and CSS Properties with TAB (Emmet)
imap <expr> <tab> emmet#expandAbbrIntelligent("\<tab>")
" Sort CSS Properties
nnoremap <leader>S ?{<CR>jV/^\s*\}?$<CR>k:sort<CR>:noh<CR>
" Quick Escaping
inoremap jj <ESC>
" Open New Vertical Split and switch
nnoremap <space>wV <C-w>v<C-w>l
" Open New Horizontal Split and switch
nnoremap <space>wS :split<CR><C-w>j
" Easily Navigate Splits
nnoremap <C-h> <C-w>h
nnoremap <C-j> <C-w>j
nnoremap <C-k> <C-w>k
nnoremap <C-l> <C-w>l
" One window only
nnoremap <leader>o :only<cr>
" Tabularize and align
nmap <Leader>a= :Tabularize /=<CR>
vmap <Leader>a= :Tabularize /=<CR>
nmap <Leader>a: :Tabularize /:\zs<CR>
vmap <Leader>a: :Tabularize /:\zs<CR>
nmap <C-g> :Tabularize /,\zs<CR>
vmap <C-g> :Tabularize /,\zs<CR>
nmap <Leader>a! :%g/^\s*[^#]/Tabularize /,<CR>
vmap <Leader>a! :%g/^\s*[^#]/Tabularize /,<CR>
" Make 0 go to the first character rather than the beginning
" of the line. When we're programming, we're almost always
" interested in working with text rather than empty space. If
" you want the traditional beginning of line, use ^
nnoremap 0 ^
nnoremap ^ 0
" ===== Vim Surround =========
" Surround a word with #{ruby interpolation}
map ,# ysiw#
vmap ,# c#{<C-R>"}<ESC>
" ERB Tags with <c-s> or Visual Block + S = or S -
let b:surround_{char2nr('=')} = "<%= \r %>"
let b:surround_{char2nr('-')} = "<% \r %>"
map ," ysiw"
map ,2" ysiW"
vmap ," c"<C-R>""<ESC>
" ,' Surround a word with 'single quotes'
map ,' ysiw'
vmap ,' c'<C-R>"'<ESC>
" ,) or ,( Surround a word with (parens)
" The difference is in whether a space is put in
map ,( ysiw(
map ,) ysiw)
vmap ,( c( <C-R>" )<ESC>
vmap ,) c(<C-R>")<ESC>
" ,[ Surround a word with [brackets]
map ,] ysiw]
map ,[ ysiw[
vmap ,[ c[ <C-R>" ]<ESC>
vmap ,] c[<C-R>"]<ESC>
" ,{ Surround a word with {braces}
map ,} ysiw}
map ,{ ysiw{
vmap ,} c{ <C-R>" }<ESC>
vmap ,{ c{<C-R>"}<ESC>
map ,` ysiw`
" gary bernhardt's hashrocket
imap <c-l> <space>=><space>
"Go to last edit location with ,.
nnoremap ,. '.
" the first quote will autoclose so you'll get 'foo' and hitting <c-a> will
" put the cursor right after the quote
imap mmm <esc>wa
" select current line
nmap ,l 0vg_
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
# Paths
export PATH="/usr/local/bin:/usr/bin:/bin:$HOME/npm/bin:$HOME/bin:/opt/local/bin"
# Add RVM to PATH for scripting. Make sure this is the last PATH variable change.
export PATH="$PATH:$HOME/.rvm/bin"
# username that determines your Users/username path
username="add your user name here"
# Path to your oh-my-zsh installation.
export ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
ZSH_THEME="agnoster"
# Uncomment the following line to disable auto-setting terminal title.
export DISABLE_AUTO_TITLE="true"
# Uncomment the following line to enable command auto-correction.
ENABLE_CORRECTION="true"
# Uncomment the following line to display red dots whilst waiting for completion.
COMPLETION_WAITING_DOTS="true"
# Uncomment the following line if you want to change the command execution time
# stamp shown in the history command output.
# The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
HIST_STAMPS="mm/dd/yyyy"
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
plugins=(docker javascript git)
source $ZSH/oh-my-zsh.sh
# ssh
# export SSH_KEY_PATH="~/.ssh/dsa_id"
# Set personal aliases, overriding those provided by oh-my-zsh libs,
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
# For a full list of active aliases, run `alias`.
#
# Cool Navigation featurettes
source $HOME/z.sh
# Amazon CLI autocompletion
source /usr/local/share/zsh/site-functions/_aws
# Easily switch iTerm's Tab Colors
function color {
case $1 in
red)
echo -e "\033]6;1;bg;red;brightness;270\a"
echo -e "\033]6;1;bg;green;brightness;60\a"
echo -e "\033]6;1;bg;blue;brightness;83\a"
;;
yellow)
echo -e "\033]6;1;bg;red;brightness;255\a"
echo -e "\033]6;1;bg;green;brightness;255\a"
echo -e "\033]6;1;bg;blue;brightness;0\a"
;;
blue)
echo -e "\033]6;1;bg;red;brightness;20\a"
echo -e "\033]6;1;bg;green;brightness;50\a"
echo -e "\033]6;1;bg;blue;brightness;255\a"
;;
purple)
echo -e "\033]6;1;bg;red;brightness;186\a"
echo -e "\033]6;1;bg;green;brightness;85\a"
echo -e "\033]6;1;bg;blue;brightness;211\a"
;;
green)
echo -e "\033]6;1;bg;red;brightness;0\a"
echo -e "\033]6;1;bg;green;brightness;255\a"
echo -e "\033]6;1;bg;blue;brightness;0\a"
;;
esac
}
# Easily switch iTerm's Tab Title
function title {
echo -ne "\033]0;"$*"\007"
}
DEFAULT_USER=username
prompt_context(){}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment