├── .Rprofile
├── .Xdefaults
├── .ackrc
├── .bluetilerc
├── .cider
└── bootstrap.json
├── .config
├── awesome
│ └── rc.lua
├── console2
│ └── console.xml
├── iterm
│ └── Arch.itermcolors
├── karabiner
│ └── private.xml
└── pms
│ └── rc
├── .ctags
├── .git_excludes
├── .git_template
└── hooks
│ ├── ctags
│ ├── post-checkout
│ ├── post-commit
│ ├── post-merge
│ └── post-rewrite
├── .gitconfig
├── .gitignore
├── .gitmodules
├── .irssi
├── config
├── default.theme
└── scripts
│ ├── autorun
│ ├── identify.pl
│ ├── nickcolor.pl
│ ├── notifier.pl
│ ├── trackbar.pl
│ └── windowlist.pl
│ ├── identify.pl
│ ├── nickcolor.pl
│ ├── notifier.pl
│ ├── trackbar.pl
│ └── windowlist.pl
├── .latexmkrc
├── .nvim
├── .nvimrc
├── .phoenix.js
├── .pylintrc
├── .pyrc
├── .spacemacs.d
└── init.el
├── .ssh
└── config
├── .tigrc
├── .tmux.conf
├── .tmuxinator
├── .vimrc
├── .weechat
└── irc.conf
├── .xmodmap-poker
├── .xmodmap-vim
├── .zshenv
├── .zshrc
├── .zshrc-amazon
├── README.md
├── TODO.md
└── bin
├── Arch
└── monitors.sh
├── Mac
├── backup.sh
└── updateServices.sh
├── colors.sh
├── deepThought.sh
├── install_dotfiles.sh
├── openl.py
├── reattach.sh
├── repeat.sh
├── test-runner
└── woodo
/.Rprofile:
--------------------------------------------------------------------------------
1 | #
2 | # .RProfile for R Startup
3 | # Links:
4 | # http://stackoverflow.com/questions/1189759/expert-r-users-whats-in-your-rprofile
5 | #
6 |
7 | #
8 | # Disable ask on quit:
9 | # Source:
10 | # http://stackoverflow.com/a/4996252
11 | #
12 |
13 | # Set hook to be run when Defaults is attached
14 | setHook(packageEvent('Defaults', 'attach'),
15 | function(...) {
16 | setDefaults(q, save='no')
17 | useDefaults(q)
18 | })
19 |
20 | # Add Defaults to the default packages loaded on startup
21 | old <- getOption('defaultPackages')
22 | options(defaultPackages = c(old, 'Defaults'))
23 |
24 | #
25 | # Always use US Repo
26 | # Source:
27 | # http://stackoverflow.com/a/1189826
28 | #
29 |
30 | r <- getOption('repos')
31 | r['CRAN'] <- 'http://cran.us.r-project.org'
32 | options(repos = r)
33 | rm(r)
34 |
--------------------------------------------------------------------------------
/.Xdefaults:
--------------------------------------------------------------------------------
1 | ! File: ~/.Xdefaults
2 | !
3 | !fonts
4 | #URxvt.font: xft:cure:pixelsize=10
5 | #URxvt.boldFont: xft:cure:pixelsize=10
6 | #URxvt.boldFont: xft:Terminus:pixelsize=14
7 | #URxvt.font: xft:Bitstream Vera Sans Mono-8.5:pixelsize=12
8 | URxvt.font: xft:Inconsolata for Powerline:pixelsize=14
9 | #URxvt.font: xft:Dina:pixelsize=12
10 | #URxvt.font: xft:Terminus:pixelsize=14
11 |
12 | !dzen2
13 | dzen2.font: xft:Monaco:pixelsize=8
14 | dzen2.background: white
15 | dzen2.foreground: #ececec
16 |
17 | !urxvt
18 | URxvt.title: terminal
19 | URxvt.perl-ext-common: default,matcher
20 | URxvt.urlLauncher: chromium-browser
21 | URxvt.matcher.button: 1
22 | URxvt.matcher.pattern.1: \\bwww\\.[\\w-]\\.[\\w./?&@#-]*[\\w/-]
23 | URxvt.urgentOnBell: true
24 |
25 | !general
26 | *utf8: 1
27 | *faceSize: 12
28 | *jumpScroll: true
29 | *multiScroll: true
30 | *boldMode: true
31 | *borderless: true
32 | *scrollBar: false
33 | *cutNewline: false
34 | *scrollTtyOutput: false
35 | *scrollKey: true
36 | *cursorBlink: true
37 | *dynamicColors: false
38 | *saveLines: 3000
39 | *geometry: 80x24
40 |
41 | !xft hinting
42 | Xft.antialias:true
43 | Xft.dpi:96
44 | Xft.hinting:true
45 | ! hintslight | hintsmedium | hintsfull
46 | Xft.hintstyle:hintsfull
47 | ! rgba subpixel hinting (for LCDs)
48 | Xft.rgba:subpixel
49 |
50 | !transparency
51 | *inheritPixmap: true
52 | !*shading: 42
53 | *shading: 15
54 | !*shading: 1
55 |
56 | *foreground: white
57 | *background: black
58 | ! Black + DarkGrey
59 | *color0: #000000
60 | *color8: #555753
61 | ! DarkRed + Red
62 | *color1: #ff6565
63 | *color9: #ff8d8d
64 | ! DarkGreen + Green
65 | *color2: #93d44f
66 | *color10: #c8e7a8
67 | ! DarkYellow + Yellow
68 | *color3: #eab93d
69 | *color11: #ffc123
70 | ! DarkBlue + Blue
71 | *color4: #204a87
72 | *color12: #0b8bff
73 | ! DarkMagenta + Magenta
74 | *color5: #ce5c00
75 | *color13: #f57900
76 | ! DarkCyan + Cyan
77 | *color6: #89b6e2
78 | *color14: #46a4ff
79 | ! LightGrey + White
80 | *color7: #cccccc
81 | *color15: #ffffff
82 |
83 |
84 | !cursor
85 | Xcursor.theme: neutral
86 |
87 | ! xscreensaver ---------------------------------------------------------------
88 |
89 | !font settings
90 | xscreensaver.Dialog.headingFont: -*-dina-bold-r-*-*-12-*-*-*-*-*-*-*
91 | xscreensaver.Dialog.bodyFont: -*-dina-medium-r-*-*-12-*-*-*-*-*-*-*
92 | xscreensaver.Dialog.labelFont: -*-dina-medium-r-*-*-12-*-*-*-*-*-*-*
93 | xscreensaver.Dialog.unameFont: -*-dina-medium-r-*-*-12-*-*-*-*-*-*-*
94 | xscreensaver.Dialog.buttonFont: -*-dina-bold-r-*-*-12-*-*-*-*-*-*-*
95 | xscreensaver.Dialog.dateFont: -*-dina-medium-r-*-*-12-*-*-*-*-*-*-*
96 | xscreensaver.passwd.passwdFont: -*-dina-bold-r-*-*-12-*-*-*-*-*-*-*
97 | !general dialog box (affects main hostname, username, password text)
98 | xscreensaver.Dialog.foreground: #ffffff
99 | xscreensaver.Dialog.background: #111111
100 | xscreensaver.Dialog.topShadowColor: #111111
101 | xscreensaver.Dialog.bottomShadowColor: #111111
102 | xscreensaver.Dialog.Button.foreground: #666666
103 | xscreensaver.Dialog.Button.background: #ffffff
104 | !username/password input box and date text colour
105 | xscreensaver.Dialog.text.foreground: #ffffff
106 | xscreensaver.Dialog.text.background: #666666
107 | xscreensaver.Dialog.internalBorderWidth:24
108 | xscreensaver.Dialog.borderWidth: 10
109 | xscreensaver.Dialog.shadowThickness: 2
110 | !timeout bar (background is actually determined by Dialog.text.background)
111 | xscreensaver.passwd.thermometer.width: 0
112 | !datestamp format--see the strftime(3) manual page for details
113 | xscreensaver.dateFormat: %I:%M%P %a %b %d, %Y
114 |
--------------------------------------------------------------------------------
/.ackrc:
--------------------------------------------------------------------------------
1 | --smart-case
2 |
3 | --type-add=md:ext:md,mkd
4 |
5 | # Ignore modules for Node
6 | --ignore-dir=node_modules/
7 |
8 | # Ignore ENV for Python
9 | --ignore-dir=ENV/
10 |
11 | # Ignore _site for Jekyll
12 | --ignore-dir=_site/
13 |
14 | # Ignore .deps for Moonrocks
15 | --ignore-dir=.deps/
16 |
17 | # For NPM projects
18 | --ignore-dir=.nyc_output/
19 |
20 | # For test coverage
21 | --ignore-dir=coverage
22 |
--------------------------------------------------------------------------------
/.bluetilerc:
--------------------------------------------------------------------------------
1 | # This is your Bluetile configuration file.
2 | # Use this file to make changes to the default configuration.
3 | # You can see all the defaults in the file
4 | # /usr/share/bluetile/etc/bluetilerc
5 | #
6 | # Below are a few examples - note: Mod1 is usually the Alt key.
7 | # Run 'bluetile --list-identifiers' to see a complete list of all
8 | # possibile modifier and key names.
9 |
10 | start_dock: false
11 | terminal: urxvt
12 | #default_modifier: Mod1
13 | #key_launch_terminal: DefaultMod+Shift+Return
14 |
15 | # blue-ish theme where the focused window stands out more
16 | #decoration_focused_color = #7ca3d3
17 | #decoration_focused_text_color = white
18 | #decoration_focused_border_color = white
19 | #decoration_normal_color = #e3e2e1
20 | #decoration_normal_text_color = black
21 | #decoration_normal_border_color = black
22 | #decoration_font = xft: Sans Bold:size=9
23 | #window_border_focused_color = black
24 | #window_border_normal_color = gray
25 |
--------------------------------------------------------------------------------
/.cider/bootstrap.json:
--------------------------------------------------------------------------------
1 | {
2 | "casks": [
3 | "adium",
4 | "alfred",
5 | "amethyst",
6 | "anki",
7 | "appcleaner",
8 | "audacity (!)",
9 | "betterzipql",
10 | "bittorrent-sync",
11 | "brain-workshop",
12 | "calibre",
13 | "dash",
14 | "deluge",
15 | "dropbox",
16 | "evernote",
17 | "f-lux (!)",
18 | "firefox",
19 | "gifrocket",
20 | "github",
21 | "github (!)",
22 | "gog-downloader",
23 | "google-app-engine-launcher (!)",
24 | "google-chrome",
25 | "google-drive",
26 | "grandperspective",
27 | "gyazo",
28 | "handbrake",
29 | "hex-fiend",
30 | "hopper-disassembler",
31 | "imageoptim",
32 | "induction (!)",
33 | "iterm2",
34 | "lastfm",
35 | "macvim",
36 | "mailplane",
37 | "mamp",
38 | "mjolnir",
39 | "mou",
40 | "mplayerx",
41 | "origin",
42 | "pg-commander",
43 | "pgadmin (!)",
44 | "phoenix",
45 | "phoenix (!)",
46 | "qlcolorcode",
47 | "qlmarkdown",
48 | "qlprettypatch",
49 | "qlstephen",
50 | "quicklook-csv",
51 | "quicklook-json",
52 | "rdio",
53 | "rstudio",
54 | "second-life-viewer",
55 | "seil",
56 | "selfcontrol",
57 | "sequel-pro",
58 | "skim",
59 | "skype",
60 | "slate",
61 | "sourcetree",
62 | "sublime-text",
63 | "suspicious-package",
64 | "synergy",
65 | "synergy (!)",
66 | "texshop",
67 | "textmate",
68 | "transmission",
69 | "tunnelblick",
70 | "vagrant",
71 | "versions",
72 | "virtualbox",
73 | "vlc",
74 | "webp-quicklook",
75 | "webp-quicklook (!)",
76 | "xld",
77 | "ynab"
78 | ],
79 | "formulas": [
80 | "ack",
81 | "ansible",
82 | "autoconf",
83 | "automake",
84 | "boot2docker",
85 | "brew-cask",
86 | "capstone",
87 | "cloc",
88 | "cloog",
89 | "cmake",
90 | "cscope",
91 | "ctags",
92 | "docker",
93 | "fish",
94 | "gcc",
95 | "gdbm",
96 | "gist",
97 | "git",
98 | "gmp",
99 | "gnupg",
100 | "gnutls",
101 | "go",
102 | "gtk+",
103 | "htop-osx",
104 | "httpie",
105 | "isl",
106 | "jrnl",
107 | "libevent",
108 | "libewf",
109 | "libgcrypt",
110 | "libgpg-error",
111 | "libmagic",
112 | "libmpc",
113 | "libtasn1",
114 | "libtool",
115 | "libyaml",
116 | "little-cms2",
117 | "lua51",
118 | "macvim",
119 | "makedepend",
120 | "mpfr",
121 | "msgpack",
122 | "neovim",
123 | "nettle",
124 | "node",
125 | "openjpeg",
126 | "openssl",
127 | "ossp-uuid",
128 | "pcre",
129 | "pkg-config",
130 | "poppler",
131 | "postgresql",
132 | "py2cairo",
133 | "pygobject",
134 | "pygtk",
135 | "python",
136 | "python3",
137 | "r",
138 | "radare2",
139 | "ranger",
140 | "rbenv",
141 | "readline",
142 | "ruby-build",
143 | "rust",
144 | "scons",
145 | "sqlite",
146 | "tig",
147 | "tmux",
148 | "vim",
149 | "weechat",
150 | "wget",
151 | "xz",
152 | "zsh",
153 | "zsh-completions"
154 | ],
155 | "taps": [
156 | "caskroom/cask",
157 | "homebrew/dupes",
158 | "homebrew/games",
159 | "homebrew/python",
160 | "homebrew/science",
161 | "neovim/neovim"
162 | ]
163 | }
--------------------------------------------------------------------------------
/.config/awesome/rc.lua:
--------------------------------------------------------------------------------
1 | -- Standard awesome library
2 | require("awful")
3 | require("awful.autofocus")
4 | require("awful.rules")
5 | -- For the Volume widget
6 | require("volume")
7 | -- Theme handling library
8 | require("beautiful")
9 | -- Notification library
10 | require("naughty")
11 | --Wiget Library
12 | require("vicious")
13 | -- awesoMPD Widget
14 | --require("awesompd/awesompd")
15 |
16 | -- {{{ Variable definitions
17 | -- Themes define colours, icons, and wallpapers
18 | beautiful.init("/usr/share/awesome/themes/blind-alien/theme.lua")
19 |
20 | -- Env variables
21 | home = os.getenv("HOME")
22 |
23 | -- This is used later as the default terminal and editor to run.
24 | terminal = "urxvt"
25 | editor = os.getenv("EDITOR") or "nano"
26 | editor_cmd = terminal .. " -e " .. editor
27 |
28 | -- Enable or disable widgets:
29 | -- You also have to edit the wiboxes!
30 | useSysInfo = true
31 | usePacman = true
32 | useMpd = true
33 | useWifi = true
34 | useNet = true
35 | useBat = true
36 | useCpu = true
37 | useMem = true
38 | useTemp = true
39 | -----------------
40 |
41 | -- Widget Settings
42 | cpuCores = 2 --Number of CPU Cores
43 | thermalZone = "coretemp.0" --Thermal Zone to read cpu temperature from (check vicious docu)
44 | thermalData = "core" --Data Source: "proc", "core" or "sys"
45 | netAdapter = "wlan0" --Network adapter to monitor
46 | wifiAdapter = "wlan0" --Wifi adapter for wifi widget
47 | pacUpdate = "yaourt -Sy" --Command to update pacman cache
48 | pacUpgrade = "yaourt -Su" --Command to upgrade system
49 | networkManager = terminal .. " -e wicd-curses"
50 | battery = "BAT0" --Battery to monitor
51 | widthMpd = 420 --Width of MPD widget
52 | -----------------
53 |
54 | -- Widget update intervals in seconds
55 | updateCpu = 5
56 | updatePac = 1801
57 | updateMpd = 1
58 | updateWifi = 7
59 | updateNet = 1
60 | updateBat = 31
61 | updateMem = 7
62 | -----------------
63 |
64 | -- For Dual-Screen setups:
65 | -- Set "dualScreen" to "2" if you want a different, optimized widget layout for every screen.
66 | -- If you set it to "-1" it will copy the same widget layout to both screens. (default Awesome behavior)
67 | dualScreen = 2
68 | -----------------
69 |
70 |
71 | screencount = screen.count()
72 |
73 | -- Default modkey.
74 | -- Usually, Mod4 is the key with a logo between Control and Alt.
75 | -- If you do not like this or do not have such a key,
76 | -- I suggest you to remap Mod4 to another key using xmodmap or other tools.
77 | -- However, you can use another modifier like Mod1, but it may interact with others.
78 | modkey = "Mod4"
79 |
80 | -- Table of layouts to cover with awful.layout.inc, order matters.
81 | layouts =
82 | {
83 | awful.layout.suit.tile,
84 | awful.layout.suit.tile.left,
85 | awful.layout.suit.tile.bottom,
86 | awful.layout.suit.tile.top,
87 | awful.layout.suit.fair,
88 | awful.layout.suit.fair.horizontal,
89 | awful.layout.suit.magnifier,
90 | awful.layout.suit.floating,
91 | awful.layout.suit.max
92 | }
93 | -- }}}
94 |
95 | -- {{{ Tags
96 |
97 | -- Define a tag table which will hold all screen tags.
98 | tags = {
99 | --names = { "1", "2", "3", "4", "5", "6"},
100 | --names = { "⌘", "♐", "⌥", "ℵ"},
101 | --names = { "⠪", "⠫", "⠬", "⠭", "⠮", "⠳"},
102 | names = { "⠐", "⠡", "⠪", "⠵", "⠻", "⠿" },
103 | --names = { " ∙", "⠡", "⠲", "⠵", "⠻", "⠿"},
104 | --names = { " ⠐ ", " ⠡ ", " ⠲ ", " ⠵ ", " ⠾ ", " ⠿ "},
105 | --names = { "⢷", "⣨", "⡪", "⣌", "⣪", "⡝"},
106 | layout = {
107 | layouts[8], layouts[8], layouts[8], layouts[8], layouts[8], layouts[8]
108 | }
109 | }
110 | for s = 1, screencount do
111 | tags[s] = awful.tag(tags.names, s, tags.layout)
112 | end
113 | -- }}}
114 |
115 | -- {{{ Menu
116 | -- Create a laucher widget and a main menu
117 | awe_menu = {
118 | { "manual", terminal .. " -e man awesome" },
119 | { "edit config", editor_cmd .. " " .. awful.util.getdir("config") .. "/rc.lua" },
120 | { "restart", awesome.restart },
121 | { "quit", awesome.quit }
122 | }
123 |
124 | open_menu = {
125 | { "terminal", terminal},
126 | { "browser", "chromium"},
127 | { "files", "thunar"},
128 | { "skype", "skype"},
129 | }
130 |
131 | system_menu = {
132 | { "log out", awesome.quit },
133 | { "suspend", "sudo pm-suspend"},
134 | { "hibernate", "sudo pm-hibernate"},
135 | { "reboot", "sudo reboot"},
136 | { "shut down", "sudo halt"},
137 | }
138 |
139 | monitors_menu = {
140 | { "mirror", home .. "/Scripts/Arch/monitors.sh mirror"},
141 | { "dual (left)", home .. "/Scripts/Arch/monitors.sh dual-left"},
142 | { "dual (right)", home .. "/Scripts/Arch/monitors.sh dual-right"},
143 | { "off", home .. "/Scripts/Arch/monitors.sh off"},
144 | }
145 |
146 | awe_main_menu = awful.menu({
147 | items = {
148 | { "awesome", awe_menu, beautiful.awesome_icon },
149 | { "open", open_menu },
150 | { "monitors", monitors_menu },
151 | { "system", system_menu },
152 | }
153 | })
154 |
155 | mylauncher = awful.widget.launcher({
156 | image = image(beautiful.awesome_icon),
157 | menu = awe_main_menu
158 | })
159 | -- }}}
160 |
161 | -- Separators
162 |
163 | bubble = widget({ type = "textbox" })
164 | spacer = widget({ type = "textbox" })
165 | space = widget({ type = "textbox" })
166 | separator = widget({ type = "textbox" })
167 | bracketl = widget({ type = "textbox" })
168 | bracketr = widget({ type = "textbox" })
169 | vertline = widget({ type = "textbox" })
170 | dash = widget({ type = "textbox" })
171 | bubble.text = " ∘ "
172 | spacer.text = " "
173 | space.text = " "
174 | --separator.text = " ⡾ "
175 | separator.text = "] ["
176 | vertline.text = "|"
177 | dash.text = "-"
178 | bracketl.text = "["
179 | bracketr.text = "]"
180 |
181 |
182 | -- Status Labels
183 | cpuLabel = {}
184 | for s = 1, cpuCores do
185 | cpuLabel[s] = widget({ type = "textbox" })
186 | cpuLabel[s].text = "Core " .. s
187 | end
188 |
189 | rlabel = widget({ type = "textbox" })
190 | rlabel.text = "Root:"
191 | hlabel = widget({ type = "textbox" })
192 | hlabel.text = "Home:"
193 |
194 |
195 | -- WIDGETS --
196 |
197 |
198 | -- OS info
199 | if useSysInfo == true then
200 | sys = widget({ type = "textbox" })
201 | vicious.register(sys, vicious.widgets.os, "$1 $2")
202 | end
203 |
204 |
205 | -- Pacman updates
206 | if usePacman == true then
207 | -- Widget
208 | pnoghosticon = widget({ type = "imagebox" })
209 | pnoghosticon.image = image(beautiful.widget_pacnoghost)
210 | pnoghosticon.visible = true
211 |
212 | pghosticon = awful.widget.launcher({
213 | image = beautiful.widget_pacghost,
214 | command = terminal .. " -e " .. pacUpgrade .. " && echo -e 'vicious.force({ pacup, })' | awesome-client"
215 | })
216 | pghosticon.visible = false
217 |
218 | -- Icon
219 | -- picon = widget({ type = "imagebox" })
220 | -- picon.image = image(beautiful.widget_pacnew)
221 | -- Use the Pacman icon as launcher to update the package list (change to fit your package-management system)
222 | picon = awful.widget.launcher({
223 | image = beautiful.widget_pacnew,
224 | command = pacUpdate .. " && echo -e 'vicious.force({ pacup, })' | awesome-client"
225 | })
226 |
227 | runpicon = awful.widget.launcher({
228 | image = beautiful.widget_pacman_run,
229 | command = pacUpdate .. " && echo -e 'vicious.force({ pacup, })' | awesome-client"
230 | })
231 | runpicon.visible = false
232 |
233 | pacup = widget({ type = "textbox" })
234 | vicious.register(pacup, vicious.widgets.pkg,
235 | function(widget, args)
236 | local nr = tonumber(args[1])
237 | if nr ~= 0 then
238 | pnoghosticon.visible = false
239 | pghosticon.visible = true
240 | picon.visible = false
241 | runpicon.visible = true
242 | else
243 | pghosticon.visible = false
244 | pnoghosticon.visible = true
245 | runpicon.visible = false
246 | picon.visible = true
247 | end
248 | end, updatePac, "Arch")
249 | end
250 |
251 |
252 |
253 |
254 | -- MPD Widget
255 | if useMpd == true then
256 | -- PLAY, STOP, PREV/NEXT Buttons
257 | -- requires modification of /usr/share/awesome/lib/awful/widget/launcher.lua
258 | -- b = util.table.join(w:buttons(), button({}, 1, nil, function () util.spawn(args.command) end))
259 | -- to:
260 | -- b = util.table.join(w:buttons(), button({}, 1, nil, function () util.spawn_with_shell(args.command) end))
261 | music_play = awful.widget.launcher({
262 | image = beautiful.widget_play,
263 | command = "mpc toggle && echo -e 'vicious.force({ mpdwidget, })' | awesome-client"
264 | })
265 |
266 | music_pause = awful.widget.launcher({
267 | image = beautiful.widget_pause,
268 | command = "mpc toggle && echo -e 'vicious.force({ mpdwidget, })' | awesome-client"
269 | })
270 | music_pause.visible = false
271 |
272 | music_stop = awful.widget.launcher({
273 | image = beautiful.widget_stop,
274 | command = "mpc stop && echo -e 'vicious.force({ mpdwidget, })' | awesome-client"
275 | })
276 |
277 | music_prev = awful.widget.launcher({
278 | image = beautiful.widget_prev,
279 | command = "mpc prev && echo -e 'vicious.force({ mpdwidget, })' | awesome-client"
280 | })
281 |
282 | music_next = awful.widget.launcher({
283 | image = beautiful.widget_next,
284 | command = "mpc next && echo -e 'vicious.force({ mpdwidget, })' | awesome-client"
285 | })
286 |
287 |
288 | mpdicon = widget({ type = "imagebox" })
289 | mpdicon.image = image(beautiful.widget_mpd)
290 | -- Initialize widget
291 | mpdwidget = widget({ type = "textbox" })
292 | --mpdwidget.wrap = "none"
293 | mpdwidget.width = widthMpd
294 | --mpdwidget.wrap = "word_char"
295 | -- Register Widget
296 | --vicious.register(mpdwidget, vicious.widgets.mpd, "(${state}) : ${Artist} - ${Title} ]", 13)
297 | -- Set the maximum width of the MPD widget inside the string.format function as "%.s"
298 | vicious.register(mpdwidget, vicious.widgets.mpd,
299 | function(widget, args)
300 | --local maxlength = 85
301 | local font = beautiful.font
302 | local string = args["{Artist}"] .. " - " .. args["{Title}"]
303 | --local string = "[" .. args["{state}"] .. "]" .. " : " .. args["{Artist}"] .. " - " .. args["{Title}"]
304 |
305 | --[[ if maxlength < string.len(string) then
306 | return "" .. string.sub(string, 0, maxlength-6) .. " ..."
307 | else
308 | return "" .. string .. ""
309 | end]]
310 |
311 | if args["{state}"] == "Play" then
312 | music_play.visible = false
313 | music_pause.visible = true
314 | else
315 | music_play.visible = true
316 | music_pause.visible = false
317 | end
318 | return string
319 | end, updateMpd)
320 | end
321 |
322 |
323 |
324 | -- WIFI Widget
325 | if useWifi == true then
326 | wifiwidget = widget({ type = "textbox" })
327 | wifiwidget.width = 25
328 | wifiwidget.align = "right"
329 | --wifiimage = widget({ type = "imagebox" })
330 | wifiimage0 = awful.widget.launcher({
331 | image = beautiful.widget_wifi0,
332 | command = networkManager
333 | })
334 | wifiimage0.image.visible = true
335 |
336 | wifiimage1 = awful.widget.launcher({
337 | image = beautiful.widget_wifi1,
338 | command = networkManager
339 | })
340 | wifiimage1.image.visible = false
341 |
342 | wifiimage2 = awful.widget.launcher({
343 | image = beautiful.widget_wifi2,
344 | command = networkManager
345 | })
346 | wifiimage2.image.visible = false
347 |
348 | wifiimage3 = awful.widget.launcher({
349 | image = beautiful.widget_wifi3,
350 | command = networkManager
351 | })
352 | wifiimage3.image.visible = false
353 |
354 | wifiimage4 = awful.widget.launcher({
355 | image = beautiful.widget_wifi4,
356 | command = networkManager
357 | })
358 | wifiimage4.image.visible = false
359 |
360 | -- Register Widget
361 | -- change to the desired network adapter if needed
362 | --vicious.register(wifiwidget, vicious.widgets.wifi, "~ ${link}%", 5, "wlan0")
363 | vicious.register(wifiwidget, vicious.widgets.wifi,
364 | function(widget, args)
365 | if tonumber(args["{link}"]) > 75 then
366 | wifiimage0.visible = false
367 | wifiimage1.visible = false
368 | wifiimage2.visible = false
369 | wifiimage3.visible = false
370 | wifiimage4.visible = true
371 | elseif tonumber(args["{link}"]) > 50 then
372 | wifiimage0.visible = false
373 | wifiimage1.visible = false
374 | wifiimage2.visible = false
375 | wifiimage3.visible = true
376 | wifiimage4.visible = false
377 | elseif tonumber(args["{link}"]) > 25 then
378 | wifiimage0.visible = false
379 | wifiimage1.visible = false
380 | wifiimage2.visible = true
381 | wifiimage3.visible = false
382 | wifiimage4.visible = false
383 | elseif tonumber(args["{link}"]) > 0 then
384 | wifiimage0.visible = false
385 | wifiimage1.visible = true
386 | wifiimage2.visible = false
387 | wifiimage3.visible = false
388 | wifiimage4.visible = false
389 | else
390 | wifiimage0.visible = true
391 | wifiimage1.visible = false
392 | wifiimage2.visible = false
393 | wifiimage3.visible = false
394 | wifiimage4.visible = false
395 | end
396 | return string.format("%02d%%", tonumber(args["{link}"]))
397 | end, updateWifi, wifiAdapter)
398 | end
399 |
400 |
401 |
402 | -- NETWORK Widget
403 | if useNet == true then
404 | dnicon = widget({ type = "imagebox" })
405 | upicon = widget({ type = "imagebox" })
406 | dnicon.image = image(beautiful.widget_down)
407 | upicon.image = image(beautiful.widget_up)
408 | -- Initialize widget
409 | netdnwidget = widget({ type = "textbox" })
410 | netdnwidget.width = 55
411 | --netdnwidget.align = "right"
412 |
413 | netupwidget = widget({ type = "textbox" })
414 | netupwidget.width = 55
415 | --netupwidget.align = "right"
416 | -- Register widget
417 | -- change to the desired network adapter if needed
418 | --vicious.register(netdnwidget, vicious.widgets.net, "${eth0 down_kb} kB/s", 1)
419 | --vicious.register(netupwidget, vicious.widgets.net, "${eth0 up_kb} kB/s", 1)
420 |
421 | -- The following code formats the output to fill with zeroes at the beginning i.e. 013 kB/s instead of 13 kB/s.
422 | -- It also automatically switches to MB/s if there is more than 999 kB/s
423 | vicious.register(netdnwidget, vicious.widgets.net,
424 | function(widget, args)
425 | if tonumber(args["{" .. netAdapter .. " down_kb}"]) > 999 then
426 | return string.format("%04.1f MB/s", tonumber(args["{" .. netAdapter .. " down_mb}"]))
427 | else
428 | return string.format("%03d kB/s", tonumber(args["{" .. netAdapter .. " down_kb}"]))
429 | end
430 | end, updateNet)
431 |
432 | vicious.register(netupwidget, vicious.widgets.net,
433 | function(widget, args)
434 | if tonumber(args["{" .. netAdapter .. " up_kb}"]) > 999 then
435 | return string.format("%04.1f MB/s", tonumber(args["{" .. netAdapter .. " up_mb}"]))
436 | else
437 | return string.format("%03d kB/s", tonumber(args["{" .. netAdapter .. " up_kb}"]))
438 | end
439 | end, updateNet)
440 | end
441 |
442 |
443 |
444 | -- BATTERY widget
445 | if useBat == true then
446 | baticon = widget({ type = "imagebox" })
447 | --baticon.image = image(beautiful.widget_batfull)
448 | --Initialize widget
449 | batwidget = widget({ type = "textbox" })
450 | batwidget.width = 25
451 | batwidget.align = "right"
452 | --Register widget
453 | --vicious.register(batwidget, vicious.widgets.bat, "$1$2", 31, "BAT1")
454 | vicious.register(batwidget, vicious.widgets.bat,
455 | function(widget, args)
456 | if string.match(args[1], "[+↯]") then
457 | baticon.image = image(beautiful.widget_ac)
458 | elseif tonumber(args[2]) > 40 then
459 | baticon.image = image(beautiful.widget_batfull)
460 | elseif tonumber(args[2]) > 20 then
461 | baticon.image = image(beautiful.widget_batlow)
462 | else
463 | baticon.image = image(beautiful.widget_batempty)
464 | end
465 | if tonumber(args[2]) == 100 then
466 | return "Full"
467 | end
468 | return args[2] .. "%"
469 | end, updateBat, battery)
470 | end
471 |
472 |
473 |
474 | -- {{{ CPU
475 | if useTemp == true then
476 | -- Core Temp
477 | tempwidget = widget({ type = "textbox" })
478 | tempwidget.width = 26
479 | tempwidget.align = "right"
480 | vicious.register(tempwidget, vicious.widgets.thermal, "$1 C", updateCpu, { thermalZone, thermalData })
481 | --vicious.register(tempwidget, vicious.widgets.thermal, "$1°C", 5, { "thermal_zone0", "sys" })
482 |
483 | -- Icon
484 | tempicon = widget({ type = "imagebox" })
485 | tempicon.image = image(beautiful.widget_temp)
486 | end
487 |
488 | -- Readout
489 | if useCpu == true then
490 | -- Icon
491 | cpuicon = widget({ type = "imagebox" })
492 | cpuicon.image = image(beautiful.widget_cpu)
493 |
494 | -- Core 1 Meter
495 | cpubar = {}
496 | freq = {}
497 | displayCores = {}
498 | displayCpu = {}
499 |
500 | for s = 1, cpuCores do
501 | cpubar[s] = awful.widget.progressbar()
502 | cpubar[s]:set_width(50)
503 | cpubar[s]:set_height(6)
504 | cpubar[s]:set_vertical(false)
505 | cpubar[s]:set_background_color("#434343")
506 | --cpubar:set_color(beautiful.fg_normal)
507 | cpubar[s]:set_gradient_colors({ beautiful.fg_normal, beautiful.fg_normal, beautiful.fg_normal, beautiful.bar })
508 | --Delete the following line if you want to put the widget on the left side of the wibox
509 | cpubar[s].layout = awful.widget.layout.horizontal.rightleft
510 | vicious.register(cpubar[s], vicious.widgets.cpu, "$" .. s, updateCpu)
511 | awful.widget.layout.margins[cpubar[s].widget] = { top = 6 }
512 |
513 | -- Frequency
514 | freq[s] = widget({ type = "textbox" })
515 | freq[s].width = 44
516 | freq[s].align = "right"
517 | --vicious.register(freq1, vicious.widgets.cpufreq, "$2 GHz", 9, "cpu0")
518 | vicious.register(freq[s], vicious.widgets.cpufreq,
519 | function(widget, args)
520 | return string.format("%03.1f GHz", args[2])
521 | end, updateCpu, "cpu" .. s - 1)
522 |
523 | -- Cache that shit
524 | vicious.cache(vicious.widgets.cpu)
525 | end
526 | end
527 | -- }}} CPU
528 |
529 |
530 |
531 |
532 | -- {{{ MEM
533 | if useMem == true then
534 | -- Icon
535 | memicon = widget({ type = "imagebox" })
536 | memicon.image = image(beautiful.widget_mem)
537 | -- Percentage
538 | --mem = widget({ type = "textbox" })
539 | --vicious.register(mem, vicious.widgets.mem, "$1%")
540 |
541 | -- Meter
542 | membar = awful.widget.progressbar()
543 | membar:set_width(50)
544 | membar:set_height(6)
545 | membar:set_vertical(false)
546 | membar:set_background_color("#434343")
547 | --membar:set_color(beautiful.fg_normal )
548 | membar:set_gradient_colors({ beautiful.fg_normal, beautiful.fg_normal, beautiful.fg_normal, beautiful.bar })
549 |
550 | --This bar should be placed on the right side of the wibox unless
551 | --it's a dual-screen config in which case the default (leftright)
552 | --layout is used... change that if you need!
553 | if screencount ~= dualScreen then
554 | membar.layout = awful.widget.layout.horizontal.rightleft
555 | end
556 |
557 | --Register the widget
558 | vicious.register(membar, vicious.widgets.mem, "$1", updateMem)
559 |
560 | -- Align progressbars
561 | awful.widget.layout.margins[membar.widget] = { top = 6 }
562 |
563 | -- MEM Usage
564 | --mem_total = widget({ type = "textbox" })
565 | --vicious.register(mem_total, vicious.widgets.mem, "$3 MB", 9)
566 | --mem_used = widget({ type = "textbox" })
567 | --vicious.register(mem_total, vicious.widgets.mem, "$2 MB", 9,)
568 |
569 | -- Cache that shit
570 | vicious.cache(vicious.widgets.mem)
571 | end
572 | -- }}} MEM
573 |
574 |
575 | -- Create a textclock widget
576 | mytextclock = awful.widget.textclock({ align = "right" }, "%A %b %d at %I:%M%P")
577 | awful.widget.layout.margins[mytextclock] = { top = -1 }
578 |
579 | -- Create a systray
580 | mysystray = widget({ type = "systray" })
581 |
582 | -- Create a wibox for each screen and add it
583 | mywibox = {}
584 | mybottomwibox = {}
585 | mypromptbox = {}
586 | mylayoutbox = {}
587 | mytaglist = {}
588 | mytaglist.buttons = awful.util.table.join(awful.button({}, 1, awful.tag.viewonly),
589 | awful.button({ modkey }, 1, awful.client.movetotag),
590 | awful.button({}, 3, awful.tag.viewtoggle),
591 | awful.button({ modkey }, 3, awful.client.toggletag),
592 | awful.button({}, 4, awful.tag.viewnext),
593 | awful.button({}, 5, awful.tag.viewprev))
594 | mytasklist = {}
595 | mytasklist.buttons = awful.util.table.join(awful.button({}, 1, function(c)
596 | if not c:isvisible() then
597 | awful.tag.viewonly(c:tags()[1])
598 | end
599 | client.focus = c
600 | c:raise()
601 | end),
602 | awful.button({}, 3, function()
603 | if instance then
604 | instance:hide()
605 | instance = nil
606 | else
607 | instance = awful.menu.clients({ width = 250 })
608 | end
609 | end),
610 | awful.button({}, 4, function()
611 | awful.client.focus.byidx(1)
612 | if client.focus then client.focus:raise() end
613 | end),
614 | awful.button({}, 5, function()
615 | awful.client.focus.byidx(-1)
616 | if client.focus then client.focus:raise() end
617 | end))
618 |
619 |
620 | for s = 1, screencount do
621 | -- Set a screen margin for borders
622 | awful.screen.padding(screen[s], { top = 0 })
623 | -- Create a promptbox for each screen
624 | mypromptbox[s] = awful.widget.prompt()
625 | -- Create an imagebox widget which will contains an icon indicating which layout we're using.
626 | -- We need one layoutbox per screen.
627 | mylayoutbox[s] = awful.widget.layoutbox(s)
628 | mylayoutbox[s]:buttons(awful.util.table.join(awful.button({}, 1, function() awful.layout.inc(layouts, 1) end),
629 | awful.button({}, 3, function() awful.layout.inc(layouts, -1) end),
630 | awful.button({}, 4, function() awful.layout.inc(layouts, 1) end),
631 | awful.button({}, 5, function() awful.layout.inc(layouts, -1) end)))
632 | mylayoutbox[s].resize = false
633 | -- Create a taglist widget
634 | mytaglist[s] = awful.widget.taglist(s, awful.widget.taglist.label.all, mytaglist.buttons)
635 | awful.widget.layout.margins[mytaglist[s]] = { top = -2 }
636 |
637 |
638 | -- WARNING: In order to properly view the tasklist some lua files have been modified. For the
639 | -- tasklist_floating_icon icon to be placed on the left side of the task name instead of the
640 | -- right alignment, /usr/share/awesome/lib/awful/widget/tasklist.lua in function new(label, buttons) the
641 | -- variable widgets.textbox has to be modified like this:
642 | -- remove bg_align = "right" and
643 | -- modify the left margin from 2 to icon width + 2 (i.e.: 18).
644 |
645 | -- Create a tasklist widget
646 | mytasklist[s] = awful.widget.tasklist(function(c)
647 | return awful.widget.tasklist.label.currenttags(c, s,
648 | -- WARNING: Requires modified /usr/share/awesome/lib/awful/widget/tasklist.lua !!!
649 | -- This basically hides the application icons on the tasklist. If you don't want this or
650 | -- prefer not to change your tasklist.lua remove the following line!
651 | { hide_icon = true })
652 | end, mytasklist.buttons)
653 |
654 | awful.widget.layout.margins[mytasklist[s]] = { top = 2 }
655 |
656 |
657 |
658 |
659 | -- WIBOXES --
660 |
661 | -- Here we create the wiboxes if it's not a dual-screen layout
662 | if screencount ~= dualScreen then
663 | -- Create the wibox
664 | mywibox[s] = awful.wibox({ position = "top", screen = s, border_width = 0, height = 18 })
665 | -- Add widgets to the wibox - order matters
666 | mywibox[s].widgets = {
667 | {
668 | space,
669 | mytaglist[s],
670 | spacer,
671 | mypromptbox[s],
672 | displaySysInfo,
673 | layout = awful.widget.layout.horizontal.leftright
674 | },
675 |
676 | spacer,
677 | mytextclock,
678 | space,
679 | volume_widget,
680 | spacer,
681 | mylayoutbox[s],
682 | spacer,
683 | s == 1 and mysystray or nil,
684 | mytasklist[s],
685 | layout = awful.widget.layout.horizontal.rightleft
686 |
687 | }
688 |
689 | mybottomwibox[s] = awful.wibox({ position = "bottom", screen = s, border_width = 0, height = 18 })
690 |
691 | mybottomwibox[s].widgets = {
692 | {
693 | space, music_play, music_pause, music_stop, music_prev, music_next, space, mpdwidget,
694 | layout = awful.widget.layout.horizontal.leftright
695 | },
696 |
697 | spacer,
698 | bracketr,
699 | spacer, batwidget, spacer, baticon, spacer,
700 | separator,
701 | spacer, wifiwidget, spacer, wifiimage0, wifiimage1, wifiimage2, wifiimage3, wifiimage4, spacer,
702 | separator,
703 | spacer, tempwidget, spacer, tempicon, spacer,
704 | separator,
705 | spacer, freq[1], spacer, cpubar[1], spacer,
706 | --cpuLabel[1], spacer,
707 | cpuicon, spacer,
708 | separator,
709 | spacer, membar, spacer, memicon, spacer,
710 | separator,
711 | spacer, netupwidget, spacer, upicon, spacer, separator, spacer, netdnwidget, spacer, dnicon, spacer,
712 | separator,
713 | space, pghosticon, pnoghosticon, runpicon, picon, space,
714 | bracketl,
715 | layout = awful.widget.layout.horizontal.rightleft
716 | }
717 | end
718 |
719 | end
720 |
721 | if screencount == dualScreen then
722 | -- Here we create the wiboxes if it is a dual screen configuration:
723 | mywibox[1] = awful.wibox({ position = "top", screen = 1, border_width = 0, height = 18 })
724 | -- Add widgets to the wibox - order matters
725 | mywibox[1].widgets = {
726 | {
727 | space,
728 | mytaglist[1],
729 | spacer,
730 | mypromptbox[1],
731 | layout = awful.widget.layout.horizontal.leftright
732 | },
733 |
734 | spacer,
735 | mytextclock,
736 | space,
737 | mylayoutbox[1],
738 | spacer,
739 | mytasklist[1],
740 | layout = awful.widget.layout.horizontal.rightleft
741 | }
742 |
743 | mybottomwibox[1] = awful.wibox({ position = "bottom", screen = 1, border_width = 0, height = 18 })
744 |
745 | mybottomwibox[1].widgets = {
746 | {
747 | space, music_play, music_pause, music_stop, music_prev, music_next, space, mpdwidget,
748 | layout = awful.widget.layout.horizontal.leftright
749 | },
750 |
751 | space,
752 | s == 1 and mysystray or nil,
753 | layout = awful.widget.layout.horizontal.rightleft
754 | }
755 |
756 | mywibox[2] = awful.wibox({ position = "top", screen = 2, border_width = 0, height = 18 })
757 |
758 | mywibox[2].widgets = {
759 | {
760 | space,
761 | mytaglist[2],
762 | spacer,
763 | mypromptbox[2],
764 | layout = awful.widget.layout.horizontal.leftright
765 | },
766 |
767 | spacer,
768 | mytextclock,
769 | space,
770 | mylayoutbox[2],
771 | spacer,
772 | mytasklist[2],
773 | layout = awful.widget.layout.horizontal.rightleft
774 | }
775 |
776 | mybottomwibox[2] = awful.wibox({ position = "bottom", screen = 2, border_width = 0, height = 18 })
777 |
778 | mybottomwibox[2].widgets = {
779 | {
780 | spacer,
781 | bracketl,
782 | spacer, sys, spacer,
783 | separator,
784 | space, runpicon, picon, pghosticon, pnoghosticon, space,
785 | separator,
786 | spacer, dnicon, spacer, netdnwidget, spacer, separator, spacer, upicon, spacer, netupwidget, spacer,
787 | separator,
788 | spacer, memicon, spacer, membar, spacer,
789 | bracketr,
790 | layout = awful.widget.layout.horizontal.leftright
791 | },
792 |
793 | spacer,
794 | bracketr,
795 | spacer, tempwidget, spacer, tempicon, spacer,
796 | separator,
797 | spacer, freq[2], spacer, cpubar[2], spacer,
798 | cpuLabel[2], spacer,
799 | cpuicon, spacer,
800 | separator,
801 | spacer, freq[1], spacer, cpubar[1], spacer,
802 | cpuLabel[1], spacer,
803 | cpuicon, spacer,
804 | bracketl,
805 | layout = awful.widget.layout.horizontal.rightleft
806 | }
807 |
808 | end
809 |
810 | -- }}}
811 |
812 |
813 |
814 |
815 |
816 | -- {{{ Mouse bindings
817 | root.buttons(awful.util.table.join(awful.button({}, 3, function() awe_main_menu:toggle() end),
818 | awful.button({}, 4, awful.tag.viewnext),
819 | awful.button({}, 5, awful.tag.viewprev)))
820 | -- }}}
821 |
822 | -- {{{ Key bindings
823 | globalkeys = awful.util.table.join(awful.key({ modkey, }, "Left", awful.tag.viewprev),
824 | awful.key({ modkey, }, "Right", awful.tag.viewnext),
825 | awful.key({ modkey, }, "Escape", awful.tag.history.restore),
826 |
827 | awful.key({ modkey, }, "j",
828 | function()
829 | awful.client.focus.byidx(1)
830 | if client.focus then client.focus:raise() end
831 | end),
832 | awful.key({ modkey, }, "k",
833 | function()
834 | awful.client.focus.byidx(-1)
835 | if client.focus then client.focus:raise() end
836 | end),
837 | awful.key({ modkey, }, "w", function() awe_main_menu:show({ keygrabber = true }) end),
838 |
839 | -- Volume manipulation
840 | awful.key({}, "XF86AudioRaiseVolume", function() awful.util.spawn("amixer -q set Master 2+") end),
841 | awful.key({}, "XF86AudioLowerVolume", function() awful.util.spawn("amixer -q set Master 2-") end),
842 | awful.key({}, "XF86AudioMute", function() awful.util.spawn("amixer -q set Master toggle") end),
843 |
844 | -- MPD manipulation
845 | awful.key({}, "XF86AudioPlay", function() awful.util.spawn("mpc -q toggle") end),
846 | awful.key({}, "XF86AudioNext", function() awful.util.spawn("mpc -q next") end),
847 | awful.key({}, "XF86AudioPrev", function() awful.util.spawn("mpc -q prev") end),
848 |
849 | -- Layout manipulation
850 | awful.key({ modkey, "Shift" }, "j", function() awful.client.swap.byidx(1) end),
851 | awful.key({ modkey, "Shift" }, "k", function() awful.client.swap.byidx(-1) end),
852 | awful.key({ modkey, "Control" }, "j", function() awful.screen.focus_relative(1) end),
853 | awful.key({ modkey, "Control" }, "k", function() awful.screen.focus_relative(-1) end),
854 | awful.key({ modkey, }, "u", awful.client.urgent.jumpto),
855 | awful.key({ modkey, }, "Tab",
856 | function()
857 | awful.client.focus.history.previous()
858 | if client.focus then
859 | client.focus:raise()
860 | end
861 | end),
862 |
863 | -- Standard program
864 | awful.key({ modkey, }, "Return", function() awful.util.spawn(terminal) end),
865 | awful.key({ modkey, "Control" }, "r", awesome.restart),
866 | awful.key({ modkey, "Shift" }, "q", awesome.quit),
867 |
868 | awful.key({ modkey, }, "l", function() awful.tag.incmwfact(0.05) end),
869 | awful.key({ modkey, }, "h", function() awful.tag.incmwfact(-0.05) end),
870 | awful.key({ modkey, "Shift" }, "h", function() awful.tag.incnmaster(1) end),
871 | awful.key({ modkey, "Shift" }, "l", function() awful.tag.incnmaster(-1) end),
872 | awful.key({ modkey, "Control" }, "h", function() awful.tag.incncol(1) end),
873 | awful.key({ modkey, "Control" }, "l", function() awful.tag.incncol(-1) end),
874 | awful.key({ modkey, }, "space", function() awful.layout.inc(layouts, 1) end),
875 | awful.key({ modkey, "Shift" }, "space", function() awful.layout.inc(layouts, -1) end),
876 |
877 | -- Prompt
878 | awful.key({ modkey }, "r", function() mypromptbox[mouse.screen]:run() end),
879 |
880 | awful.key({ modkey }, "x",
881 | function()
882 | awful.prompt.run({ prompt = "Run Lua code: " },
883 | mypromptbox[mouse.screen].widget,
884 | awful.util.eval, nil,
885 | awful.util.getdir("cache") .. "/history_eval")
886 | end))
887 |
888 | clientkeys = awful.util.table.join(awful.key({ modkey, }, "f", function(c) c.fullscreen = not c.fullscreen end),
889 | awful.key({ modkey, "Shift" }, "c", function(c) c:kill() end),
890 | awful.key({ modkey, "Control" }, "space", awful.client.floating.toggle),
891 | awful.key({ modkey, "Control" }, "Return", function(c) c:swap(awful.client.getmaster()) end),
892 | awful.key({ modkey, }, "o", awful.client.movetoscreen),
893 | awful.key({ modkey, "Shift" }, "r", function(c) c:redraw() end),
894 | awful.key({ modkey, }, "t", function(c) c.ontop = not c.ontop end),
895 | awful.key({ modkey, }, "n", function(c) c.minimized = not c.minimized end),
896 | awful.key({ modkey, }, "m",
897 | function(c)
898 | c.maximized_horizontal = not c.maximized_horizontal
899 | c.maximized_vertical = not c.maximized_vertical
900 | end))
901 |
902 | -- Compute the maximum number of digit we need, limited to 9
903 | keynumber = 0
904 | for s = 1, screencount do
905 | keynumber = math.min(9, math.max(#tags[s], keynumber));
906 | end
907 |
908 | -- Bind all key numbers to tags.
909 | -- Be careful: we use keycodes to make it works on any keyboard layout.
910 | -- This should map on the top row of your keyboard, usually 1 to 9.
911 | for i = 1, keynumber do
912 | globalkeys = awful.util.table.join(globalkeys,
913 | awful.key({ modkey }, "#" .. i + 9,
914 | function()
915 | local screen = mouse.screen
916 | if tags[screen][i] then
917 | awful.tag.viewonly(tags[screen][i])
918 | end
919 | end),
920 | awful.key({ modkey, "Control" }, "#" .. i + 9,
921 | function()
922 | local screen = mouse.screen
923 | if tags[screen][i] then
924 | awful.tag.viewtoggle(tags[screen][i])
925 | end
926 | end),
927 | awful.key({ modkey, "Shift" }, "#" .. i + 9,
928 | function()
929 | if client.focus and tags[client.focus.screen][i] then
930 | awful.client.movetotag(tags[client.focus.screen][i])
931 | end
932 | end),
933 | awful.key({ modkey, "Control", "Shift" }, "#" .. i + 9,
934 | function()
935 | if client.focus and tags[client.focus.screen][i] then
936 | awful.client.toggletag(tags[client.focus.screen][i])
937 | end
938 | end))
939 | end
940 |
941 | clientbuttons = awful.util.table.join(awful.button({}, 1, function(c) client.focus = c; c:raise() end),
942 | awful.button({ modkey }, 1, awful.mouse.client.move),
943 | awful.button({ modkey }, 3, awful.mouse.client.resize))
944 |
945 | -- Set keys
946 | root.keys(globalkeys)
947 | -- }}}
948 |
949 | -- {{{ Rules
950 | awful.rules.rules = {
951 | -- All clients will match this rule.
952 | {
953 | rule = {},
954 | properties = {
955 | border_width = beautiful.border_width,
956 | border_color = beautiful.border_normal,
957 | size_hints_honor = false,
958 | focus = true,
959 | keys = clientkeys,
960 | buttons = clientbuttons
961 | }
962 | },
963 | {
964 | rule = { class = "MPlayer" },
965 | properties = { floating = true }
966 | },
967 | {
968 | rule = { class = "pinentry" },
969 | properties = { floating = true }
970 | },
971 | {
972 | rule = { class = "gimp" },
973 | properties = { floating = true }
974 | },
975 | -- Set Firefox to always map on tags number 2 of screen 1.
976 | -- { rule = { class = "Firefox" },
977 | -- properties = { tag = tags[1][2] } },
978 | }
979 | -- }}}
980 |
981 | -- {{{ Signals
982 | -- Signal function to execute when a new client appears.
983 | client.add_signal("manage", function(c, startup)
984 | -- Add a titlebar
985 | -- awful.titlebar.add(c, { modkey = modkey })
986 |
987 | -- Enable sloppy focus
988 | c:add_signal("mouse::enter", function(c)
989 | if awful.layout.get(c.screen) ~= awful.layout.suit.magnifier
990 | and awful.client.focus.filter(c) then
991 | client.focus = c
992 | end
993 | end)
994 |
995 | if not startup then
996 | -- Set the windows at the slave,
997 | -- i.e. put it at the end of others instead of setting it master.
998 | -- awful.client.setslave(c)
999 |
1000 | -- Put windows in a smart way, only if they does not set an initial position.
1001 | if not c.size_hints.user_position and not c.size_hints.program_position then
1002 | awful.placement.no_overlap(c)
1003 | awful.placement.no_offscreen(c)
1004 | end
1005 | end
1006 | end)
1007 |
1008 | client.add_signal("focus", function(c) c.border_color = beautiful.border_focus end)
1009 | client.add_signal("unfocus", function(c) c.border_color = beautiful.border_normal end)
1010 |
1011 | -- {{{ Tag signal handler - selection
1012 | -- - ASCII tags 1 [2] 3 4...
1013 | -- - start with tag 1 named [1] in tag setup
1014 | --[[
1015 | for s = 1, screencount do
1016 | for t = 1, #tags[s] do
1017 | tags[s][t]:add_signal("property::selected", function ()
1018 | if tags[s][t].selected then
1019 | tags[s][t].name = "[" .. tags[s][t].name .. "]"
1020 | else--]]
1021 | --tags[s][t].name = tags[s][t].name:gsub("[%[%]]", "")
1022 | --[[ end
1023 | end)
1024 | end
1025 | end
1026 | --]]
1027 | -- }}}
1028 |
1029 |
1030 |
1031 |
--------------------------------------------------------------------------------
/.config/console2/console.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
--------------------------------------------------------------------------------
/.config/iterm/Arch.itermcolors:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Ansi 0 Color
6 |
7 | Blue Component
8 | 0.0
9 | Green Component
10 | 0.0
11 | Red Component
12 | 0.0
13 |
14 | Ansi 1 Color
15 |
16 | Blue Component
17 | 0.33896163105964661
18 | Green Component
19 | 0.30181175470352173
20 | Red Component
21 | 0.97320520877838135
22 |
23 | Ansi 10 Color
24 |
25 | Blue Component
26 | 0.60782265663146973
27 | Green Component
28 | 0.8886420726776123
29 | Red Component
30 | 0.74601167440414429
31 |
32 | Ansi 11 Color
33 |
34 | Blue Component
35 | 0.30980390310287476
36 | Green Component
37 | 0.91372549533843994
38 | Red Component
39 | 0.98823529481887817
40 |
41 | Ansi 12 Color
42 |
43 | Blue Component
44 | 0.97869932651519775
45 | Green Component
46 | 0.46488428115844727
47 | Red Component
48 | 0.10495194047689438
49 |
50 | Ansi 13 Color
51 |
52 | Blue Component
53 | 0.10385783016681671
54 | Green Component
55 | 0.38939303159713745
56 | Red Component
57 | 0.93080741167068481
58 |
59 | Ansi 14 Color
60 |
61 | Blue Component
62 | 1
63 | Green Component
64 | 0.58831676835195457
65 | Red Component
66 | 0.2840822794792921
67 |
68 | Ansi 15 Color
69 |
70 | Blue Component
71 | 0.92549020051956177
72 | Green Component
73 | 0.93333327770233154
74 | Red Component
75 | 0.93333327770233154
76 |
77 | Ansi 2 Color
78 |
79 | Blue Component
80 | 0.27636393904685974
81 | Green Component
82 | 0.80055850744247437
83 | Red Component
84 | 0.52205371856689453
85 |
86 | Ansi 3 Color
87 |
88 | Blue Component
89 | 0.0
90 | Green Component
91 | 0.62745100259780884
92 | Red Component
93 | 0.76862752437591553
94 |
95 | Ansi 4 Color
96 |
97 | Blue Component
98 | 0.44615113735198975
99 | Green Component
100 | 0.21685506403446198
101 | Red Component
102 | 0.103834368288517
103 |
104 | Ansi 5 Color
105 |
106 | Blue Component
107 | 0.081112928688526154
108 | Green Component
109 | 0.27888122200965881
110 | Red Component
111 | 0.74700850248336792
112 |
113 | Ansi 6 Color
114 |
115 | Blue Component
116 | 0.88756716628959276
117 | Green Component
118 | 0.41875228472275794
119 | Red Component
120 | 0.09399037987352947
121 |
122 | Ansi 7 Color
123 |
124 | Blue Component
125 | 0.81176471710205078
126 | Green Component
127 | 0.84313732385635376
128 | Red Component
129 | 0.82745099067687988
130 |
131 | Ansi 8 Color
132 |
133 | Blue Component
134 | 0.25674945116043091
135 | Green Component
136 | 0.27153411507606506
137 | Red Component
138 | 0.26400971412658691
139 |
140 | Ansi 9 Color
141 |
142 | Blue Component
143 | 0.48895630240440369
144 | Green Component
145 | 0.46917590498924255
146 | Red Component
147 | 0.9800305962562561
148 |
149 | Background Color
150 |
151 | Blue Component
152 | 0.0
153 | Green Component
154 | 0.0
155 | Red Component
156 | 0.0
157 |
158 | Bold Color
159 |
160 | Blue Component
161 | 0.99999129772186279
162 | Green Component
163 | 0.99997437000274658
164 | Red Component
165 | 1
166 |
167 | Cursor Color
168 |
169 | Blue Component
170 | 0.0
171 | Green Component
172 | 0.0
173 | Red Component
174 | 0.0
175 |
176 | Cursor Text Color
177 |
178 | Blue Component
179 | 1
180 | Green Component
181 | 1
182 | Red Component
183 | 1
184 |
185 | Foreground Color
186 |
187 | Blue Component
188 | 0.96832579185520362
189 | Green Component
190 | 0.96832579185520362
191 | Red Component
192 | 0.96832579185520362
193 |
194 | Selected Text Color
195 |
196 | Blue Component
197 | 0.94570135746606332
198 | Green Component
199 | 0.94570135746606332
200 | Red Component
201 | 0.94570135746606332
202 |
203 | Selection Color
204 |
205 | Blue Component
206 | 0.25319302082061768
207 | Green Component
208 | 0.25318872928619385
209 | Red Component
210 | 0.25319629907608032
211 |
212 |
213 |
214 |
--------------------------------------------------------------------------------
/.config/karabiner/private.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 | Shifts to Parentheses
5 | Shifts, when pressed alone, type parentheses. When used with other keys they're normal shifts.
6 |
7 | private.shifts_to_parens
8 |
9 |
10 | --KeyOverlaidModifier-- KeyCode::SHIFT_R, ModifierFlag::SHIFT_R | ModifierFlag::NONE, KeyCode::SHIFT_R, KeyCode::KEY_0, ModifierFlag::SHIFT_L
11 | --KeyOverlaidModifier-- KeyCode::SHIFT_L, ModifierFlag::SHIFT_L | ModifierFlag::NONE, KeyCode::SHIFT_L, KeyCode::KEY_9, ModifierFlag::SHIFT_R
12 |
13 |
18 | --KeyToKey-- KeyCode::SHIFT_L, ModifierFlag::SHIFT_R, KeyCode::KEY_0, ModifierFlag::SHIFT_L, KeyCode::KEY_9, ModifierFlag::SHIFT_L
19 | --KeyToKey-- KeyCode::SHIFT_R, ModifierFlag::SHIFT_L, KeyCode::KEY_9, ModifierFlag::SHIFT_L, KeyCode::KEY_0, ModifierFlag::SHIFT_L
20 |
21 |
22 | -
23 | Poker II Swapping
24 | Change the Caps Lock to No Action in SysPrefs, then use Seil to change Caps Lock to Backquote (keycode 50), then use this to swap the two keys.
25 | private.swap_tilde_and_escape
26 | __KeyToKey__ KeyCode::ESCAPE, KeyCode::BACKQUOTE
27 | __KeyToKey__ KeyCode::BACKQUOTE, KeyCode::ESCAPE
28 |
29 |
30 |
31 | -
32 | Poker II Macbook Swapping
33 | Like the above but uses for Caps Lock in Seil.
34 | private.macbook_swapping
35 | __KeyToKey__ KeyCode::F19, KeyCode::ESCAPE
36 | __KeyToKey__ KeyCode::ESCAPE, KeyCode::BACKQUOTE
37 |
38 |
39 |
40 | -
41 | Macbook Config
42 | (Change f19 key to caps lock key in internal keyboard.)
43 | private.f19_hack
44 | __KeyToKey__ KeyCode::F19, KeyCode::ESCAPE
45 |
46 |
47 | -
48 | Remap Caps Lock to Hyper with Escape on tap
49 | OS X doesn't have a Hyper. This maps caps lock (actually F19) to Control + Shift + Option + Command, unless you tap it. Then it sends Escape.
50 |
51 | caps_lock_to_hyper_or_escape
52 |
53 |
54 | --KeyOverlaidModifier--
55 | KeyCode::F19,
56 |
57 | KeyCode::COMMAND_L,
58 | ModifierFlag::OPTION_L | ModifierFlag::SHIFT_L | ModifierFlag::CONTROL_L,
59 | KeyCode::ESCAPE
60 |
61 |
62 |
63 | -
64 | Volume Controls
65 | Better volume controls
66 |
67 | private.volume_controls
68 |
69 | --KeyToKey-- KeyCode::X, ModifierFlag::CONTROL_L | ModifierFlag::OPTION_L, ConsumerKeyCode::VOLUME_UP
70 | --KeyToKey-- KeyCode::Z, ModifierFlag::CONTROL_L | ModifierFlag::OPTION_L, ConsumerKeyCode::VOLUME_DOWN
71 | --KeyToKey-- KeyCode::C, ModifierFlag::CONTROL_L | ModifierFlag::OPTION_L, ConsumerKeyCode::VOLUME_MUTE
72 |
73 |
74 | -
75 | Brightness Controls
76 | Better brightness controls
77 |
78 | private.brightness_controls
79 |
80 | --KeyToKey-- KeyCode::DOT, ModifierFlag::CONTROL_L | ModifierFlag::OPTION_L, ConsumerKeyCode::BRIGHTNESS_DOWN
81 | --KeyToKey-- KeyCode::SLASH, ModifierFlag::CONTROL_L | ModifierFlag::OPTION_L, ConsumerKeyCode::BRIGHTNESS_UP
82 |
83 |
84 | -
85 | Mouse Controls
86 | Forward/back on my Trackball
87 |
88 | private.mouse_controls
89 |
90 | __KeyToKey__ PointingButton::BUTTON4, KeyCode::BRACKET_LEFT, ModifierFlag::COMMAND_L
91 | __KeyToKey__ PointingButton::BUTTON5, KeyCode::BRACKET_RIGHT, ModifierFlag::COMMAND_L
92 |
93 |
94 | -
95 | Escape as Tilde
96 | Change Escape to Tilde
97 |
98 | private.escape_tilde
99 |
100 | --KeyToKey-- KeyCode::ESCAPE, KeyCode::BACKQUOTE
101 |
102 |
103 | -
104 | Caps Lock as Escape
105 | Change Escape to Tilde
106 |
107 | private.caps_escape
108 |
109 | --KeyToKey-- KeyCode::CAPSLOCK, KeyCode::ESCAPE
110 |
111 |
112 |
113 |
--------------------------------------------------------------------------------
/.config/pms/rc:
--------------------------------------------------------------------------------
1 | bind d remove
2 | bind D clear
3 | bind a add
4 | bind A add-album
5 | bind N create
6 | bind S save
7 | bind tab next-window
8 | bind 3 change-window windowlist
9 | bind L change-window windowlist
10 | bind i info
11 | bind p activate-list
12 | bind z play-album
13 | bind x play-artist
14 |
--------------------------------------------------------------------------------
/.ctags:
--------------------------------------------------------------------------------
1 | --exclude=.git
2 |
3 | --langdef=Elixir
4 | --langmap=Elixir:.ex.exs
5 | --regex-Elixir=/^[ \t]*def(p?)[ \t]+([a-z_][a-zA-Z0-9_?!]*)/\2/f,functions,functions (def ...)/
6 | --regex-Elixir=/^[ \t]*defcallback[ \t]+([a-z_][a-zA-Z0-9_?!]*)/\1/c,callbacks,callbacks (defcallback ...)/
7 | --regex-Elixir=/^[ \t]*defdelegate[ \t]+([a-z_][a-zA-Z0-9_?!]*)/\1/d,delegates,delegates (defdelegate ...)/
8 | --regex-Elixir=/^[ \t]*defexception[ \t]+([A-Z][a-zA-Z0-9_]*\.)*([A-Z][a-zA-Z0-9_?!]*)/\2/e,exceptions,exceptions (defexception ...)/
9 | --regex-Elixir=/^[ \t]*defimpl[ \t]+([A-Z][a-zA-Z0-9_]*\.)*([A-Z][a-zA-Z0-9_?!]*)/\2/i,implementations,implementations (defimpl ...)/
10 | --regex-Elixir=/^[ \t]*defmacro(p?)[ \t]+([a-z_][a-zA-Z0-9_?!]*)\(/\2/a,macros,macros (defmacro ...)/
11 | --regex-Elixir=/^[ \t]*defmacro(p?)[ \t]+([a-zA-Z0-9_?!]+)?[ \t]+([^ \tA-Za-z0-9_]+)[ \t]*[a-zA-Z0-9_!?!]/\3/o,operators,operators (e.g. "defmacro a <<< b")/
12 | --regex-Elixir=/^[ \t]*defmodule[ \t]+([A-Z][a-zA-Z0-9_]*\.)*([A-Z][a-zA-Z0-9_?!]*)/\2/m,modules,modules (defmodule ...)/
13 | --regex-Elixir=/^[ \t]*defprotocol[ \t]+([A-Z][a-zA-Z0-9_]*\.)*([A-Z][a-zA-Z0-9_?!]*)/\2/p,protocols,protocols (defprotocol...)/
14 | --regex-Elixir=/^[ \t]*Record\.defrecord[ \t]+:([a-zA-Z0-9_]+)/\1/r,records,records (defrecord...)/
15 | --regex-Elixir=/^[ \t]*test[ \t]+\"([a-z_][a-zA-Z0-9_?! ]*)\"*/\1/t,tests,tests (test ...)/
16 |
17 | --langmap=Perl:+.m.mi
18 |
--------------------------------------------------------------------------------
/.git_excludes:
--------------------------------------------------------------------------------
1 | # Hide Mac files
2 | *.DS_Store
3 |
4 | # Vim swap files
5 | *.sw[po]
6 |
7 | # Java
8 | .classpath
9 | .settings
10 | .project
11 |
12 | # Misc other files
13 | *.log
14 | ._*
15 |
16 | # Jekyll
17 | _site/
18 |
--------------------------------------------------------------------------------
/.git_template/hooks/ctags:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | #
4 | # Easy ctags with Git
5 | # Source: http://tbaggery.com/2011/08/08/effortless-ctags-with-git.html
6 | #
7 |
8 | set -e
9 | PATH="/usr/local/bin:$PATH"
10 | trap "rm -f .git/tags.$$" EXIT
11 | ctags --tag-relative -Rf.git/tags.$$ --exclude=.git --languages=-javascript,sql
12 | mv .git/tags.$$ .git/tags
13 |
--------------------------------------------------------------------------------
/.git_template/hooks/post-checkout:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | .git/hooks/ctags >/dev/null 2>&1 &
3 |
--------------------------------------------------------------------------------
/.git_template/hooks/post-commit:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | .git/hooks/ctags >/dev/null 2>&1 &
3 |
--------------------------------------------------------------------------------
/.git_template/hooks/post-merge:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | .git/hooks/ctags >/dev/null 2>&1 &
3 |
--------------------------------------------------------------------------------
/.git_template/hooks/post-rewrite:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | case "$1" in
3 | rebase) exec .git/hooks/post-merge ;;
4 | esac
5 |
--------------------------------------------------------------------------------
/.gitconfig:
--------------------------------------------------------------------------------
1 | [advice]
2 | statusHints = false
3 |
4 | [color]
5 | ui = true
6 |
7 | [core]
8 | editor = vim
9 | excludesfile = ~/.git_excludes
10 |
11 | [github]
12 | user = jdavis
13 |
14 | [help]
15 | autocorrect = 1
16 |
17 | [init]
18 | templatedir = ~/.git_template
19 |
20 | [user]
21 | name = Josh Davis
22 | email = jdavis@users.noreply.github.com
23 |
24 | [push]
25 | default = matching
26 |
27 | [alias]
28 | # Shortcuts
29 | a = add
30 | aa = add --all
31 | ap = add --patch
32 | b = !git branches
33 | bl = blame
34 | c = commit -v
35 | cl = !git clone
36 | co = checkout
37 | cop = checkout --patch
38 | cp = cherry-pick
39 | d = diff
40 | dc = diff --cached
41 | dt = difftool
42 | dtc = difftool --cached
43 | f = fetch
44 | fa = fetch --all
45 | gh = !git gh-pages
46 | h = help
47 | l = log
48 | ls = ls-files
49 | m = merge
50 | ma = !git master
51 | mnff = merge --no-ff
52 | mff = merge --ff-only
53 | p = pull
54 | pr = !git pull-request
55 | r = remote
56 | rb = rebase
57 | rba = rebase --abort
58 | rbc = rebase --continue
59 | rbi = rebase --interactive
60 | rbs = rebase --skip
61 | rbp = pull --rebase
62 | rf = reflog
63 | rs = reset
64 | rv = revert
65 | #s = status
66 | # Default to shorter status with branch info
67 | s = status -sb
68 | sh = show
69 | sl = shortlog
70 | sm = submodule
71 | st = stash
72 | # Default to shorter status for su as well
73 | su = status -s -b -uno
74 | un = !git unstage
75 |
76 | # New Commands
77 | amend = commit --amend
78 | branches = "!b() { git branch ${@:--vv}; }; b"
79 | count = shortlog -sn
80 | commiff = "!commiff() { git log --abbrev-commit --oneline HEAD...${1:-master}; }; commiff"
81 | ctags = !.git/hooks/ctags
82 | gh-pages = checkout gh-pages
83 | last = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit HEAD~10..HEAD~
84 | lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(A: %ad - C: %cr) %C(bold blue)<%an>%Creset' --abbrev-commit
85 | ln = log --graph --oneline --all --decorate --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(A: %ad - C: %cr) %C(bold blue)<%an>%Creset'
86 | man = help
87 | master = checkout master
88 | sync = !git pull && git push
89 | unstage = reset HEAD
90 | up = "!up() { if [[ $# != 2 ]]; then echo 'git up '; exit; fi; exists=`git show-ref refs/heads/$2`; if [ -n \"$exists\" ]; then git branch -d $1/$2; fi; git branch --set-upstream-to $1/$2; }; up"
91 |
92 | # Fixes this issue:
93 | # http://stackoverflow.com/q/6089294
94 | pu = !git push -u origin `git rev-parse --abbrev-ref HEAD`
95 |
96 | # Easy alias to publish master to GitHub Pages
97 | publish = !git checkout gh-pages && git merge master && git push origin gh-pages && git checkout master
98 |
99 | # Found here: http://blog.pagebakers.nl/2009/01/29/git-ignoring-changes-in-tracked-files/
100 | # Thanks to http://github.com/zdwolfe for tweeting it.
101 | untrack = update-index --assume-unchanged
102 | track = update-index --no-assume-unchanged
103 |
104 | unmerged = !git --no-pager diff --name-status --diff-filter=U
105 |
106 | # Show Git root
107 | root = rev-parse --show-toplevel
108 |
109 | # Easy alias for pull requests
110 | pull-request = "!pr() { git fetch ${2:-origin} refs/pull/$1/head:pr/$1 && git checkout -b $1 pr/$1; }; pr"
111 |
112 | # SVN Commands
113 | spull = !git-svn fetch && git-svn rebase
114 | spush = !git-svn dcommit
115 |
116 | # Fuzzy commands
117 | # Allows adding/diffing/unstaging of files just based on providing part of the file name. Example: `g za .py` will stage all files that match `.py`
118 | za = "!za() { if [[ $# < 1 ]]; then exit; fi; for x in \"$@\"; do git ls-files -m -o --exclude-standard | grep $x | xargs git add; done }; za"
119 | zap = "!zap() { if [[ $# < 1 ]]; then exit; fi; for x in \"$@\"; do git ls-files -m -o --exclude-standard | grep $x | xargs git add -p; done }; zap"
120 | zd = "!zd() { if [[ $# < 1 ]]; then exit; fi; for x in \"$@\"; do git ls-files -m -o --exclude-standard | grep $x | xargs git diff; done }; zd"
121 | zun = "!zun() { if [[ $# < 1 ]]; then exit; fi; for x in \"$@\"; do git diff HEAD --name-only | grep $x | xargs git diff; done }; zun"
122 | [push]
123 | default = simple
124 | [diff]
125 | tool = vimdiff
126 | [difftool]
127 | tool = mvim -d
128 | prompt = false
129 | [pager]
130 | branch = false
131 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .ssh/
2 |
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule ".fonts"]
2 | path = .fonts
3 | url = https://github.com/Lokaltog/powerline-fonts.git
4 |
--------------------------------------------------------------------------------
/.irssi/config:
--------------------------------------------------------------------------------
1 | servers = (
2 | { address = "eu.irc6.net"; chatnet = "IRCnet"; port = "6667"; },
3 | { address = "open.ircnet.net"; chatnet = "IRCnet"; port = "6667"; },
4 | { address = "irc.efnet.org"; chatnet = "EFNet"; port = "6667"; },
5 | {
6 | address = "irc.undernet.org";
7 | chatnet = "Undernet";
8 | port = "6667";
9 | },
10 | { address = "irc.dal.net"; chatnet = "DALnet"; port = "6667"; },
11 | {
12 | address = "irc.quakenet.org";
13 | chatnet = "QuakeNet";
14 | port = "6667";
15 | },
16 | { address = "irc.oftc.net"; chatnet = "OFTC"; port = "6667"; },
17 | {
18 | address = "irc.gamesurge.net";
19 | chatnet = "GameSurge";
20 | port = "6667";
21 | },
22 | { address = "irc.webchat.org"; chatnet = "WebChat"; port = "6667"; },
23 | { address = "irc.rizon.net"; chatnet = "Rizon"; port = "6667"; },
24 | { address = "irc.link-net.org"; chatnet = "LinkNet"; port = "6667"; },
25 | { address = "silc.silcnet.org"; chatnet = "SILC"; port = "706"; },
26 | {
27 | address = "irc.freenode.net";
28 | chatnet = "fn";
29 | port = "6667";
30 | use_ssl = "no";
31 | ssl_verify = "no";
32 | autoconnect = "yes";
33 | }
34 | );
35 |
36 | chatnets = {
37 | IRCnet = {
38 | type = "IRC";
39 | max_kicks = "4";
40 | max_msgs = "5";
41 | max_whois = "4";
42 | max_query_chans = "5";
43 | };
44 | EFNet = {
45 | type = "IRC";
46 | max_kicks = "4";
47 | max_msgs = "3";
48 | max_whois = "1";
49 | };
50 | Undernet = {
51 | type = "IRC";
52 | max_kicks = "1";
53 | max_msgs = "3";
54 | max_whois = "30";
55 | };
56 | DALnet = {
57 | type = "IRC";
58 | max_kicks = "4";
59 | max_msgs = "3";
60 | max_whois = "30";
61 | };
62 | QuakeNet = {
63 | type = "IRC";
64 | max_kicks = "1";
65 | max_msgs = "3";
66 | max_whois = "30";
67 | };
68 | OFTC = {
69 | type = "IRC";
70 | max_kicks = "1";
71 | max_msgs = "3";
72 | max_whois = "30";
73 | };
74 | GameSurge = {
75 | type = "IRC";
76 | max_kicks = "1";
77 | max_msgs = "3";
78 | max_whois = "30";
79 | };
80 | WebChat = {
81 | type = "IRC";
82 | max_kicks = "1";
83 | max_msgs = "3";
84 | max_whois = "30";
85 | };
86 | Rizon = {
87 | type = "IRC";
88 | max_kicks = "1";
89 | max_msgs = "3";
90 | max_whois = "30";
91 | };
92 | LinkNet = {
93 | type = "IRC";
94 | max_kicks = "1";
95 | max_msgs = "3";
96 | max_whois = "30";
97 | };
98 | SILC = { type = "SILC"; };
99 | fn = { type = "IRC"; nick = "napalmbrain"; };
100 | };
101 |
102 | channels = (
103 | { name = "#irssi"; chatnet = "ircnet"; autojoin = "No"; },
104 | { name = "#/r/seattle"; chatnet = "fn"; autojoin = "yes"; },
105 | { name = "#node.js"; chatnet = "fn"; autojoin = "yes"; },
106 | { name = "##cs"; chatnet = "fn"; autojoin = "yes"; },
107 | { name = "##security"; chatnet = "fn"; autojoin = "yes"; },
108 | { name = "python"; chatnet = "fn"; autojoin = "yes"; },
109 | { name = "javascript"; chatnet = "fn"; autojoin = "yes"; },
110 | { name = "vim"; chatnet = "fn"; autojoin = "yes"; },
111 | { name = "#math"; chatnet = "fn"; autojoin = "yes"; },
112 | { name = "startups"; chatnet = "fn"; autojoin = "yes"; },
113 | { name = "#grunt"; chatnet = "fn"; autojoin = "yes"; },
114 | { name = "#ai"; chatnet = "fn"; autojoin = "yes"; },
115 | { name = "#machinelearning"; chatnet = "fn"; autojoin = "yes"; },
116 | { name = "#proggit"; chatnet = "fn"; autojoin = "yes"; },
117 | { name = "#archlinux"; chatnet = "fn"; autojoin = "yes"; }
118 | );
119 |
120 | aliases = {
121 | J = "join";
122 | WJOIN = "join -window";
123 | WQUERY = "query -window";
124 | LEAVE = "part";
125 | BYE = "quit";
126 | EXIT = "quit";
127 | SIGNOFF = "quit";
128 | DESCRIBE = "action";
129 | DATE = "time";
130 | HOST = "userhost";
131 | LAST = "lastlog";
132 | SAY = "msg *";
133 | WI = "whois";
134 | WII = "whois $0 $0";
135 | WW = "whowas";
136 | W = "who";
137 | N = "names";
138 | M = "msg";
139 | T = "topic";
140 | C = "clear";
141 | CL = "clear";
142 | K = "kick";
143 | KB = "kickban";
144 | KN = "knockout";
145 | BANS = "ban";
146 | B = "ban";
147 | MUB = "unban *";
148 | UB = "unban";
149 | IG = "ignore";
150 | UNIG = "unignore";
151 | SB = "scrollback";
152 | UMODE = "mode $N";
153 | WC = "window close";
154 | WN = "window new hide";
155 | SV = "say Irssi $J ($V) - http://irssi.org/";
156 | GOTO = "sb goto";
157 | CHAT = "dcc chat";
158 | RUN = "SCRIPT LOAD";
159 | CALC = "exec - if command -v bc >/dev/null 2>&1\\; then printf '%s=' '$*'\\; echo '$*' | bc -l\\; else echo bc was not found\\; fi";
160 | SBAR = "STATUSBAR";
161 | INVITELIST = "mode $C +I";
162 | Q = "QUERY";
163 | "MANUAL-WINDOWS" = "set use_status_window off;set autocreate_windows off;set autocreate_query_level none;set autoclose_windows off;set reuse_unused_windows on;save";
164 | EXEMPTLIST = "mode $C +e";
165 | ATAG = "WINDOW SERVER";
166 | UNSET = "set -clear";
167 | RESET = "set -default";
168 | };
169 |
170 | statusbar = {
171 | # formats:
172 | # when using {templates}, the template is shown only if it's argument isn't
173 | # empty unless no argument is given. for example {sb} is printed always,
174 | # but {sb $T} is printed only if $T isn't empty.
175 |
176 | items = {
177 | # start/end text in statusbars
178 | barstart = "{sbstart}";
179 | barend = "{sbend}";
180 |
181 | topicbarstart = "{topicsbstart}";
182 | topicbarend = "{topicsbend}";
183 |
184 | # treated "normally", you could change the time/user name to whatever
185 | time = "{sb $Z}";
186 | user = "{sb {sbnickmode $cumode}$N{sbmode $usermode}{sbaway $A}}";
187 |
188 | # treated specially .. window is printed with non-empty windows,
189 | # window_empty is printed with empty windows
190 | window = "{sb $winref:$tag/$itemname{sbmode $M}}";
191 | window_empty = "{sb $winref{sbservertag $tag}}";
192 | prompt = "{prompt $[.15]itemname}";
193 | prompt_empty = "{prompt $winname}";
194 | topic = " $topic";
195 | topic_empty = " Irssi v$J - http://www.irssi.org";
196 |
197 | # all of these treated specially, they're only displayed when needed
198 | lag = "{sb Lag: $0-}";
199 | act = "{sb Act: $0-}";
200 | more = "-- more --";
201 | };
202 |
203 | # there's two type of statusbars. root statusbars are either at the top
204 | # of the screen or at the bottom of the screen. window statusbars are at
205 | # the top/bottom of each split window in screen.
206 | default = {
207 | # the "default statusbar" to be displayed at the bottom of the window.
208 | # contains all the normal items.
209 | window = {
210 | disabled = "no";
211 |
212 | # window, root
213 | type = "window";
214 | # top, bottom
215 | placement = "bottom";
216 | # number
217 | position = "1";
218 | # active, inactive, always
219 | visible = "active";
220 |
221 | # list of items in statusbar in the display order
222 | items = {
223 | barstart = { priority = "100"; };
224 | time = { };
225 | user = { };
226 | window = { };
227 | window_empty = { };
228 | lag = { priority = "-1"; };
229 | act = { priority = "10"; };
230 | more = { priority = "-1"; alignment = "right"; };
231 | barend = { priority = "100"; alignment = "right"; };
232 | };
233 | };
234 |
235 | # statusbar to use in inactive split windows
236 | window_inact = {
237 | type = "window";
238 | placement = "bottom";
239 | position = "1";
240 | visible = "inactive";
241 | items = {
242 | barstart = { priority = "100"; };
243 | window = { };
244 | window_empty = { };
245 | more = { priority = "-1"; alignment = "right"; };
246 | barend = { priority = "100"; alignment = "right"; };
247 | };
248 | };
249 |
250 | # we treat input line as yet another statusbar :) It's possible to
251 | # add other items before or after the input line item.
252 | prompt = {
253 | type = "root";
254 | placement = "bottom";
255 | # we want to be at the bottom always
256 | position = "100";
257 | visible = "always";
258 | items = {
259 | prompt = { priority = "-1"; };
260 | prompt_empty = { priority = "-1"; };
261 | # treated specially, this is the real input line.
262 | input = { priority = "10"; };
263 | };
264 | };
265 |
266 | # topicbar
267 | topic = {
268 | type = "root";
269 | placement = "top";
270 | position = "1";
271 | visible = "always";
272 | items = {
273 | topicbarstart = { priority = "100"; };
274 | topic = { };
275 | topic_empty = { };
276 | topicbarend = { priority = "100"; alignment = "right"; };
277 | };
278 | };
279 | awl_0 = {
280 | items = {
281 | barstart = { priority = "100"; };
282 | awl_0 = { };
283 | barend = { priority = "100"; alignment = "right"; };
284 | };
285 | };
286 | };
287 | };
288 | settings = {
289 | core = {
290 | real_name = "Scatter Brain";
291 | user_name = "napalmbrain";
292 | nick = "napalmbrain";
293 | };
294 | "fe-text" = { actlist_sort = "refnum"; };
295 | "fe-common/core" = { autolog = "yes"; };
296 | "perl/core/scripts" = {
297 | notifier_on_nick = "napalmbrain";
298 | notifier_on_regex = "napalmbrain";
299 | notifier_on_privmsg = "1";
300 | notifier_channel_regex = ".*";
301 | };
302 | };
303 | logs = { };
304 |
--------------------------------------------------------------------------------
/.irssi/default.theme:
--------------------------------------------------------------------------------
1 | # When testing changes, the easiest way to reload the theme is with /RELOAD.
2 | # This reloads the configuration file too, so if you did any changes remember
3 | # to /SAVE it first. Remember also that /SAVE overwrites the theme file with
4 | # old data so keep backups :)
5 |
6 | # TEMPLATES:
7 |
8 | # The real text formats that irssi uses are the ones you can find with
9 | # /FORMAT command. Back in the old days all the colors and texts were mixed
10 | # up in those formats, and it was really hard to change the colors since you
11 | # might have had to change them in tens of different places. So, then came
12 | # this templating system.
13 |
14 | # Now the /FORMATs don't have any colors in them, and they also have very
15 | # little other styling. Most of the stuff you need to change is in this
16 | # theme file. If you can't change something here, you can always go back
17 | # to change the /FORMATs directly, they're also saved in these .theme files.
18 |
19 | # So .. the templates. They're those {blahblah} parts you see all over the
20 | # /FORMATs and here. Their usage is simply {name parameter1 parameter2}.
21 | # When irssi sees this kind of text, it goes to find "name" from abstracts
22 | # block below and sets "parameter1" into $0 and "parameter2" into $1 (you
23 | # can have more parameters of course). Templates can have subtemplates.
24 | # Here's a small example:
25 | # /FORMAT format hello {colorify {underline world}}
26 | # abstracts = { colorify = "%G$0-%n"; underline = "%U$0-%U"; }
27 | # When irssi expands the templates in "format", the final string would be:
28 | # hello %G%Uworld%U%n
29 | # ie. underlined bright green "world" text.
30 | # and why "$0-", why not "$0"? $0 would only mean the first parameter,
31 | # $0- means all the parameters. With {underline hello world} you'd really
32 | # want to underline both of the words, not just the hello (and world would
33 | # actually be removed entirely).
34 |
35 | # COLORS:
36 |
37 | # You can find definitions for the color format codes in docs/formats.txt.
38 |
39 | # There's one difference here though. %n format. Normally it means the
40 | # default color of the terminal (white mostly), but here it means the
41 | # "reset color back to the one it was in higher template". For example
42 | # if there was /FORMAT test %g{foo}bar, and foo = "%Y$0%n", irssi would
43 | # print yellow "foo" (as set with %Y) but "bar" would be green, which was
44 | # set at the beginning before the {foo} template. If there wasn't the %g
45 | # at start, the normal behaviour of %n would occur. If you _really_ want
46 | # to use the terminal's default color, use %N.
47 |
48 | #############################################################################
49 |
50 | # default foreground color (%N) - -1 is the "default terminal color"
51 | default_color = "-1";
52 |
53 | # print timestamp/servertag at the end of line, not at beginning
54 | info_eol = "false";
55 |
56 | # these characters are automatically replaced with specified color
57 | # (dark grey by default)
58 | replaces = { "[]=" = "%K$*%n"; };
59 |
60 | abstracts = {
61 | ##
62 | ## generic
63 | ##
64 |
65 | # text to insert at the beginning of each non-message line
66 | line_start = "%B-%n!%B-%n ";
67 |
68 | # timestamp styling, nothing by default
69 | timestamp = "$*";
70 |
71 | # any kind of text that needs hilighting, default is to bold
72 | hilight = "%_$*%_";
73 |
74 | # any kind of error message, default is bright red
75 | error = "%R$*%n";
76 |
77 | # channel name is printed
78 | channel = "%_$*%_";
79 |
80 | # nick is printed
81 | nick = "%_$*%_";
82 |
83 | # nick host is printed
84 | nickhost = "[$*]";
85 |
86 | # server name is printed
87 | server = "%_$*%_";
88 |
89 | # some kind of comment is printed
90 | comment = "[$*]";
91 |
92 | # reason for something is printed (part, quit, kick, ..)
93 | reason = "{comment $*}";
94 |
95 | # mode change is printed ([+o nick])
96 | mode = "{comment $*}";
97 |
98 | ##
99 | ## channel specific messages
100 | ##
101 |
102 | # highlighted nick/host is printed (joins)
103 | channick_hilight = "%C$*%n";
104 | chanhost_hilight = "{nickhost %c$*%n}";
105 |
106 | # nick/host is printed (parts, quits, etc.)
107 | channick = "%c$*%n";
108 | chanhost = "{nickhost $*}";
109 |
110 | # highlighted channel name is printed
111 | channelhilight = "%c$*%n";
112 |
113 | # ban/ban exception/invite list mask is printed
114 | ban = "%c$*%n";
115 |
116 | ##
117 | ## messages
118 | ##
119 |
120 | # the basic styling of how to print message, $0 = nick mode, $1 = nick
121 | msgnick = "%K<%n$0$1-%K>%n %|";
122 |
123 | # message from you is printed. "msgownnick" specifies the styling of the
124 | # nick ($0 part in msgnick) and "ownmsgnick" specifies the styling of the
125 | # whole line.
126 |
127 | # Example1: You want the message text to be green:
128 | # ownmsgnick = "{msgnick $0 $1-}%g";
129 | # Example2.1: You want < and > chars to be yellow:
130 | # ownmsgnick = "%Y{msgnick $0 $1-%Y}%n";
131 | # (you'll also have to remove <> from replaces list above)
132 | # Example2.2: But you still want to keep <> grey for other messages:
133 | # pubmsgnick = "%K{msgnick $0 $1-%K}%n";
134 | # pubmsgmenick = "%K{msgnick $0 $1-%K}%n";
135 | # pubmsghinick = "%K{msgnick $1 $0$2-%n%K}%n";
136 | # ownprivmsgnick = "%K{msgnick $*%K}%n";
137 | # privmsgnick = "%K{msgnick %R$*%K}%n";
138 |
139 | # $0 = nick mode, $1 = nick
140 | ownmsgnick = "{msgnick $0 $1-}";
141 | ownnick = "%_$*%n";
142 |
143 | # public message in channel, $0 = nick mode, $1 = nick
144 | pubmsgnick = "{msgnick $0 $1-}";
145 | pubnick = "%N$*%n";
146 |
147 | # public message in channel meant for me, $0 = nick mode, $1 = nick
148 | pubmsgmenick = "{msgnick $0 $1-}";
149 | menick = "%Y$*%n";
150 |
151 | # public highlighted message in channel
152 | # $0 = highlight color, $1 = nick mode, $2 = nick
153 | pubmsghinick = "{msgnick $1 $0$2-%n}";
154 |
155 | # channel name is printed with message
156 | msgchannel = "%K:%c$*%n";
157 |
158 | # private message, $0 = nick, $1 = host
159 | privmsg = "[%R$0%K(%r$1-%K)%n] ";
160 |
161 | # private message from you, $0 = "msg", $1 = target nick
162 | ownprivmsg = "[%r$0%K(%R$1-%K)%n] ";
163 |
164 | # own private message in query
165 | ownprivmsgnick = "{msgnick $*}";
166 | ownprivnick = "%_$*%n";
167 |
168 | # private message in query
169 | privmsgnick = "{msgnick %R$*%n}";
170 |
171 | ##
172 | ## Actions (/ME stuff)
173 | ##
174 |
175 | # used internally by this theme
176 | action_core = "%_ * $*%n";
177 |
178 | # generic one that's used by most actions
179 | action = "{action_core $*} ";
180 |
181 | # own action, both private/public
182 | ownaction = "{action $*}";
183 |
184 | # own action with target, both private/public
185 | ownaction_target = "{action_core $0}%K:%c$1%n ";
186 |
187 | # private action sent by others
188 | pvtaction = "%_ (*) $*%n ";
189 | pvtaction_query = "{action $*}";
190 |
191 | # public action sent by others
192 | pubaction = "{action $*}";
193 |
194 |
195 | ##
196 | ## other IRC events
197 | ##
198 |
199 | # whois
200 | whois = "%# $[8]0 : $1-";
201 |
202 | # notices
203 | ownnotice = "[%r$0%K(%R$1-%K)]%n ";
204 | notice = "%K-%M$*%K-%n ";
205 | pubnotice_channel = "%K:%m$*";
206 | pvtnotice_host = "%K(%m$*%K)";
207 | servernotice = "%g!$*%n ";
208 |
209 | # CTCPs
210 | ownctcp = "[%r$0%K(%R$1-%K)] ";
211 | ctcp = "%g$*%n";
212 |
213 | # wallops
214 | wallop = "%_$*%n: ";
215 | wallop_nick = "%n$*";
216 | wallop_action = "%_ * $*%n ";
217 |
218 | # netsplits
219 | netsplit = "%R$*%n";
220 | netjoin = "%C$*%n";
221 |
222 | # /names list
223 | names_prefix = "";
224 | names_nick = "[%_$0%_$1-] ";
225 | names_nick_op = "{names_nick $*}";
226 | names_nick_halfop = "{names_nick $*}";
227 | names_nick_voice = "{names_nick $*}";
228 | names_users = "[%g$*%n]";
229 | names_channel = "%G$*%n";
230 |
231 | # DCC
232 | dcc = "%g$*%n";
233 | dccfile = "%_$*%_";
234 |
235 | # DCC chat, own msg/action
236 | dccownmsg = "[%r$0%K($1-%K)%n] ";
237 | dccownnick = "%R$*%n";
238 | dccownquerynick = "%_$*%n";
239 | dccownaction = "{action $*}";
240 | dccownaction_target = "{action_core $0}%K:%c$1%n ";
241 |
242 | # DCC chat, others
243 | dccmsg = "[%G$1-%K(%g$0%K)%n] ";
244 | dccquerynick = "%G$*%n";
245 | dccaction = "%_ (*dcc*) $*%n %|";
246 |
247 | ##
248 | ## statusbar
249 | ##
250 |
251 | # default background for all statusbars. You can also give
252 | # the default foreground color for statusbar items.
253 | sb_background = "%4%w";
254 |
255 | # default backround for "default" statusbar group
256 | #sb_default_bg = "%4";
257 | # background for prompt / input line
258 | sb_prompt_bg = "%n";
259 | # background for info statusbar
260 | sb_info_bg = "%8";
261 | # background for topicbar (same default)
262 | #sb_topic_bg = "%4";
263 |
264 | # text at the beginning of statusbars. sb-item already puts
265 | # space there,so we don't use anything by default.
266 | sbstart = "";
267 | # text at the end of statusbars. Use space so that it's never
268 | # used for anything.
269 | sbend = " ";
270 |
271 | topicsbstart = "{sbstart $*}";
272 | topicsbend = "{sbend $*}";
273 |
274 | prompt = "[$*] ";
275 |
276 | sb = " %c[%n$*%c]%n";
277 | sbmode = "(%c+%n$*)";
278 | sbaway = " (%GzZzZ%n)";
279 | sbservertag = ":$0 (change with ^X)";
280 | sbnickmode = "$0";
281 |
282 | # activity in statusbar
283 |
284 | # ',' separator
285 | sb_act_sep = "%c$*";
286 | # normal text
287 | sb_act_text = "%c$*";
288 | # public message
289 | sb_act_msg = "%W$*";
290 | # hilight
291 | sb_act_hilight = "%M$*";
292 | # hilight with specified color, $0 = color, $1 = text
293 | sb_act_hilight_color = "$0$1-%n";
294 | };
295 |
--------------------------------------------------------------------------------
/.irssi/scripts/autorun/identify.pl:
--------------------------------------------------------------------------------
1 | ../identify.pl
--------------------------------------------------------------------------------
/.irssi/scripts/autorun/nickcolor.pl:
--------------------------------------------------------------------------------
1 | ../nickcolor.pl
--------------------------------------------------------------------------------
/.irssi/scripts/autorun/notifier.pl:
--------------------------------------------------------------------------------
1 | ../notifier.pl
--------------------------------------------------------------------------------
/.irssi/scripts/autorun/trackbar.pl:
--------------------------------------------------------------------------------
1 | ../trackbar.pl
--------------------------------------------------------------------------------
/.irssi/scripts/autorun/windowlist.pl:
--------------------------------------------------------------------------------
1 | ../windowlist.pl
--------------------------------------------------------------------------------
/.irssi/scripts/identify.pl:
--------------------------------------------------------------------------------
1 | use strict;
2 | use Irssi;
3 | use vars qw($VERSION %IRSSI);
4 |
5 | sub cmd_identify {
6 | my ($data, $server, $witem) = @_;
7 | my ($password) = split(/\s+/, $data, 1);
8 |
9 | $server->command("QUOTE NickServ identify $password");
10 | }
11 |
12 | Irssi::command_bind('identify', 'cmd_identify');
13 |
--------------------------------------------------------------------------------
/.irssi/scripts/nickcolor.pl:
--------------------------------------------------------------------------------
1 | use strict;
2 | use Irssi 20020101.0250 ();
3 | use vars qw($VERSION %IRSSI);
4 | $VERSION = "1";
5 | %IRSSI = (
6 | authors => "Timo Sirainen, Ian Peters",
7 | contact => "tss\@iki.fi",
8 | name => "Nick Color",
9 | description => "assign a different color for each nick",
10 | license => "Public Domain",
11 | url => "http://irssi.org/",
12 | changed => "2002-03-04T22:47+0100"
13 | );
14 |
15 | # hm.. i should make it possible to use the existing one..
16 | Irssi::theme_register([
17 | 'pubmsg_hilight', '{pubmsghinick $0 $3 $1}$2'
18 | ]);
19 |
20 | my %saved_colors;
21 | my %session_colors = {};
22 | my @colors = qw/2 3 4 5 6 7 9 10 11 12 13/;
23 |
24 | sub load_colors {
25 | open COLORS, "$ENV{HOME}/.irssi/saved_colors";
26 |
27 | while () {
28 | # I don't know why this is necessary only inside of irssi
29 | my @lines = split "\n";
30 | foreach my $line (@lines) {
31 | my($nick, $color) = split ":", $line;
32 | $saved_colors{$nick} = $color;
33 | }
34 | }
35 |
36 | close COLORS;
37 | }
38 |
39 | sub save_colors {
40 | open COLORS, ">$ENV{HOME}/.irssi/saved_colors";
41 |
42 | foreach my $nick (keys %saved_colors) {
43 | print COLORS "$nick:$saved_colors{$nick}\n";
44 | }
45 |
46 | close COLORS;
47 | }
48 |
49 | # If someone we've colored (either through the saved colors, or the hash
50 | # function) changes their nick, we'd like to keep the same color associated
51 | # with them (but only in the session_colors, ie a temporary mapping).
52 |
53 | sub sig_nick {
54 | my ($server, $newnick, $nick, $address) = @_;
55 | my $color;
56 |
57 | $newnick = substr ($newnick, 1) if ($newnick =~ /^:/);
58 |
59 | if ($color = $saved_colors{$nick}) {
60 | $session_colors{$newnick} = $color;
61 | } elsif ($color = $session_colors{$nick}) {
62 | $session_colors{$newnick} = $color;
63 | }
64 | }
65 |
66 | # This gave reasonable distribution values when run across
67 | # /usr/share/dict/words
68 |
69 | sub simple_hash {
70 | my ($string) = @_;
71 | chomp $string;
72 | my @chars = split //, $string;
73 | my $counter;
74 |
75 | foreach my $char (@chars) {
76 | $counter += ord $char;
77 | }
78 |
79 | $counter = $colors[$counter % 11];
80 |
81 | return $counter;
82 | }
83 |
84 | # FIXME: breaks /HILIGHT etc.
85 | sub sig_public {
86 | my ($server, $msg, $nick, $address, $target) = @_;
87 | my $chanrec = $server->channel_find($target);
88 | return if not $chanrec;
89 | my $nickrec = $chanrec->nick_find($nick);
90 | return if not $nickrec;
91 | my $nickmode = $nickrec->{op} ? "@" : $nickrec->{voice} ? "+" : "";
92 |
93 | # Has the user assigned this nick a color?
94 | my $color = $saved_colors{$nick};
95 |
96 | # Have -we- already assigned this nick a color?
97 | if (!$color) {
98 | $color = $session_colors{$nick};
99 | }
100 |
101 | # Let's assign this nick a color
102 | if (!$color) {
103 | $color = simple_hash $nick;
104 | $session_colors{$nick} = $color;
105 | }
106 |
107 | $color = "0".$color if ($color < 10);
108 | $server->command('/^format pubmsg {pubmsgnick $2 {pubnick '.chr(3).$color.'$0}}$1');
109 | }
110 |
111 | sub cmd_color {
112 | my ($data, $server, $witem) = @_;
113 | my ($op, $nick, $color) = split " ", $data;
114 |
115 | $op = lc $op;
116 |
117 | if (!$op) {
118 | Irssi::print ("No operation given");
119 | } elsif ($op eq "save") {
120 | save_colors;
121 | } elsif ($op eq "set") {
122 | if (!$nick) {
123 | Irssi::print ("Nick not given");
124 | } elsif (!$color) {
125 | Irssi::print ("Color not given");
126 | } elsif ($color < 2 || $color > 14) {
127 | Irssi::print ("Color must be between 2 and 14 inclusive");
128 | } else {
129 | $saved_colors{$nick} = $color;
130 | }
131 | } elsif ($op eq "clear") {
132 | if (!$nick) {
133 | Irssi::print ("Nick not given");
134 | } else {
135 | delete ($saved_colors{$nick});
136 | }
137 | } elsif ($op eq "list") {
138 | Irssi::print ("\nSaved Colors:");
139 | foreach my $nick (keys %saved_colors) {
140 | Irssi::print (chr (3) . "$saved_colors{$nick}$nick" .
141 | chr (3) . "1 ($saved_colors{$nick})");
142 | }
143 | } elsif ($op eq "preview") {
144 | Irssi::print ("\nAvailable colors:");
145 | foreach my $i (2..14) {
146 | Irssi::print (chr (3) . "$i" . "Color #$i");
147 | }
148 | }
149 | }
150 |
151 | load_colors;
152 |
153 | Irssi::command_bind('color', 'cmd_color');
154 |
155 | Irssi::signal_add('message public', 'sig_public');
156 | Irssi::signal_add('event nick', 'sig_nick');
157 |
--------------------------------------------------------------------------------
/.irssi/scripts/notifier.pl:
--------------------------------------------------------------------------------
1 | # == WHAT
2 | # Simple script for irssi to trigger Mac OS X 10.8's Notification Center
3 | #
4 | # == WHO
5 | # Patrick Kontschak 2012
6 | #
7 | # Forked from Nate Murray's irssi-growl: https://github.com/jashmenn/irssi-growl
8 | #
9 | # == CONFIG
10 | # /SET notifier_on_regex [regex]
11 | # /SET notifier_channel_regex [regex]
12 | #
13 | # == EXAMPLES
14 | #
15 | # notifier on mynickname
16 | # /SET notifier_on_regex mynickname
17 | #
18 | # notifier on everything:
19 | # /SET notifier_on_regex .*
20 | #
21 | # everything but jdewey
22 | # /SET notifier_on_regex (?=^(?:(?!jdewey).)*$).*
23 | #
24 | # only notifier things for mychannel1 and mychannel2
25 | # /SET notifier_channel_regex (mychannel1|mychannel2)
26 | #
27 | # == INSTALL
28 | # Place notifier.pl in `~/.irssi/scripts/`.
29 | # /script load notifier.pl
30 | #
31 |
32 | use strict;
33 | use Irssi;
34 | use vars qw($VERSION %IRSSI);
35 | # use Config;
36 |
37 | # Dev. info ^_^
38 | $VERSION = "0.0";
39 | %IRSSI = (
40 | authors => "Patrick Kontschak",
41 | contact => "patrick.kontschak\@gmail.com",
42 | name => "Notifier",
43 | description => "Simple script that will trigger Mac OS X 10.8's Notification Center",
44 | license => "GPL",
45 | url => "http://www.codinggoat.com",
46 | changed => "Wed 8 Aug 2012 14:40:15 EDT"
47 | );
48 |
49 | # All the works
50 | sub do_notifier {
51 | my ($server, $title, $data) = @_;
52 | $data =~ s/["';]//g;
53 | system("terminal-notifier -message '$data' -title '$title' >> /dev/null 2>&1");
54 | return 1
55 | }
56 |
57 | sub notifier_it {
58 | my ($server, $title, $data, $channel, $nick) = @_;
59 |
60 | my $filter = Irssi::settings_get_str('notifier_on_regex');
61 | my $channel_filter = Irssi::settings_get_str('notifier_channel_regex');
62 | my $notifier_on_nick = Irssi::settings_get_str('notifier_on_nick');
63 |
64 | my $current_nick = $server->{nick};
65 | if($filter) {
66 | return 0 if $data !~ /$filter/;
67 | }
68 | if($channel_filter && $server->ischannel($channel)) {
69 | return 0 if $channel !~ /$channel_filter/;
70 | }
71 |
72 | $title = $title . " " . $channel;
73 | do_notifier($server, $title, $data);
74 | }
75 |
76 | # All the works
77 | sub notifier_message {
78 | my ($server, $data, $nick, $mask, $target) = @_;
79 | notifier_it($server, $nick, $data, $target, $nick);
80 | Irssi::signal_continue($server, $data, $nick, $mask, $target);
81 | }
82 |
83 | sub notifier_join {
84 | my ($server, $channel, $nick, $address) = @_;
85 | notifier_it($server, "Join", "$nick has joined", $channel, $nick);
86 | Irssi::signal_continue($server, $channel, $nick, $address);
87 | }
88 |
89 | sub notifier_part {
90 | my ($server, $channel, $nick, $address) = @_;
91 | notifier_it($server, "Part", "$nick has parted", $channel, $nick);
92 | Irssi::signal_continue($server, $channel, $nick, $address);
93 | }
94 |
95 | sub notifier_quit {
96 | my ($server, $nick, $address, $reason) = @_;
97 | notifier_it($server, "Quit", "$nick has quit: $reason", $server, $nick);
98 | Irssi::signal_continue($server, $nick, $address, $reason);
99 | }
100 |
101 | sub notifier_invite {
102 | my ($server, $channel, $nick, $address) = @_;
103 | notifier_it($server, "Invite", "$nick has invited you on $channel", $channel, $nick);
104 | Irssi::signal_continue($server, $channel, $address);
105 | }
106 |
107 | sub notifier_topic {
108 | my ($server, $channel, $topic, $nick, $address) = @_;
109 | notifier_it($server, "Topic: $topic", "$nick has changed the topic to $topic on $channel", $channel, $nick);
110 | Irssi::signal_continue($server, $channel, $topic, $nick, $address);
111 | }
112 |
113 | sub notifier_privmsg {
114 | # $server = server record where the message came
115 | # $data = the raw data received from server, with PRIVMSGs it is:
116 | # "target :text" where target is either your nick or #channel
117 | # $nick = the nick who sent the message
118 | # $host = host of the nick who sent the message
119 | my ($server, $data, $nick, $host) = @_;
120 | my ($target, $text) = split(/ :/, $data, 2);
121 | # only notify if we're permitting notification on privmsg
122 | if (Irssi::settings_get_str('notifier_on_privmsg') == 1) {
123 | notifier_it($server, $nick, $data, $target, $nick);
124 | }
125 | Irssi::signal_continue($server, $data, $nick, $host);
126 | }
127 |
128 | # Hook me up
129 | Irssi::settings_add_str('misc', 'notifier_on_regex', 0); # false
130 | Irssi::settings_add_str('misc', 'notifier_channel_regex', 0); # false
131 | Irssi::settings_add_str('misc', 'notifier_on_nick', 1); # true
132 | Irssi::settings_add_str('misc', 'notifier_on_privmsg', 0); # false
133 | Irssi::signal_add('message public', 'notifier_message');
134 | Irssi::signal_add('message private', 'notifier_message');
135 | Irssi::signal_add('message own_public', 'notifier_message');
136 | Irssi::signal_add('message own_private', 'notifier_message');
137 | Irssi::signal_add('message join', 'notifier_join');
138 | Irssi::signal_add('message part', 'notifier_part');
139 | Irssi::signal_add('message quit', 'notifier_quit');
140 | Irssi::signal_add('message invite', 'notifier_invite');
141 | Irssi::signal_add('message topic', 'notifier_topic');
142 | Irssi::signal_add('event privmsg', 'notifier_privmsg');
143 |
--------------------------------------------------------------------------------
/.irssi/scripts/trackbar.pl:
--------------------------------------------------------------------------------
1 | # trackbar.pl
2 | #
3 | # This little script will do just one thing: it will draw a line each time you
4 | # switch away from a window. This way, you always know just upto where you've
5 | # been reading that window :) It also removes the previous drawn line, so you
6 | # don't see double lines.
7 | #
8 | # Usage:
9 | #
10 | # The script works right out of the box, but if you want you can change
11 | # the working by /set'ing the following variables:
12 | #
13 | # trackbar_string The characters to repeat to draw the bar
14 | # trackbar_style The style for the bar, %r is red for example
15 | # See formats.txt that came with irssi
16 | #
17 | # /mark is a command that will redraw the line at the bottom. However! This
18 | # requires irssi version after 20021228. otherwise you'll get the error
19 | # redraw: unknown command, and your screen is all goofed up :)
20 | #
21 | # /upgrade & buf.pl notice: This version tries to remove the trackbars before
22 | # the upgrade is done, so buf.pl does not restore them, as they are not removeable
23 | # afterwards by trackbar. Unfortiounatly, to make this work, trackbar and buf.pl
24 | # need to be loaded in a specific order. Please experiment to see which order works
25 | # for you (strangely, it differs from configuration to configuration, something I will
26 | # try to fix in a next version)
27 | #
28 | # Authors:
29 | # - Main maintainer & author: Peter 'kinlo' Leurs
30 | # - Many thanks to Timo 'cras' Sirainen for placing me on my way
31 | # - on-upgrade-remove-line patch by Uwe Dudenhoeffer
32 | #
33 | # Version history:
34 | # 1.4: - Changed our's by my's so the irssi script header is valid
35 | # - Removed utf-8 support. In theory, the script should work w/o any
36 | # problems for utf-8, just set trackbar_string to a valid utf-8 character
37 | # and everything *should* work. However, this script is being plagued by
38 | # irssi internal bugs. The function Irssi::settings_get_str does NOT handle
39 | # unicode strings properly, hence you will notice problems when setting the bar
40 | # to a unicode char. For changing your bar to utf-8 symbols, read the line sub.
41 | # 1.3: - Upgrade now removes the trackbars.
42 | # - Some code cleanups, other defaults
43 | # - /mark sets the line to the bottom
44 | # 1.2: - Support for utf-8
45 | # - How the bar looks can now be configured with trackbar_string
46 | # and trackbar_style
47 | # 1.1: - Fixed bug when closing window
48 | # 1.0: - Initial release
49 | #
50 | #
51 | # Call for help!
52 | #
53 | # There is a trackbar version 2.0 that properly handles resizes and immediate config change
54 | # activation. However, there is/are some bug(s) in irssi's main buffer/window code that causes
55 | # irssi to 'forget' lines, which is ofcourse completly unaccepteable. I haven't found the time
56 | # nor do I know the irssi's internals enough to find and fix this bug, if you want to help, please
57 | # contact me, I'll give you a copy of the 2.0 version that will immediatly show you the problems.
58 | #
59 | # Known bugs:
60 | # - if you /clear a window, it will be uncleared when returning to the window
61 | # - UTF-8 characters in the trackbar_string doesnt work. This is an irssi bug.
62 | # - if you resize your irssi (in xterm or so) the bar is not resized
63 | # - changing the trackbar style is only visible after returning to a window
64 | # however, changing style/resize takes in effect after you left the window.
65 | #
66 | # Whishlist/todo:
67 | # - instead of drawing a line, just invert timestamp or something,
68 | # to save a line (but I don't think this is possible with current irssi)
69 | # - some pageup keybinding possibility, to scroll up upto the trackbar
70 | # - <@coekie> kinlo: if i switch to another window, in another split window, i
71 | # want the trackbar to go down in the previouswindow in that splitwindow :)
72 | # - < bob_2> anyway to clear the line once the window is read?
73 | # - < elho> kinlo: wishlist item: a string that gets prepended to the repeating pattern
74 | # - < elho> an option to still have the timestamp in front of the bar
75 | # - < elho> oh and an option to not draw it in the status window :P
76 | #
77 | # BTW: when you have feature requests, mailing a patch that works is the fastest way
78 | # to get it added :p
79 |
80 | use strict;
81 | use 5.6.1;
82 | use Irssi;
83 | use Irssi::TextUI;
84 |
85 | my $VERSION = "1.4";
86 |
87 | my %IRSSI = (
88 | authors => "Peter 'kinlo' Leurs",
89 | contact => "peter\@pfoe.be",
90 | name => "trackbar",
91 | description => "Shows a bar where you've last read a window",
92 | license => "GPLv2",
93 | url => "http://www.pfoe.be/~peter/trackbar/",
94 | changed => "Thu Feb 20 16:18:08 2003",
95 | );
96 |
97 | my %config;
98 |
99 | Irssi::settings_add_str('trackbar', 'trackbar_string' => '-');
100 | $config{'trackbar_string'} = Irssi::settings_get_str('trackbar_string');
101 |
102 | Irssi::settings_add_str('trackbar', 'trackbar_style' => '%K');
103 | $config{'trackbar_style'} = Irssi::settings_get_str('trackbar_style');
104 |
105 | Irssi::signal_add(
106 | 'setup changed' => sub {
107 | $config{'trackbar_string'} = Irssi::settings_get_str('trackbar_string');
108 | $config{'trackbar_style'} = Irssi::settings_get_str('trackbar_style');
109 | if ($config{'trackbar_style'} =~ /(? sub {
120 | my (undef, $oldwindow) = @_;
121 |
122 | if ($oldwindow) {
123 | my $line = $oldwindow->view()->get_bookmark('trackbar');
124 | $oldwindow->view()->remove_line($line) if defined $line;
125 | $oldwindow->print(line($oldwindow->{'width'}), MSGLEVEL_NEVER);
126 | $oldwindow->view()->set_bookmark_bottom('trackbar');
127 | }
128 | }
129 | );
130 |
131 | sub line {
132 | my $width = shift;
133 | my $string = $config{'trackbar_string'};
134 | $string = '-' unless defined $string;
135 |
136 | # There is a bug in irssi's utf-8 handling on config file settings, as you
137 | # can reproduce/see yourself by the following code sniplet:
138 | #
139 | # my $quake = pack 'U*', 8364; # EUR symbol
140 | # Irssi::settings_add_str 'temp', 'temp_foo' => $quake;
141 | # Irssi::print length $quake;
142 | # # prints 1
143 | # Irssi::print length Irssi::settings_get_str 'temp_foo';
144 | # # prints 3
145 | #
146 | #
147 | # Trackbar used to have a workaround, but on recent versions of perl/irssi
148 | # it does no longer work. Therefore, if you want your trackbar to contain
149 | # unicode characters, uncomment the line below for a nice full line, or set
150 | # the string to whatever char you want.
151 |
152 | # $string = pack('U*', 0x2500);
153 |
154 |
155 | my $length = length $string;
156 |
157 | if ($length == 0) {
158 | $string = '-';
159 | $length = 1;
160 | }
161 |
162 | my $times = $width / $length;
163 | $times = int(1 + $times) if $times != int($times);
164 | $string =~ s/%/%%/g;
165 | return $config{'trackbar_style'} . substr($string x $times, 0, $width);
166 | }
167 |
168 | # Remove trackbars on upgrade - but this doesn't really work if the scripts are not loaded in the correct order... watch out!
169 |
170 | Irssi::signal_add_first( 'session save' => sub {
171 | for my $window (Irssi::windows) {
172 | next unless defined $window;
173 | my $line = $window->view()->get_bookmark('trackbar');
174 | $window->view()->remove_line($line) if defined $line;
175 | }
176 | }
177 | );
178 |
179 | sub cmd_mark {
180 | my $window = Irssi::active_win();
181 | # return unless defined $window;
182 | my $line = $window->view()->get_bookmark('trackbar');
183 | $window->view()->remove_line($line) if defined $line;
184 | $window->print(line($window->{'width'}), MSGLEVEL_NEVER);
185 | $window->view()->set_bookmark_bottom('trackbar');
186 | Irssi::command("redraw");
187 | }
188 |
189 | Irssi::command_bind('mark', 'cmd_mark');
190 |
--------------------------------------------------------------------------------
/.latexmkrc:
--------------------------------------------------------------------------------
1 | if ($^O eq 'darwin') {
2 | # Open Skim when using OS X
3 | $pdf_previewer = "open -a Skim.app";
4 | } else {
5 | # Open Mint's default pdf viewers
6 | $pdf_previewer = "mate-open";
7 | }
8 |
--------------------------------------------------------------------------------
/.nvim:
--------------------------------------------------------------------------------
1 | .vim
--------------------------------------------------------------------------------
/.nvimrc:
--------------------------------------------------------------------------------
1 | .vimrc
--------------------------------------------------------------------------------
/.phoenix.js:
--------------------------------------------------------------------------------
1 | // Josh Davis' Phoenix Config
2 | // Project: https://github.com/kasper/phoenix
3 | // Version: 2.3
4 | //
5 | // Heavily inspired & borrowed from: https://github.com/Keithbsmiley
6 |
7 | var keys = [];
8 | var modifiers = ["ctrl", "shift"];
9 |
10 | // Preferences
11 | Phoenix.set({
12 | // Don't show the menubar icon
13 | 'daemon': true,
14 | 'openAtLogin': true
15 | });
16 |
17 | //
18 | // Helper Functions
19 | //
20 |
21 | var windowToGrid = function (win, x, y, width, height) {
22 | var screen = win.screen().flippedFrame();
23 |
24 | win.setFrame({
25 | x: Math.round(x * screen.width) + screen.x,
26 | y: Math.round(y * screen.height) + screen.y,
27 | width: Math.round(width * screen.width),
28 | height: Math.round(height * screen.height)
29 | });
30 | };
31 |
32 | var toGrid = function (x, y, width, height) {
33 | windowToGrid(Window.focused(), x, y, width, height);
34 | };
35 |
36 | //
37 | // Basic positioning
38 | //
39 |
40 | Window.fullScreen = function() {
41 | toGrid(0, 0, 1, 1);
42 | };
43 |
44 | Window.leftHalf = function() {
45 | toGrid(0, 0, 0.5, 1);
46 | };
47 |
48 | Window.rightHalf = function() {
49 | toGrid(0.5, 0, 0.5, 1);
50 | };
51 |
52 | Window.bottomHalf = function() {
53 | toGrid(0, 0.5, 1, 0.5);
54 | };
55 |
56 | Window.topHalf = function() {
57 | toGrid(0, 0, 1, 0.5);
58 | };
59 |
60 | //
61 | // Quarter Window Functions
62 | //
63 |
64 | Window.topLeft = function() {
65 | toGrid(0, 0, 0.5, 0.5);
66 | };
67 |
68 | Window.bottomLeft = function() {
69 | toGrid(0, 0.5, 0.5, 0.5);
70 | };
71 |
72 | Window.topRight = function() {
73 | toGrid(0.5, 0, 0.5, 0.5);
74 | };
75 |
76 | Window.bottomRight = function() {
77 | toGrid(0.5, 0.5, 0.5, 0.5);
78 | };
79 |
80 | //
81 | // Functions for vertical monitors
82 | //
83 |
84 | Window.topPart = function() {
85 | toGrid(0, 0, 1, 0.25);
86 | };
87 |
88 | Window.bottomPart = function() {
89 | toGrid(0, 0.25, 1, 0.75);
90 | };
91 |
92 | //
93 | // Cycle current window across monitors
94 | //
95 |
96 | Window.throwWindow = function() {
97 | var win = Window.focused();
98 | var winFrame = win.frame();
99 | var current = win.screen().flippedFrame();
100 | var next = win.screen().next().flippedFrame();
101 |
102 | // Proportionally place where it should go based on current placement
103 | var opts = {
104 | x: next.x + (winFrame.x - current.x) / current.width * next.width,
105 | y: next.y + (winFrame.y - current.y) / current.height * next.height,
106 | width: (winFrame.width / current.width) * next.width,
107 | height: (winFrame.height / current.height) * next.height,
108 | };
109 |
110 | win.setFrame(opts);
111 | };
112 |
113 | //
114 | // Helper functions for launching applications
115 | //
116 |
117 | App.allWithTitle = function( title ) {
118 | return _(this.all()).filter( function( app ) {
119 | if (app.name() === title) {
120 | return true;
121 | }
122 | });
123 | };
124 |
125 | // TODO: Fix this
126 | App.focusOrStart = function (title, cmd) {
127 | var apps = App.allWithTitle(title);
128 | if (_.isEmpty(apps)) {
129 | App.launch(title);
130 | return;
131 | }
132 |
133 | var windows = _.chain(apps)
134 | .map(function(x) { return x.windows(); })
135 | .flatten()
136 | .value();
137 |
138 | activeWindows = _(windows).reject(function(win) { return win.isMinimized();});
139 | if (_.isEmpty(activeWindows)) {
140 | Task.run('/bin/bash', ['-c', cmd], function() {});
141 | return;
142 | }
143 |
144 | /*
145 | activeWindows.forEach(function(win) {
146 | win.focus();
147 | });
148 | */
149 | };
150 |
151 | // Rotate current window between monitors
152 | keys.push(Key.on('s', modifiers, Window.throwWindow));
153 |
154 | // Basic monitor keybindings
155 | keys.push(Key.on('f', modifiers, Window.fullScreen));
156 | keys.push(Key.on('h', modifiers, Window.leftHalf));
157 | keys.push(Key.on('l', modifiers, Window.rightHalf));
158 | keys.push(Key.on('j', modifiers, Window.bottomHalf));
159 | keys.push(Key.on('k', modifiers, Window.topHalf));
160 |
161 | // For vertical monitors
162 | keys.push(Key.on('p', modifiers, Window.topPart));
163 | keys.push(Key.on('n', modifiers, Window.bottomPart));
164 |
165 | keys.push(Key.on('space', modifiers, function () { App.focusOrStart('Terminal', 'open -a Terminal $HOME'); }));
166 | keys.push(Key.on('q', modifiers, function () { App.focusOrStart('Finder', 'open -a Finder'); }));
167 |
--------------------------------------------------------------------------------
/.pylintrc:
--------------------------------------------------------------------------------
1 | [MESSAGES CONTROL]
2 | # C0301 - Line too long
3 | disable-msg=C0301
4 |
--------------------------------------------------------------------------------
/.pyrc:
--------------------------------------------------------------------------------
1 | import os, sys, atexit, rlcompleter
2 |
3 | hist_path = os.path.join(os.environ['HOME'], '.pyhist')
4 |
5 | try:
6 | import readline
7 | except ImportError:
8 | try:
9 | import pyreadline as readline
10 | except ImportError:
11 | # I haven't tested this on Windows so I'm not sure if this is an appropriate way to handle it
12 | print 'Could not find readline.'
13 | sys.exit(1)
14 | else:
15 | import rlcompleter
16 | if sys.platform == 'darwin':
17 | readline.parse_and_bind('bind ^I rl_complete')
18 | else:
19 | readline.parse_and_bind('tab: complete')
20 |
21 | atexit.register(readline.write_history_file, hist_path)
22 | del os, sys, readline, rlcompleter, atexit
23 |
--------------------------------------------------------------------------------
/.spacemacs.d/init.el:
--------------------------------------------------------------------------------
1 | ;; -*- mode: emacs-lisp -*-
2 | ;; This file is loaded by Spacemacs at startup.
3 | ;; It must be stored in your home directory.
4 |
5 | (defun dotspacemacs/layers ()
6 | "Configuration Layers declaration.
7 | You should not put any user code in this function besides modifying the variable
8 | values."
9 | (setq-default
10 | ;; Base distribution to use. This is a layer contained in the directory
11 | ;; `+distribution'. For now available distributions are `spacemacs-base'
12 | ;; or `spacemacs'. (default 'spacemacs)
13 | dotspacemacs-distribution 'spacemacs
14 | ;; Lazy installation of layers (i.e. layers are installed only when a file
15 | ;; with a supported type is opened). Possible values are `all', `unused'
16 | ;; and `nil'. `unused' will lazy install only unused layers (i.e. layers
17 | ;; not listed in variable `dotspacemacs-configuration-layers'), `all' will
18 | ;; lazy install any layer that support lazy installation even the layers
19 | ;; listed in `dotspacemacs-configuration-layers'. `nil' disable the lazy
20 | ;; installation feature and you have to explicitly list a layer in the
21 | ;; variable `dotspacemacs-configuration-layers' to install it.
22 | ;; (default 'unused)
23 | dotspacemacs-enable-lazy-installation 'unused
24 | ;; If non-nil then Spacemacs will ask for confirmation before installing
25 | ;; a layer lazily. (default t)
26 | dotspacemacs-ask-for-lazy-installation t
27 | ;; If non-nil layers with lazy install support are lazy installed.
28 | ;; List of additional paths where to look for configuration layers.
29 | ;; Paths must have a trailing slash (i.e. `~/.mycontribs/')
30 | dotspacemacs-configuration-layer-path '()
31 | ;; List of configuration layers to load.
32 | dotspacemacs-configuration-layers
33 | '(
34 | ;; ----------------------------------------------------------------
35 | ;; Example of useful layers you may want to use right away.
36 | ;; Uncomment some layer names and press (Vim style) or
37 | ;; (Emacs style) to install them.
38 | ;; ----------------------------------------------------------------
39 | helm
40 | ;; auto-completion
41 | ;; better-defaults
42 | emacs-lisp
43 | ;; git
44 | ;; markdown
45 | org
46 | ;; (shell :variables
47 | ;; shell-default-height 30
48 | ;; shell-default-position 'bottom)
49 | ;; spell-checking
50 | ;; syntax-checking
51 | ;; version-control
52 | )
53 | ;; List of additional packages that will be installed without being
54 | ;; wrapped in a layer. If you need some configuration for these
55 | ;; packages, then consider creating a layer. You can also put the
56 | ;; configuration in `dotspacemacs/user-config'.
57 | dotspacemacs-additional-packages '()
58 | ;; A list of packages that cannot be updated.
59 | dotspacemacs-frozen-packages '()
60 | ;; A list of packages that will not be installed and loaded.
61 | dotspacemacs-excluded-packages '()
62 | ;; Defines the behaviour of Spacemacs when installing packages.
63 | ;; Possible values are `used-only', `used-but-keep-unused' and `all'.
64 | ;; `used-only' installs only explicitly used packages and uninstall any
65 | ;; unused packages as well as their unused dependencies.
66 | ;; `used-but-keep-unused' installs only the used packages but won't uninstall
67 | ;; them if they become unused. `all' installs *all* packages supported by
68 | ;; Spacemacs and never uninstall them. (default is `used-only')
69 | dotspacemacs-install-packages 'used-only))
70 |
71 | (defun dotspacemacs/init ()
72 | "Initialization function.
73 | This function is called at the very startup of Spacemacs initialization
74 | before layers configuration.
75 | You should not put any user code in there besides modifying the variable
76 | values."
77 | ;; This setq-default sexp is an exhaustive list of all the supported
78 | ;; spacemacs settings.
79 | (setq-default
80 | ;; If non nil ELPA repositories are contacted via HTTPS whenever it's
81 | ;; possible. Set it to nil if you have no way to use HTTPS in your
82 | ;; environment, otherwise it is strongly recommended to let it set to t.
83 | ;; This variable has no effect if Emacs is launched with the parameter
84 | ;; `--insecure' which forces the value of this variable to nil.
85 | ;; (default t)
86 | dotspacemacs-elpa-https t
87 | ;; Maximum allowed time in seconds to contact an ELPA repository.
88 | dotspacemacs-elpa-timeout 5
89 | ;; If non nil then spacemacs will check for updates at startup
90 | ;; when the current branch is not `develop'. Note that checking for
91 | ;; new versions works via git commands, thus it calls GitHub services
92 | ;; whenever you start Emacs. (default nil)
93 | dotspacemacs-check-for-update nil
94 | ;; If non-nil, a form that evaluates to a package directory. For example, to
95 | ;; use different package directories for different Emacs versions, set this
96 | ;; to `emacs-version'.
97 | dotspacemacs-elpa-subdirectory nil
98 | ;; One of `vim', `emacs' or `hybrid'.
99 | ;; `hybrid' is like `vim' except that `insert state' is replaced by the
100 | ;; `hybrid state' with `emacs' key bindings. The value can also be a list
101 | ;; with `:variables' keyword (similar to layers). Check the editing styles
102 | ;; section of the documentation for details on available variables.
103 | ;; (default 'vim)
104 | dotspacemacs-editing-style 'vim
105 | ;; If non nil output loading progress in `*Messages*' buffer. (default nil)
106 | dotspacemacs-verbose-loading nil
107 | ;; Specify the startup banner. Default value is `official', it displays
108 | ;; the official spacemacs logo. An integer value is the index of text
109 | ;; banner, `random' chooses a random text banner in `core/banners'
110 | ;; directory. A string value must be a path to an image format supported
111 | ;; by your Emacs build.
112 | ;; If the value is nil then no banner is displayed. (default 'official)
113 | dotspacemacs-startup-banner 'official
114 | ;; List of items to show in startup buffer or an association list of
115 | ;; the form `(list-type . list-size)`. If nil then it is disabled.
116 | ;; Possible values for list-type are:
117 | ;; `recents' `bookmarks' `projects' `agenda' `todos'."
118 | ;; List sizes may be nil, in which case
119 | ;; `spacemacs-buffer-startup-lists-length' takes effect.
120 | dotspacemacs-startup-lists '((recents . 5)
121 | (projects . 7))
122 | ;; True if the home buffer should respond to resize events.
123 | dotspacemacs-startup-buffer-responsive t
124 | ;; Default major mode of the scratch buffer (default `text-mode')
125 | dotspacemacs-scratch-mode 'text-mode
126 | ;; List of themes, the first of the list is loaded when spacemacs starts.
127 | ;; Press T n to cycle to the next theme in the list (works great
128 | ;; with 2 themes variants, one dark and one light)
129 | dotspacemacs-themes '(spacemacs-dark
130 | spacemacs-light)
131 | ;; If non nil the cursor color matches the state color in GUI Emacs.
132 | dotspacemacs-colorize-cursor-according-to-state t
133 | ;; Default font, or prioritized list of fonts. `powerline-scale' allows to
134 | ;; quickly tweak the mode-line size to make separators look not too crappy.
135 | dotspacemacs-default-font '("Source Code Pro"
136 | :size 13
137 | :weight normal
138 | :width normal
139 | :powerline-scale 1.1)
140 | ;; The leader key
141 | dotspacemacs-leader-key "SPC"
142 | ;; The key used for Emacs commands (M-x) (after pressing on the leader key).
143 | ;; (default "SPC")
144 | dotspacemacs-emacs-command-key "SPC"
145 | ;; The key used for Vim Ex commands (default ":")
146 | dotspacemacs-ex-command-key ":"
147 | ;; The leader key accessible in `emacs state' and `insert state'
148 | ;; (default "M-m")
149 | dotspacemacs-emacs-leader-key "M-m"
150 | ;; Major mode leader key is a shortcut key which is the equivalent of
151 | ;; pressing ` m`. Set it to `nil` to disable it. (default ",")
152 | dotspacemacs-major-mode-leader-key ","
153 | ;; Major mode leader key accessible in `emacs state' and `insert state'.
154 | ;; (default "C-M-m")
155 | dotspacemacs-major-mode-emacs-leader-key "C-M-m"
156 | ;; These variables control whether separate commands are bound in the GUI to
157 | ;; the key pairs C-i, TAB and C-m, RET.
158 | ;; Setting it to a non-nil value, allows for separate commands under
159 | ;; and TAB or and RET.
160 | ;; In the terminal, these pairs are generally indistinguishable, so this only
161 | ;; works in the GUI. (default nil)
162 | dotspacemacs-distinguish-gui-tab nil
163 | ;; If non nil `Y' is remapped to `y$' in Evil states. (default nil)
164 | dotspacemacs-remap-Y-to-y$ nil
165 | ;; If non-nil, the shift mappings `<' and `>' retain visual state if used
166 | ;; there. (default t)
167 | dotspacemacs-retain-visual-state-on-shift t
168 | ;; If non-nil, J and K move lines up and down when in visual mode.
169 | ;; (default nil)
170 | dotspacemacs-visual-line-move-text nil
171 | ;; If non nil, inverse the meaning of `g' in `:substitute' Evil ex-command.
172 | ;; (default nil)
173 | dotspacemacs-ex-substitute-global nil
174 | ;; Name of the default layout (default "Default")
175 | dotspacemacs-default-layout-name "Default"
176 | ;; If non nil the default layout name is displayed in the mode-line.
177 | ;; (default nil)
178 | dotspacemacs-display-default-layout nil
179 | ;; If non nil then the last auto saved layouts are resume automatically upon
180 | ;; start. (default nil)
181 | dotspacemacs-auto-resume-layouts nil
182 | ;; Size (in MB) above which spacemacs will prompt to open the large file
183 | ;; literally to avoid performance issues. Opening a file literally means that
184 | ;; no major mode or minor modes are active. (default is 1)
185 | dotspacemacs-large-file-size 1
186 | ;; Location where to auto-save files. Possible values are `original' to
187 | ;; auto-save the file in-place, `cache' to auto-save the file to another
188 | ;; file stored in the cache directory and `nil' to disable auto-saving.
189 | ;; (default 'cache)
190 | dotspacemacs-auto-save-file-location 'cache
191 | ;; Maximum number of rollback slots to keep in the cache. (default 5)
192 | dotspacemacs-max-rollback-slots 5
193 | ;; If non nil, `helm' will try to minimize the space it uses. (default nil)
194 | dotspacemacs-helm-resize nil
195 | ;; if non nil, the helm header is hidden when there is only one source.
196 | ;; (default nil)
197 | dotspacemacs-helm-no-header nil
198 | ;; define the position to display `helm', options are `bottom', `top',
199 | ;; `left', or `right'. (default 'bottom)
200 | dotspacemacs-helm-position 'bottom
201 | ;; Controls fuzzy matching in helm. If set to `always', force fuzzy matching
202 | ;; in all non-asynchronous sources. If set to `source', preserve individual
203 | ;; source settings. Else, disable fuzzy matching in all sources.
204 | ;; (default 'always)
205 | dotspacemacs-helm-use-fuzzy 'always
206 | ;; If non nil the paste micro-state is enabled. When enabled pressing `p`
207 | ;; several times cycle between the kill ring content. (default nil)
208 | dotspacemacs-enable-paste-transient-state nil
209 | ;; Which-key delay in seconds. The which-key buffer is the popup listing
210 | ;; the commands bound to the current keystroke sequence. (default 0.4)
211 | dotspacemacs-which-key-delay 0.4
212 | ;; Which-key frame position. Possible values are `right', `bottom' and
213 | ;; `right-then-bottom'. right-then-bottom tries to display the frame to the
214 | ;; right; if there is insufficient space it displays it at the bottom.
215 | ;; (default 'bottom)
216 | dotspacemacs-which-key-position 'bottom
217 | ;; If non nil a progress bar is displayed when spacemacs is loading. This
218 | ;; may increase the boot time on some systems and emacs builds, set it to
219 | ;; nil to boost the loading time. (default t)
220 | dotspacemacs-loading-progress-bar t
221 | ;; If non nil the frame is fullscreen when Emacs starts up. (default nil)
222 | ;; (Emacs 24.4+ only)
223 | dotspacemacs-fullscreen-at-startup nil
224 | ;; If non nil `spacemacs/toggle-fullscreen' will not use native fullscreen.
225 | ;; Use to disable fullscreen animations in OSX. (default nil)
226 | dotspacemacs-fullscreen-use-non-native nil
227 | ;; If non nil the frame is maximized when Emacs starts up.
228 | ;; Takes effect only if `dotspacemacs-fullscreen-at-startup' is nil.
229 | ;; (default nil) (Emacs 24.4+ only)
230 | dotspacemacs-maximized-at-startup nil
231 | ;; A value from the range (0..100), in increasing opacity, which describes
232 | ;; the transparency level of a frame when it's active or selected.
233 | ;; Transparency can be toggled through `toggle-transparency'. (default 90)
234 | dotspacemacs-active-transparency 90
235 | ;; A value from the range (0..100), in increasing opacity, which describes
236 | ;; the transparency level of a frame when it's inactive or deselected.
237 | ;; Transparency can be toggled through `toggle-transparency'. (default 90)
238 | dotspacemacs-inactive-transparency 90
239 | ;; If non nil show the titles of transient states. (default t)
240 | dotspacemacs-show-transient-state-title t
241 | ;; If non nil show the color guide hint for transient state keys. (default t)
242 | dotspacemacs-show-transient-state-color-guide t
243 | ;; If non nil unicode symbols are displayed in the mode line. (default t)
244 | dotspacemacs-mode-line-unicode-symbols t
245 | ;; If non nil smooth scrolling (native-scrolling) is enabled. Smooth
246 | ;; scrolling overrides the default behavior of Emacs which recenters point
247 | ;; when it reaches the top or bottom of the screen. (default t)
248 | dotspacemacs-smooth-scrolling t
249 | ;; Control line numbers activation.
250 | ;; If set to `t' or `relative' line numbers are turned on in all `prog-mode' and
251 | ;; `text-mode' derivatives. If set to `relative', line numbers are relative.
252 | ;; This variable can also be set to a property list for finer control:
253 | ;; '(:relative nil
254 | ;; :disabled-for-modes dired-mode
255 | ;; doc-view-mode
256 | ;; markdown-mode
257 | ;; org-mode
258 | ;; pdf-view-mode
259 | ;; text-mode
260 | ;; :size-limit-kb 1000)
261 | ;; (default nil)
262 | dotspacemacs-line-numbers nil
263 | ;; Code folding method. Possible values are `evil' and `origami'.
264 | ;; (default 'evil)
265 | dotspacemacs-folding-method 'evil
266 | ;; If non-nil smartparens-strict-mode will be enabled in programming modes.
267 | ;; (default nil)
268 | dotspacemacs-smartparens-strict-mode nil
269 | ;; If non-nil pressing the closing parenthesis `)' key in insert mode passes
270 | ;; over any automatically added closing parenthesis, bracket, quote, etc…
271 | ;; This can be temporary disabled by pressing `C-q' before `)'. (default nil)
272 | dotspacemacs-smart-closing-parenthesis nil
273 | ;; Select a scope to highlight delimiters. Possible values are `any',
274 | ;; `current', `all' or `nil'. Default is `all' (highlight any scope and
275 | ;; emphasis the current one). (default 'all)
276 | dotspacemacs-highlight-delimiters 'all
277 | ;; If non nil, advise quit functions to keep server open when quitting.
278 | ;; (default nil)
279 | dotspacemacs-persistent-server nil
280 | ;; List of search tool executable names. Spacemacs uses the first installed
281 | ;; tool of the list. Supported tools are `ag', `pt', `ack' and `grep'.
282 | ;; (default '("ag" "pt" "ack" "grep"))
283 | dotspacemacs-search-tools '("ag" "pt" "ack" "grep")
284 | ;; The default package repository used if no explicit repository has been
285 | ;; specified with an installed package.
286 | ;; Not used for now. (default nil)
287 | dotspacemacs-default-package-repository nil
288 | ;; Delete whitespace while saving buffer. Possible values are `all'
289 | ;; to aggressively delete empty line and long sequences of whitespace,
290 | ;; `trailing' to delete only the whitespace at end of lines, `changed'to
291 | ;; delete only whitespace for changed lines or `nil' to disable cleanup.
292 | ;; (default nil)
293 | dotspacemacs-whitespace-cleanup nil
294 | ))
295 |
296 | (defun dotspacemacs/user-init ()
297 | "Initialization function for user code.
298 | It is called immediately after `dotspacemacs/init', before layer configuration
299 | executes.
300 | This function is mostly useful for variables that need to be set
301 | before packages are loaded. If you are unsure, you should try in setting them in
302 | `dotspacemacs/user-config' first."
303 | )
304 |
305 | (defun dotspacemacs/user-config ()
306 | (global-linum-mode)
307 | )
308 |
309 | ;; Do not write anything past this comment. This is where Emacs will
310 | ;; auto-generate custom variable definitions.
311 | (custom-set-variables
312 | ;; custom-set-variables was added by Custom.
313 | ;; If you edit it by hand, you could mess it up, so be careful.
314 | ;; Your init file should contain only one such instance.
315 | ;; If there is more than one, they won't work right.
316 | '(package-selected-packages
317 | '(spinner evil-visualstar evil-visual-mark-mode evil-tutor evil-surround evil-mc evil-matchit evil-lisp-state evil-indent-plus evil-iedit-state iedit evil-exchange evil-ediff evil-args evil-anzu anzu undo-tree adaptive-wrap ws-butler winum which-key volatile-highlights vi-tilde-fringe uuidgen use-package toc-org spaceline powerline smartparens restart-emacs request rainbow-delimiters popwin persp-mode pcre2el paradox org-plus-contrib org-bullets open-junk-file neotree move-text macrostep lorem-ipsum linum-relative link-hint indent-guide hydra hungry-delete hl-todo highlight-parentheses highlight-numbers parent-mode highlight-indentation helm-themes helm-swoop helm-projectile helm-mode-manager helm-make projectile pkg-info epl helm-flx helm-descbinds helm-ag google-translate golden-ratio flx-ido flx fill-column-indicator fancy-battery eyebrowse expand-region exec-path-from-shell evil-unimpaired evil-search-highlight-persist evil-numbers evil-nerd-commenter evil-escape evil goto-chg eval-sexp-fu highlight elisp-slime-nav dumb-jump f dash s diminish define-word column-enforce-mode clean-aindent-mode bind-map bind-key auto-highlight-symbol auto-compile packed aggressive-indent ace-window ace-link ace-jump-helm-line helm avy helm-core popup async)))
318 | (custom-set-faces
319 | ;; custom-set-faces was added by Custom.
320 | ;; If you edit it by hand, you could mess it up, so be careful.
321 | ;; Your init file should contain only one such instance.
322 | ;; If there is more than one, they won't work right.
323 | )
324 |
325 | (use-package org
326 | :ensure t
327 | :defer t
328 | :config
329 | (setq org-directory "~/Notes/"))
330 |
--------------------------------------------------------------------------------
/.ssh/config:
--------------------------------------------------------------------------------
1 | Host github
2 | HostName github.com
3 | User git
4 | Port 22
5 | IdentityFile ~/.ssh/github
6 |
--------------------------------------------------------------------------------
/.tigrc:
--------------------------------------------------------------------------------
1 | # Tig Config
2 |
3 | #
4 | # Basic Config
5 | #
6 |
7 | # Just say no to 8 spaces
8 | set tab-size = 4
9 |
10 | set line-graphics = utf-8
11 |
12 | #
13 | # Keybindings
14 | #
15 |
16 | # Unbind commands
17 | bind generic B none
18 | bind generic H none
19 | bind generic S none
20 | bind generic b none
21 | bind generic y none
22 | bind generic o none
23 | bind generic F none
24 |
25 | # b for Branches
26 | bind generic b view-refs
27 |
28 | # B for Blame
29 | bind generic B view-blame
30 |
31 | # s for Status
32 | bind generic s view-status
33 |
34 | # S for Stash
35 | bind generic S view-stash
36 |
37 | # Up and down like vim
38 | bind generic move-page-down
39 | bind generic move-page-up
40 |
41 | # o for open
42 | bind generic o enter
43 |
44 | # Maximize = Fullscreen
45 | bind generic F maximize
46 |
47 | #
48 | # Colors
49 | # Source:
50 | # https://github.com/cbertoldi/dotfiles/blob/master/tigrc.symlink
51 | #
52 | # Syntax:
53 | # *color* 'area' 'fgcolor' 'bgcolor' '[attributes]'
54 | # vim: set expandtab sw=4 tabstop=4:
55 | # *color* 'area' 'fgcolor' 'bgcolor' '[attributes]'
56 |
57 | # general
58 | color default 15 235
59 | color cursor 15 241
60 | color title-focus 242 221
61 | color title-blur 242 221
62 | color delimiter 213 default
63 | color author 156 default
64 | color date 81 default
65 | color line-number 221 default
66 | color mode 255 default
67 |
68 | # main
69 | color main-tag 213 default bold
70 | color main-local-tag 213 default
71 | color main-remote 221 default
72 | color main-replace 81 default
73 | color main-tracked 221 default bold
74 | color main-ref 81 default
75 | color main-head 213 default bold
76 | color graph-commit 226 default
77 |
78 | # status
79 | #color stat-head 81 default
80 |
81 | # Diff colors
82 | color diff_add 10 default
83 | color diff_add2 10 default
84 | color diff_del 196 default
85 | color diff_del2 196 default
86 | color diff-header 221 default
87 | color diff-index 81 default
88 | color diff-chunk 213 default
89 | color diff_oldmode 221 default
90 | color diff_newmode 221 default
91 | color 'deleted file mode' 221 default
92 | color 'copy from' 223 default
93 | color 'copy to' 221 default
94 | color 'rename from' 221 default
95 | color 'rename to' 221 default
96 | color diff_similarity 221 default
97 | color 'dissimilarity' 221 default
98 | color 'diff_tree' 81 default
99 | color diff-stat 81 default
100 | color "Reported-by:" 156 default
101 |
102 | color 'Author:' 156 default
103 | color 'Commit:' 213 default
104 | color 'AuthorDate:' 221 default
105 | color 'CommitDate:' 221 default
106 | color 'Date:' 81 default
107 | color pp_refs 213 default
108 | color palette-0 226 default
109 | color palette-1 213 default
110 | color palette-2 118 default
111 | color palette-3 51 default
112 | color palette-4 196 default
113 | color palette-5 219 default
114 | color palette-6 190 default
115 |
116 | # status
117 | color status.header 221 default
118 | color status.section 81 default
119 | color stat_staged 213 default
120 | color stat_unstaged 213 default
121 | color stat_untracked 213 default
122 |
123 | # raw commit header
124 | color commit 156 default
125 | color committer 213 default
126 |
127 | # commit message
128 | color 'Signed-off-by' 221 default
129 | color 'Acked-by' 221 default
130 | color 'Tested-by' 221 default
131 | color 'Reviewed-by' 221 default
132 |
133 | # tree
134 | color tree.directory 221 default
135 |
136 | # LINE(PALETTE_0, "", COLOR_MAGENTA, COLOR_DEFAULT, 0), \
137 | # LINE(PALETTE_1, "", COLOR_YELLOW, COLOR_DEFAULT, 0), \
138 | # LINE(PALETTE_2, "", COLOR_CYAN, COLOR_DEFAULT, 0), \
139 | # LINE(PALETTE_3, "", COLOR_GREEN, COLOR_DEFAULT, 0), \
140 | # LINE(PALETTE_4, "", COLOR_DEFAULT, COLOR_DEFAULT, 0), \
141 | # LINE(PALETTE_5, "", COLOR_WHITE, COLOR_DEFAULT, 0), \
142 | # LINE(PALETTE_6, "", COLOR_RED, )
143 |
--------------------------------------------------------------------------------
/.tmux.conf:
--------------------------------------------------------------------------------
1 | #
2 | # Download tpm if it isn't there
3 | #
4 |
5 | if-shell "[[ ! -d ~/.tmux/plugins/tpm ]]" \
6 | 'run-shell "mkdir -p ~/.tmux/plugins/tpm"; \
7 | run-shell "git clone https://github.com/tmux-plugins/tpm.git ~/.tmux/plugins/tpm"'
8 |
9 | #
10 | # Core Options
11 | #
12 |
13 | # Update title of window
14 | #set-option string-titles "#S"
15 |
16 | # More than the default
17 | set-option -g history-limit 50000
18 |
19 | # Use an easier prefix, not C-a
20 | set-option -g prefix C-q
21 |
22 | # Allows for faster key repetition
23 | set-option -s escape-time 0
24 |
25 | # Reload Configuration
26 | bind-key r source-file ~/.tmux.conf \; display-message "Reloaded Config."
27 |
28 | # No Mouse Mode for Me
29 | set-option -g mouse off
30 |
31 | # Terminal.app scrolling
32 | set-option -g terminal-overrides 'xterm*:smcup@:rmcup@'
33 |
34 | # Color settings
35 | set-option -g default-terminal "screen-256color"
36 |
37 | # Activity monitoring
38 | set-window-option -g monitor-activity on
39 | set-option -g visual-activity on
40 |
41 | #
42 | # Basic Keybindings
43 | #
44 |
45 | # Overwrite defaults
46 | bind-key c new-window
47 |
48 | # Only tmux 1.9 has the -c option
49 | if-shell "[[ `tmux -V` == *1.9 ]]" \
50 | 'unbind c; bind c new-window -c "#{pane_current_path}"'
51 |
52 | # Clear the screen. Often used after sending C-l to the terminal.
53 | bind-key C-k clear-history
54 |
55 | # Use Vi Key Mode
56 | set-window-option -g mode-keys vi
57 |
58 | #
59 | # Status Line Settings
60 | #
61 |
62 | # Update every 60 seconds
63 | set-option -g status-interval 60
64 |
65 | # Center status bar
66 | set-option -g status-justify centre
67 |
68 | # Left Side of Status Line
69 | set-option -g status-left-length 40
70 | set-option -g status-left "#[fg=green]\[#S\] :: #[fg=yellow]#I"
71 |
72 | # Right Side of Status Line
73 | set-option -g status-right "#[fg=cyan]%d %b %R"
74 |
75 | #
76 | # Window Settings
77 | #
78 |
79 | # Automatic naming of windows
80 | set-window-option -g allow-rename off
81 |
82 | # Easier Splitting of Windows
83 | bind-key | split-window -h
84 | bind-key - split-window -v
85 |
86 | # Only tmux 1.9 has the -c option
87 | if-shell "[[ `tmux -V` == *1.9 ]]" \
88 | 'unbind |; bind | split-window -h -c "#{pane_current_path}"'
89 | if-shell "[[ `tmux -V` == *1.9 ]]" \
90 | 'unbind -; bind - split-window -v -c "#{pane_current_path}"'
91 |
92 | # Start numbering at 1 for both windows and panes
93 | set-option -g base-index 1
94 | set-window-option -g pane-base-index 1
95 |
96 | # Show Window Status format as: "|Index:Name|"
97 | set-window -g window-status-current-format "|#I:#W|"
98 |
99 | #
100 | # Pane Settings
101 | #
102 |
103 | # Move around using Vim like bindings
104 | bind-key h select-pane -L
105 | bind-key j select-pane -D
106 | bind-key k select-pane -U
107 | bind-key l select-pane -R
108 |
109 | # Resize panes (-r for repeatability)
110 | bind-key -r H resize-pane -L 2
111 | bind-key -r J resize-pane -D 2
112 | bind-key -r K resize-pane -U 2
113 | bind-key -r L resize-pane -R 2
114 |
115 | #
116 | # Color Settings
117 | #
118 |
119 | # Status Line Colors
120 | set-option -g status-style fg=white
121 | set-option -g status-style bg=black
122 |
123 | # Window List Colors
124 | set-window-option -g window-status-style fg=cyan
125 | set-window-option -g window-status-style bg=default
126 | set-window-option -g window-status-style dim
127 |
128 | # Active Window Colors
129 | set-window-option -g window-status-current-style fg=white
130 | set-window-option -g window-status-current-style bg=cyan
131 | set-window-option -g window-status-current-style bright
132 |
133 | # Pane Colors
134 | set-option -g pane-border-style fg=green
135 | set-option -g pane-border-style bg=black
136 | set-option -g pane-active-border-style fg=white
137 | set-option -g pane-active-border-style bg=yellow
138 |
139 | # Message Colors
140 | set-option -g message-style fg=white
141 | set-option -g message-style bg=black
142 | set-option -g message-style bright
143 |
144 | #
145 | # Additional Settings
146 | #
147 |
148 | # Fix tmux copy and paste issue as seen here:
149 | # http://stackoverflow.com/a/16661806
150 | set-option -g default-command "Tmux > /dev/null 2>&1; ~/bin/reattach.sh -l $SHELL"
151 |
152 | #
153 | # Plugins
154 | #
155 |
156 | # List of plugins
157 | #set -g @tpm_plugins " \
158 | #tmux-plugins/tpm \
159 | #tmux-plugins/tmux-copycat \
160 | #tmux-plugins/tmux-resurrect \
161 | #tmux-plugins/tmux-sidebar \
162 | #"
163 |
164 | # Initializes tpm, keep this line at the very bottom of tmux.conf
165 | #run-shell ~/.tmux/plugins/tpm/tpm
166 |
--------------------------------------------------------------------------------
/.tmuxinator:
--------------------------------------------------------------------------------
1 | .antigen/repos/git@github.com-COLON-jdavis-SLASH-secret.git/tmuxinator/
--------------------------------------------------------------------------------
/.vimrc:
--------------------------------------------------------------------------------
1 | " Author: Josh Davis
2 | " Description: This is the personal .vimrc file of Josh Davis. I've tried to
3 | " document every option and item. Feel free to use it to learn
4 | " more about configuring Vim.
5 | "
6 | " Also, I encourage you to pick out the parts that you use and
7 | " understand rather than blindly using it.
8 | "
9 | " You can find me on Github: http://github.com/jdavis Or my
10 | " personal site: http://joshldavis.com
11 |
12 | " As the help says 'Make vim behave in a more useful way'
13 | " **Must be first uncommented line**
14 | set nocompatible
15 |
16 | "
17 | " Determine what we have
18 | "
19 |
20 | let s:OS = 'linux'
21 |
22 | let os = substitute(system('uname'), '\n', '', '')
23 | if os == 'Darwin' || os == 'Mac'
24 | let s:OS = 'osx'
25 | endif
26 |
27 | let s:plugins=isdirectory(expand('~/.vim/bundle/vundle', 1))
28 |
29 | "
30 | " Setup folder structure
31 | "
32 |
33 | if !isdirectory(expand('~/.vim/undo/', 1))
34 | silent call mkdir(expand('~/.vim/undo', 1), 'p')
35 | endif
36 |
37 | if !isdirectory(expand('~/.vim/backup/', 1))
38 | silent call mkdir(expand('~/.vim/backup', 1), 'p')
39 | endif
40 |
41 | if !isdirectory(expand('~/.vim/swap/', 1))
42 | silent call mkdir(expand('~/.vim/swap', 1), 'p')
43 | endif
44 |
45 | "
46 | " Custom Functions
47 | "
48 |
49 | " Remove trailing whitespace
50 | " http://vim.wikia.com/wiki/Remove_unwanted_spaces
51 | function! StripTrailingWhitespace()
52 | if !&binary && &filetype != 'diff'
53 | normal mz
54 | normal Hmy
55 | %s/\s\+$//e
56 | normal 'yz
57 | normal `z
58 | retab
59 | endif
60 | endfunction
61 |
62 | " Function to hide all the text except for the text selected in visual mode.
63 | " This is great for highlighting parts of the code. Just call the function
64 | " again to deselect everything.
65 | function! ToggleSelected(visual) range
66 | highlight HideSelected ctermfg=bg ctermbg=bg
67 | \ guifg=bg guibg=bg gui=none term=none cterm=none
68 |
69 | if exists('g:toggle_selected_hide')
70 | call matchdelete(g:toggle_selected_hide)
71 |
72 | unlet g:toggle_selected_hide
73 | redraw
74 |
75 | if !a:visual
76 | return
77 | endif
78 | endif
79 |
80 | let [lnum1, col1] = getpos(''<')[1:2]
81 | let [lnum2, col2] = getpos(''>')[1:2]
82 |
83 | let pattern = '\%^\|\%<'.lnum1.'l\|\%<'.col1.'v\|\%>'.lnum2.'l\|\%>'.col2.'v'
84 | let g:toggle_selected_hide = matchadd('HideSelected', pattern, 1000)
85 |
86 | redraw
87 | endfunction
88 |
89 | " Check if a colorscheme exists
90 | " http://stackoverflow.com/a/5703164
91 | function! HasColorScheme(scheme)
92 | let basepath = '~/.vim/bundle/'
93 |
94 | for plug in g:color_schemes
95 | let path = basepath . '/' . plug . '/colors/' . a:scheme . '.vim'
96 | if filereadable(expand(path))
97 | return 1
98 | endif
99 | endfor
100 |
101 | return 0
102 | endfunction
103 |
104 | nnoremap :if AutoHighlightToggle()set hlsendif
105 | function! AutoHighlightToggle()
106 | let @/ = ''
107 | if exists('#auto_highlight')
108 | au! auto_highlight
109 | augroup! auto_highlight
110 | setl updatetime=4000
111 | echo 'Highlight current word: off'
112 | return 0
113 | else
114 | augroup auto_highlight
115 | au!
116 | au CursorHold * let @/ = '\V\<'.escape(expand(''), '\').'\>'
117 | augroup end
118 | setl updatetime=500
119 | echo 'Highlight current word: ON'
120 | return 1
121 | endif
122 | endfunction
123 |
124 | "
125 | " Global Settings
126 | "
127 |
128 | " The default 20 isn't nearly enough
129 | set history=9999
130 |
131 | " Show the numbers on the left of the screen
132 | set number
133 |
134 | " Show the column/row
135 | set ruler
136 |
137 | " Highlight only the lines that go past 80 characters
138 | highlight ColorColumn ctermbg=green guibg=green
139 | call matchadd('ColorColumn', '\%82v', 100)
140 |
141 | " Pretty colors are fun, yayyy
142 | syntax on
143 |
144 | " Show the matching when doing a search
145 | set showmatch
146 |
147 | " Allows the backspace to delete indenting, end of lines, and over the start
148 | " of insert
149 | set backspace=indent,eol,start
150 |
151 | " Ignore case when doing a search as well as highlight it as it is typed
152 | set ignorecase smartcase
153 | set hlsearch
154 | set incsearch
155 |
156 | " Don't show the startup message
157 | set shortmess=I
158 |
159 | " Show the current command at the bottom
160 | set showcmd
161 |
162 | " Disable beeping and flashing.
163 | set noerrorbells visualbell t_vb=
164 | autocmd GUIEnter * set visualbell t_vb=
165 |
166 | " Use smarter defaults
167 | set smartindent
168 | set smarttab
169 |
170 | " Use autoindenting
171 | set autoindent
172 |
173 | " The tabstop look best at 4 spacing
174 | set tabstop=4
175 | set softtabstop=4
176 | set shiftwidth=4
177 |
178 | " I have been converted to the dark side, I will use spaces to indent code
179 | " from here on out
180 | set expandtab
181 |
182 | " Buffer Settings
183 | set hidden
184 |
185 | " Better completion
186 | set completeopt+=longest,menuone,preview
187 |
188 | " Turn on persistent undo
189 | " Thanks, Mr Wadsten: github.com/mikewadsten/dotfiles/
190 | if has('persistent_undo')
191 | set undodir=~/.vim/undo//
192 | set undofile
193 | set undolevels=1000
194 | set undoreload=10000
195 | endif
196 |
197 | " Use backups
198 | " Source:
199 | " http://stackoverflow.com/a/15317146
200 | set backup
201 | set writebackup
202 | set backupdir=~/.vim/backup//
203 |
204 | " Use a specified swap folder
205 | " Source:
206 | " http://stackoverflow.com/a/15317146
207 | set directory=~/.vim/swap//
208 |
209 | " The comma makes a great leader of men, heh heh
210 | let mapleader = ','
211 | let maplocalleader = '\'
212 |
213 | " Show two lines for the status line
214 | set laststatus=2
215 |
216 | " Always show the last line
217 | set display+=lastline
218 |
219 | " UTF-8 THIS SHITTTTTT
220 | set encoding=utf-8
221 |
222 | " Enhanced mode for command-line completion
223 | set wildmenu
224 |
225 | " Automatically re-read the file if it has changed
226 | set autoread
227 |
228 | " Fold Settings
229 |
230 | " Off on start
231 | set nofoldenable
232 |
233 | " Indent seems to work the best
234 | set foldmethod=indent
235 | set foldlevel=20
236 |
237 | "
238 | " Global Bindings
239 | "
240 |
241 | " Disable ex mode
242 | "
243 | " Tip:
244 | " Use command-line-window with q:
245 | " Use search history with q/
246 | "
247 | " More info:
248 | " http://blog.sanctum.geek.nz/vim-command-window/
249 | nmap Q q
250 |
251 | " Show only selected in Visual Mode
252 | nmap th :cal ToggleSelected(0)
253 | vmap th :cal ToggleSelected(1)
254 |
255 | " Split the window using some nice shortcuts
256 | nmap s :vsplit
257 | nmap s- :split
258 | nmap s? :map s
259 |
260 | " Unhighlight the last search pattern on Enter
261 | nn :nohlsearch
262 |
263 | " Control enhancements in insert mode
264 | imap
265 | imap
266 | imap vBc
267 | imap
268 | imap
269 |
270 | " Non quitting analog of ZZ
271 | nmap zz :w
272 |
273 | " When pushing j/k on a line that is wrapped, it navigates to the same line,
274 | " just to the expected location rather than to the next line
275 | nnoremap j gj
276 | nnoremap k gk
277 |
278 | " Use actually useful arrow keys
279 | map :bn
280 | map :bp
281 | map
282 | map
283 |
284 | " Map Ctrl+V to paste in Insert mode
285 | imap *
286 |
287 | " Map Ctrl+C to copy in Visual mode
288 | vmap "+y
289 |
290 | " Add paste shortcut
291 | nmap P "+p
292 |
293 | " GVim Settings
294 | if has('gui_running')
295 | " Who uses a GUI in GVim anyways? Let's be serious.
296 | set guioptions=egirLt
297 |
298 | " Ensure that clipboard isn't clobbered when yanking
299 | set guioptions-=a
300 | set term=xterm-256color
301 | set termencoding=utf-8
302 |
303 | " Let's make the fonts look nice
304 | if s:OS == 'osx'
305 | set guifont=Droid\ Sans\ Mono\ for\ Powerline:h10
306 | elseif s:OS == 'linux'
307 | set guifont=DejaVu\ Sans\ Mono\ for\ Powerline\ 9
308 | endif
309 | endif
310 |
311 | " Ignore some defaults
312 | set wildignore=*.o,*.obj,*~,*.pyc
313 | set wildignore+=.env
314 | set wildignore+=.env[0-9]+
315 | set wildignore+=.git,.gitkeep
316 | set wildignore+=.tmp
317 | set wildignore+=.coverage
318 | set wildignore+=*DS_Store*
319 | set wildignore+=.sass-cache/
320 | set wildignore+=__pycache__/
321 | set wildignore+=vendor/rails/**
322 | set wildignore+=vendor/cache/**
323 | set wildignore+=*.gem
324 | set wildignore+=log/**
325 | set wildignore+=tmp/**
326 | set wildignore+=.tox/**
327 | set wildignore+=.idea/**
328 | set wildignore+=*.egg,*.egg-info
329 | set wildignore+=*.png,*.jpg,*.gif
330 | set wildignore+=*.so,*.swp,*.zip,*/.Trash/**,*.pdf,*.dmg,*/Library/**,*/.rbenv/**
331 | set wildignore+=*/.nx/**,*.app
332 |
333 | " Fold Keybindings
334 | "nnoremap za
335 |
336 | "
337 | " Custom Settings
338 | "
339 |
340 | " Set on textwidth when in markdown files
341 | autocmd FileType markdown set textwidth=80
342 |
343 | " Smarter completion in C
344 | autocmd FileType c set omnifunc=ccomplete#Complete
345 |
346 | " My own special flavoring to running programs
347 | autocmd FileType asm,c,objc,scheme,sh,python,perl,javascript nn R :!deepThought.sh '%:p'
348 |
349 | " Use 2 spaces when in Lua & Ruby
350 | autocmd FileType lua,ruby,scss set tabstop=2
351 | autocmd FileType lua,ruby,scss set shiftwidth=2
352 |
353 | " Vim indent guides for Html like files
354 | autocmd FileType html,eruby IndentGuidesEnable
355 |
356 | "
357 | " Go
358 | "
359 |
360 | " Hide tab indicators
361 | autocmd Filetype go set nolist
362 |
363 | if !s:plugins
364 |
365 | " Bootstrap Vundle on new systems
366 | " Borrowed from @justinmk's vimrc
367 | fun! InstallVundle()
368 | silent call mkdir(expand('~/.vim/bundle', 1), 'p')
369 | silent !git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle
370 | endfun
371 |
372 | " Instead of install packages, install Vundle
373 | nmap vi :call InstallVundle()
374 |
375 | else
376 |
377 | " Required by Vundle
378 | filetype off
379 |
380 | " Vundle is the new god among plugins
381 | set rtp+=~/.vim/bundle/vundle/
382 | call vundle#rc()
383 |
384 | "
385 | " Vundle Bundles + Settings
386 | "
387 |
388 | Plugin 'gmarik/vundle'
389 |
390 | " Git/GitHub plugins
391 | Plugin 'tpope/vim-fugitive'
392 | Plugin 'airblade/vim-gitgutter'
393 |
394 | " File overview
395 | Plugin 'Shougo/unite.vim'
396 | Plugin 'Shougo/vimfiler.vim'
397 |
398 | " Navigation
399 | Plugin 'kien/ctrlp.vim'
400 | Plugin 'majutsushi/tagbar'
401 | Plugin 'mileszs/ack.vim'
402 |
403 | " Appearance
404 | Plugin 'bling/vim-airline'
405 | Plugin 'vim-airline/vim-airline-themes'
406 | Plugin 'bitc/vim-bad-whitespace'
407 |
408 | " Buffers
409 | Plugin 'jeetsukumaran/vim-buffergator'
410 |
411 | " Syntax
412 | Plugin 'scrooloose/syntastic'
413 | Plugin 'pangloss/vim-javascript'
414 | Plugin 'briancollins/vim-jst'
415 | Plugin 'tpope/vim-markdown'
416 | Plugin 'mxw/vim-jsx'
417 | Plugin 'cakebaker/scss-syntax.vim'
418 |
419 | " Utilities
420 | Plugin 'Lokaltog/vim-easymotion'
421 | Plugin 'benmills/vimux'
422 | Plugin 'mbbill/undotree'
423 | Plugin 'nathanaelkane/vim-indent-guides'
424 | Plugin 'takac/vim-commandcaps'
425 | Plugin 'terryma/vim-multiple-cursors'
426 | Plugin 'tpope/vim-repeat'
427 | Plugin 'tpope/vim-speeddating'
428 | Plugin 'vim-scripts/SyntaxRange'
429 |
430 | " Vim improvements
431 | Plugin 'embear/vim-localvimrc'
432 |
433 | " R Lang
434 | Plugin 'jalvesaq/VimCom'
435 | Plugin 'jcfaria/Vim-R-plugin'
436 | Plugin 'LaTeX-Box-Team/LaTeX-Box'
437 |
438 | " Autocompletion
439 | Plugin 'tpope/vim-endwise'
440 | Plugin 'tpope/vim-surround'
441 | Plugin 'Valloric/YouCompleteMe'
442 |
443 | " Snippets
444 | Plugin 'SirVer/ultisnips'
445 | Plugin 'honza/vim-snippets'
446 |
447 | " Ruby plugins
448 | Plugin 'vim-ruby/vim-ruby'
449 | Plugin 'tpope/vim-rails'
450 | Plugin 'tpope/vim-cucumber'
451 | Plugin 'tpope/vim-bundler'
452 |
453 | " Elixir plugins
454 | Plugin 'elixir-lang/vim-elixir'
455 |
456 | " Go plugins
457 | Plugin 'fatih/vim-go'
458 |
459 | " Themes
460 | Plugin 'freeo/vim-kalisi'
461 | Plugin 'altercation/vim-colors-solarized'
462 | Plugin 'flazz/vim-colorschemes'
463 |
464 | " Python
465 | Plugin 'hynek/vim-python-pep8-indent'
466 | Plugin 'nvie/vim-flake8'
467 |
468 | " Vim Wiki
469 | Plugin 'vimwiki/vimwiki'
470 |
471 | " Writing
472 | Plugin 'dpelle/vim-LanguageTool'
473 |
474 | let g:color_schemes = ['vim-kalisi', 'vim-colorschemes', 'vim-colors-solarized']
475 |
476 | nmap t? :map t
477 | nmap tB :VimFiler
478 | nmap tW :cal StripTrailingWhitespace()
479 | nmap tb :VimFilerExplorer
480 | nmap tt :TagbarToggle
481 | nmap tu :UndotreeToggle
482 | nmap tw :cal ToggleWhitespace()
483 |
484 | " Vundle mapping
485 | nmap vl :BundleList
486 | nmap vi :BundleInstall
487 | nmap vI :BundleInstall!
488 | nmap vc :BundleClean
489 | nmap vC :BundleClean!
490 | nmap v? :map v
491 |
492 | " Fugitive mapping
493 | nmap gb :Gblame
494 | nmap gc :Gcommit
495 | nmap gd :Gdiff
496 | nmap gg :Ggrep
497 | nmap gl :Glog
498 | nmap gp :Git pull
499 | nmap gP :Git push
500 | nmap gs :Gstatus
501 | nmap gw :Gbrowse
502 | nmap g? :map g
503 |
504 | " VimFiler options
505 | let g:vimfiler_as_default_explorer = 1
506 | let g:vimfiler_ignore_pattern = [
507 | \ '^\.git$',
508 | \ '^\.cache$',
509 | \ '^__pycache__$',
510 | \ '^\.DS_Store$',
511 | \ '\.aux$',
512 | \ '\.sw[po]$',
513 | \ '\.class$',
514 | \ '\.py[co]$',
515 | \ '\.py[co]$',
516 | \ '\.pytest_cache$',
517 | \ ]
518 |
519 | autocmd BufEnter * if (winnr('$') == 1 && &filetype ==# 'vimfiler') | q | endif
520 |
521 | call vimfiler#custom#profile('default', 'context', {
522 | \ 'explorer' : 1,
523 | \ 'safe' : 0,
524 | \ })
525 |
526 |
527 | " Automatically open VimFiler whenever opened with GUI, but not terminal
528 | if has('gui_running')
529 | autocmd VimEnter * VimFilerExplorer
530 | "autocmd VimEnter * wincmd p
531 | endif
532 |
533 | " Syntastic Settings
534 | let g:syntastic_always_populate_loc_list=1
535 | let g:syntastic_error_symbol = '✗'
536 | let g:syntastic_warning_symbol = '⚠'
537 | let g:syntastic_auto_loc_list = 2
538 | let g:syntastic_enable_signs = 1
539 | let g:syntastic_java_checkers = ['checkstyle', 'javac']
540 | let g:syntastic_java_javac_delete_output = 1
541 | let g:syntastic_java_checkstyle_conf_file = '~/bin/jars/sun_checks.xml'
542 | let g:syntastic_java_checkstyle_classpath = '~/bin/jars/checkstyle-5.5-all.jar'
543 | let g:syntastic_filetype_map = { 'rnoweb': 'tex'}
544 |
545 | " UltiSnip options
546 | let g:UltiSnipsExpandTrigger=""
547 |
548 |
549 | " CtrlP Settings
550 |
551 | let g:ctrlp_user_command = {
552 | \ 'types': {
553 | \ 1: ['.git', 'cd %s && git ls-files --exclude-standard --others --cached'],
554 | \ 2: ['.hg', 'hg --cwd %s locate -I .'],
555 | \ },
556 | \ 'fallback': 'find %s -type f'
557 | \ }
558 |
559 | " Use nearest .git dir
560 | let g:ctrlp_working_path_mode = 'ra'
561 |
562 | nmap p :CtrlP
563 |
564 | " Buffer controls to go with Buffergator
565 | nmap b? :map b
566 | nmap bb :CtrlPBuffer
567 | nmap bl :BuffergatorOpen
568 | nmap bm :CtrlPMixed
569 | nmap bq :bp bd #
570 | nmap bs :CtrlPMRU
571 |
572 | " Airline options
573 | let g:airline#extensions#branch#enabled = 1
574 | let g:airline#extensions#syntastic#enabled = 1
575 | let g:airline_theme = 'kalisi'
576 | let g:airline_powerline_fonts = 1
577 |
578 | " Whitespace settings
579 |
580 | " Show trailing whitespace and tabs obnoxiously
581 | set list listchars=tab:▸\ ,trail:.
582 | set list
583 |
584 | fun! ToggleWhitespace()
585 | ToggleBadWhitespace
586 | if &list
587 | set nolist
588 | else
589 | set list listchars=tab:▸\ ,trail:.
590 | set list
591 | endif
592 | endfun
593 |
594 | " Easymotion
595 | map (easymotion-prefix)
596 |
597 | let g:EasyMotion_smartcase = 1
598 | map h (easymotion-lineforward)
599 | map j (easymotion-j)
600 | map k (easymotion-k)
601 | map l (easymotion-linebackward)
602 |
603 | let g:EasyMotion_startofline = 0
604 |
605 | " Tagbar Options
606 | let g:tagbar_left = 0
607 | let g:tagbar_width = 30
608 |
609 | " Elixir + ctags + Tagbar
610 | let g:tagbar_type_elixir = {
611 | \ 'ctagstype' : 'elixir',
612 | \ 'kinds' : [
613 | \ 'f:functions',
614 | \ 'functions:functions',
615 | \ 'c:callbacks',
616 | \ 'd:delegates',
617 | \ 'e:exceptions',
618 | \ 'i:implementations',
619 | \ 'a:macros',
620 | \ 'o:operators',
621 | \ 'm:modules',
622 | \ 'p:protocols',
623 | \ 'r:records'
624 | \ ]
625 | \ }
626 |
627 |
628 | " Ack options
629 | nmap / :Ack!
630 | let g:ackpreview = 2
631 | let g:ackhighlight = 1
632 |
633 | " Undotree settings
634 | let g:undotree_SplitWidth = 30
635 | let g:undotree_WindowLayout = 3
636 |
637 | " Multiple Cursors Settings
638 | let g:multi_cursor_use_default_mapping = 0
639 | let g:multi_cursor_next_key = ''
640 | let g:multi_cursor_prev_key = ''
641 | let g:multi_cursor_skip_key = ''
642 | let g:multi_cursor_quit_key = ''
643 |
644 | " Worthless mapping
645 | let g:vimrplugin_assign = 0
646 |
647 | " Disable ridiculous mappings
648 | let g:vimrplugin_insert_mode_cmds = 0
649 |
650 | " The powers of Gitignore + wildignore combine!
651 | " Originally written by @zdwolfe, updated by @mikewadsten
652 | "Bundle 'mikewadsten/vim-gitwildignore'
653 |
654 | " LaTex-Box Settings
655 | let g:LatexBox_latexmk_async = 1
656 | let g:LatexBox_latexmk_preview_continuously = 1
657 | let g:LatexBox_viewer = 'open -a Skim.app'
658 | let g:LatexBox_viewer = 'mate-open'
659 |
660 | "
661 | " Buffergator Options
662 | "
663 |
664 | let g:buffergator_suppress_keymaps = 1
665 | let g:buffergator_viewport_split_policy = "R"
666 | let g:buffergator_autoexpand_on_split = 0
667 |
668 | " Looper!
669 | "let g:buffergator_mru_cycle_loop = 1
670 |
671 | nmap T :enew
672 | nmap jj :BuffergatorMruCyclePrev
673 | nmap kk :BuffergatorMruCycleNext
674 |
675 | " Use extra conf file
676 | let g:ycm_global_ycm_extra_conf = '~/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/ycm/.ycm_extra_conf.py'
677 |
678 | " Ignore certain filetypes
679 | let g:ycm_filetype_blacklist = {
680 | \ 'tagbar': 1,
681 | \ 'qf': 1,
682 | \ 'notes': 1,
683 | \ 'markdown': 1,
684 | \ 'unite': 1,
685 | \ 'text': 1,
686 | \ 'vimwiki': 1,
687 | \ 'pandoc': 1,
688 | \ 'infolog': 1,
689 | \ 'mail': 1,
690 | \ 'gitcommit': 1,
691 | \}
692 |
693 | "
694 | " Go Settings
695 | "
696 |
697 | let g:go_bin_path = expand("$HOME/.vim-go/")
698 |
699 | " Custom mappings
700 | nmap glf :GoFmt
701 | nmap gli :GoImports
702 | nmap glb :GoBuild
703 | nmap glr :GoRun
704 | nmap glt :GoTest
705 | nmap glc :GoCallees
706 | nmap glC :GoCallers
707 | nmap glu :GoCoverageToggle
708 |
709 | "
710 | " Date Bindings
711 | "
712 | "
713 |
714 | nmap dd i=strftime("%a %m/%d/%y - %H:%M%p")
715 | nmap ds i=strftime("%m/%d/%y")
716 | nmap dt i=strftime("%H:%M%p")
717 | nmap d? :map d
718 |
719 | "
720 | " Rot13 Binding
721 | "
722 |
723 | nmap rr ggg?G
724 |
725 | "
726 | " Language Tool Settings
727 | "
728 |
729 | let g:languagetool_jar='/usr/local/Cellar/languagetool/4.4/libexec/languagetool-commandline.jar'
730 |
731 |
732 | "
733 | " CScope bindings
734 | "
735 | " Cheat Sheet:
736 | "
737 | " 's' symbol: find all references to the token under cursor
738 | " 'g' global: find global definition(s) of the token under cursor
739 | " 'c' calls: find all calls to the function name under cursor
740 | " 't' text: find all instances of the text under cursor
741 | " 'e' egrep: egrep search for the word under cursor
742 | " 'f' file: open the filename under cursor
743 | " 'i' includes: find files that include the filename under cursor
744 | " 'd' called: find functions that function under cursor calls
745 |
746 | if has("cscope")
747 | " use both cscope and ctag for 'ctrl-]', ':ta', and 'vim -t'
748 | set cscopetag
749 |
750 | " check cscope for definition of a symbol before checking ctags: set to 1
751 | " if you want the reverse search order.
752 | set csto=0
753 |
754 | " add any cscope database in current directory
755 | if filereadable("cscope.out")
756 | cs add cscope.out
757 | " else add the database pointed to by environment variable
758 | elseif $CSCOPE_DB != ""
759 | cs add $CSCOPE_DB
760 | endif
761 |
762 | " show msg when any other cscope db added
763 | set cscopeverbose
764 |
765 | nmap c? :ec 'Cscope reference' map c
766 | nmap cc :ec 'Find all calls to function' cs find c =expand("")
767 | nmap cd :ec 'Find functions that call this function' cs find d =expand("")
768 | nmap ce :ec 'egrep search for the word under cursor' cs find e =expand("")
769 | nmap cf :ec 'Open filename under cursor' cs find f =expand("")
770 | nmap cg :ec 'Find all global definitions' cs find g =expand("")
771 | nmap ci :ec 'Find files that include the filename' cs find i ^=expand("")$
772 | nmap cs :ec 'Find all references' cs find s =expand("")
773 | nmap ct :ec 'Find all instances to text' cs find t =expand("")
774 | endif
775 |
776 | "
777 | " Vimux Settings
778 | "
779 |
780 | if has('gui_running')
781 | let g:VimuxUseNearest = 1
782 | let g:VimuxRunnerType = 'window'
783 | else
784 | let g:VimuxUseNearest = 0
785 | let g:VimuxRunnerType = 'pane'
786 | endif
787 |
788 | let g:VimuxPromptString = 'tmux > '
789 |
790 | function! VimuxSetupRacket()
791 | call VimuxRunCommand('racket -il readline')
792 | call VimuxClearRunnerHistory()
793 | endfunction
794 |
795 | function! VimuxQuitRacket()
796 | call VimuxInterruptRunner()
797 | call VimuxCloseRunner()
798 | endfunction
799 |
800 | function! VimuxRunSelection() range
801 | let [lnum1, col1] = getpos(''<')[1:2]
802 | let [lnum2, col2] = getpos(''>')[1:2]
803 |
804 | let lines = getline(lnum1, lnum2)
805 |
806 | let lines[-1] = lines[-1][: col2 - 1]
807 | let lines[0] = lines[0][col1 - 1:]
808 |
809 | call VimuxRunCommand(join(lines, "\n"))
810 | endfunction
811 |
812 | function! VimuxRunLine()
813 | call VimuxRunCommand(getline('.'))
814 | endfunction
815 |
816 | function! VimuxRunParagraph()
817 | let [lnum1] = getpos("'{")[1:1]
818 | let [lnum2] = getpos("'}")[1:1]
819 |
820 | let lines = getline(lnum1, lnum2)
821 | let filtered = filter(lines, 'v:val !~ "^\s*;"')
822 |
823 | call VimuxRunCommand(join(filtered, ''))
824 | endfunction
825 |
826 | " Setup autocmd if Racket filetype
827 | autocmd FileType racket call SetupVimuxRacket()
828 |
829 | function! SetupVimuxRacket()
830 | set shiftwidth=2
831 |
832 | " Start interpretter
833 | nmap ri :call VimuxSetupRacket()
834 | nmap rq :call VimuxQuitRacket()
835 | nmap rl :call VimuxRunLine()
836 | nmap R :call VimuxRunParagraph() nmap rp :call VimuxRunParagraph()
837 | vmap R :call VimuxRunSelection()
838 | endfunction
839 |
840 | " End the conditional for plugins
841 | endif
842 |
843 | " Load plugins and indent for the filtype
844 | " **Must be last for Vundle**
845 | filetype plugin indent on
846 |
847 | "
848 | " Misc/Non Plugin Settings
849 | "
850 |
851 | " Paste toggle to something easy
852 | set pastetoggle=