Skip to content

Instantly share code, notes, and snippets.

View gilbertw1's full-sized avatar

Bryan Gilbert gilbertw1

View GitHub Profile
set nocompatible
if empty(glob('~/.config/nvim/autoload/plug.vim'))
silent !curl -fLo ~/.config/nvim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
if (has("nvim"))
let $NVIM_TUI_ENABLE_CURSOR_SHAPE=1
Xft.dpi: 150
Xft.antialias: true
Xft.hinting: true
Xft.rgba: rgb
Xft.hintstyle: hintslight
rofi.color-enabled: true
rofi.font: Hack Bold 16
rofi.modi: window,run,ssh
rofi.opacity: 90
(defun toggle-tabs-local ()
(interactive)
(if indent-tabs-mode
(setq-local indent-tabs-mode nil)
(setq-local indent-tabs-mode t)))
(defun set-indentation-local ()
(interactive)
(let ((indent (string-to-number (read-string "Indentation: "))))
(setq-local tab-width indent)
@gilbertw1
gilbertw1 / archey-metroid.sh
Created March 7, 2017 17:04
Archey with 'Arch' replaced with a metroid
#!/usr/bin/python2
# coding=utf-8
# Archey Plus [version 0.2.8]
#
# Archey is a system information tool written in Python.
# This tool should work all supported OSs.
#
# Maintained by Melik Manukyan <melik@archlinux.us>
# ASCII art by Brett Bohnenkamper <kittykatt@silverirc.com>
# Changes Jerome Launay <jerome@projet-libre.org>
@gilbertw1
gilbertw1 / gruvbox.xresources
Created March 7, 2017 15:34
xmonad gruvbox dots
! -----------------------------------------------------------------------------
! File: gruvbox-dark.xresources
! Description: Retro groove colorscheme generalized
! Author: morhetz <morhetz@gmail.com>
! Source: https://github.com/morhetz/gruvbox-generalized
! Last Modified: 6 Sep 2014
! -----------------------------------------------------------------------------
! hard contrast: *background: #1d2021
!*background: #1d2021
@gilbertw1
gilbertw1 / keybinds.el
Last active July 5, 2017 07:33
spacemacs keybinds
(evil-define-operator evil-delete-char-without-register (beg end type reg)
"delete character without yanking unless in visual mode"
:motion evil-forward-char
(interactive "<R><y>")
(if (evil-visual-state-p)
(evil-delete beg end type reg)
(evil-delete beg end type ?_)))
(evil-define-operator evil-delete-backward-char-without-register (beg end type reg)
"delete backward character without yanking"
@gilbertw1
gilbertw1 / xmobarrc
Last active March 3, 2017 21:39
xmonad.hs
Config {
font = "xft:MesloLGM:size=9.5:bold:antialias=true"
, bgColor = "#282828"
, fgColor = "#ebdbb2"
, position = TopW L 94
, alpha = 150
, commands = [ Run Cpu ["-t", "<fc=#83a598><icon=/home/gilbertw1/.xmonad/icons/cpu.xbm/></fc> <total>%", "-L","3","-H","50","-l","#ebdbb2","-n","#ebdbb2","-h","#fb4934"] 10
, Run Memory ["-t","<fc=#458588><icon=/home/gilbertw1/.xmonad/icons/mem.xbm/></fc> <usedratio>%","-H","80","-L","10","-l","#ebdbb2","-n","#ebdbb2","-h","#fb4934"] 10
, Run Date "%a %b %_d %k:%M" "date" 10
, Run DynNetwork ["-t","<fc=#8ec07c><icon=/home/gilbertw1/.xmonad/icons/arrow_down.xbm/></fc> <rx>, <fc=#d3869b><icon=/home/gilbertw1/.xmonad/icons/arrow_up.xbm/></fc> <tx>","-H","200","-L","10","-h","#ebdbb2","-l","#ebdbb2","-n","#ebdbb2"] 10
fn start_cropped_screencast_process_gif(slop_out: &SlopOutput, out_path: &Path) -> (Child, Child) {
let ffmpeg_proc =
Command::new("ffmpeg")
.args(&["-f", "x11grab",
"-s", &format!("{}x{}", slop_out.w, slop_out.h),
"-i", &format!(":0.0+{},{}", slop_out.x, slop_out.y),
"-an",
"-f", "image2pipe",
"-vcodec", "ppm",
"-"])
@gilbertw1
gilbertw1 / BinaryWordGameCheater.scala
Created February 16, 2017 20:18
Binary Word Game Cheater
import scala.io.Source
import scala.util.Sorting
import scala.collection.mutable.ListBuffer
import scala.math._
import Stream._
object PrimeChompWordGameDictionary {
private val dictionary = createDictionary()
@gilbertw1
gilbertw1 / xmonad.hs
Created February 15, 2017 22:58
xmonad
import System.Exit
import Data.Maybe (Maybe, isNothing, fromJust)
import qualified Data.List as L
import qualified Data.Map as M
import GHC.IO.Handle
-- Xmonad Core
import XMonad
import qualified XMonad.StackSet as W
import XMonad.Config.Desktop