Skip to content

Instantly share code, notes, and snippets.

View gilbertw1's full-sized avatar

Bryan Gilbert gilbertw1

View GitHub Profile
;; -*- mode: emacs-lisp -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Configuration Layers declaration.
You should not put any user code in this function besides modifying the variable
values."
(setq-default
;; Base distribution to use. This is a layer contained in the directory
@gilbertw1
gilbertw1 / xmonad.hs
Last active January 31, 2017 17:53
gaps + spaces
myLayout = smartBorders $ avoidStruts $ minimize (mkToggle (NOBORDERS ?? FULL ?? EOT) (tiled ||| Mirror tiled ||| Full))
where
-- default tiling algorithm partitions the screen into two panes
-- tiled = gaps [(U,5), (R,5), (L,5), (D,5)] $ spacing 5 $ Tall nmaster delta ratio
tiled = Tall nmaster delta ratio
-- The default number of windows in the master pane
nmaster = 1
-- Default proportion of screen occupied by master pane
@gilbertw1
gilbertw1 / .tmux.conf
Last active February 7, 2017 16:03
tmux config
# Tmux settings
# Set send prefix to b
bind b send-prefix
# Set XTerm key bindings
setw -g xterm-keys on
# Set colors
set-option -g default-terminal "screen-256color"
@gilbertw1
gilbertw1 / xmonad.hs
Created February 9, 2017 23:29
resizeable tall
import XMonad
import XMonad.Layout.Spacing
import XMonad.Layout.Gaps
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Util.Run
import XMonad.Util.EZConfig
import XMonad.Actions.CycleWS
import XMonad.Layout.Maximize
import XMonad.Layout.MultiToggle
@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
@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()
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 / 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
@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 / gruvbox.xresources
Created March 7, 2017 15:34
xmonad gruvbox dots
! -----------------------------------------------------------------------------
! File: gruvbox-dark.xresources
! Description: Retro groove colorscheme generalized
! Author: morhetz <[email protected]>
! Source: https://github.com/morhetz/gruvbox-generalized
! Last Modified: 6 Sep 2014
! -----------------------------------------------------------------------------
! hard contrast: *background: #1d2021
!*background: #1d2021