Skip to content

Instantly share code, notes, and snippets.

@JeremyOttley
JeremyOttley / .sxhkdrc
Last active April 24, 2018 19:35
sxhkdrc for rtile
## ┌─┐─┐ ┬┬ ┬┬┌─┌┬┐
## └─┐┌┴┬┘├─┤├┴┐ ││
## └─┘┴ └─┴ ┴┴ ┴─┴┘
## -- sxhkd hotkeys --
## terminal
alt + Return
xterm
! Google Material Design
*background : #263238
*foreground : #eceff1
! black
*color0 : #263238
*color8 : #37474f
! red
*color1 : #ff9800
@JeremyOttley
JeremyOttley / config
Created January 3, 2018 21:43
terminator config file
[global_config]
inactive_color_offset = 1.0
tab_position = hidden
title_font = 3270Medium Nerd Font Bold 14
title_inactive_bg_color = "#00002c"
title_inactive_fg_color = "#ff0000"
title_receive_bg_color = "#c90047"
title_transmit_bg_color = "#00002c"
title_transmit_fg_color = "#02ff00"
title_use_system_font = False
@JeremyOttley
JeremyOttley / statusbar.rb
Created January 6, 2018 17:02
jruby status bar
#!/usr/bin/env jruby
# coding: utf-8
# $Id: statusbar.rb,v 1.18 2016/10/07 22:27:26 jashank Exp $
require 'cgi'
require 'date'
require 'dbus'
require 'json'
require 'pg'
require 'pmap'
@JeremyOttley
JeremyOttley / alacritty.rb
Last active May 23, 2018 14:23
alacritty build script
#!/usr/bin/env ruby
require 'fileutils'
## Prereqs
#sudo apt install cmake libfreetype6-dev libfontconfig1-dev xclip
#sudo pacman -S cmake freetype2 fontconfig pkg-config make xclip
#dnf install cmake freetype-devel fontconfig-devel xclip
@JeremyOttley
JeremyOttley / select_st
Created January 22, 2018 16:04
Draw an ST term in BSPWN
#!/usr/bin/env bash
read -r X Y W H G ID < <(slop -f "%x %y %w %h %g %i" -b 1 -t 0 -q)
# Width and Height in px need to be converted to columns/rows
# To get these magic values, make a fullscreen st, and divide your screen width by ${tput cols}, height by ${tput lines}
let "W = W / 8"
let "H = H / 16"
g=${W}x${H}+${X}+${Y}
echo $g #debugging
bspc rule -a st-256color -o state=floating
st -g $g
@JeremyOttley
JeremyOttley / bind.sh
Created January 23, 2018 16:41
Custom Terminal Bindings
#alias binds="bind -P | grep 'can be'"
stty -a | awk 'BEGIN{RS="[;n]+ ?"}; /= ..$/'
intr = ^C
quit = ^
erase = ^?
kill = ^U
eof = ^D
swtch = ^Z
@JeremyOttley
JeremyOttley / settings.json
Last active July 26, 2018 02:03
Visual Code Studio settings
{
"editor.fontFamily": "Fira Code",
"editor.fontLigatures": true,
"editor.wordWrap": "on",
"editor.formatOnSave": true,
"editor.formatOnPaste": true,
"editor.tokenColorCustomizations": {
"textMateRules": [
{
"scope": "comment, comment.block.html",
@JeremyOttley
JeremyOttley / atom.rb
Last active March 31, 2018 02:42
Atom setup for ruby development - ruby script
#!/usr/bin/env ruby
## GEMS ##
require 'pathname'
require 'fileutils'
## VARS ##
ATOM_HOME = Pathname.new(File.expand_path("#{Dir.home}/.atom"))
@JeremyOttley
JeremyOttley / install_rvm.rb
Created February 9, 2018 16:48
install rvm with ruby - WIP
#!/usr/bin/ruby -w
require 'pathname'
#require 'fileutils'
#require 'shell'
def install_rvm
puts "===> Installing RVM >>"
`curl -sSL https://rvm.io/mpapis.asc | gpg2 --import`
`curl -L https://get.rvm.io | bash -s stable --ruby`