Skip to content

Instantly share code, notes, and snippets.

View gilbertw1's full-sized avatar

Bryan Gilbert gilbertw1

View GitHub Profile
@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 <[email protected]>
# ASCII art by Brett Bohnenkamper <[email protected]>
# Changes Jerome Launay <[email protected]>
(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)
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
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
@gilbertw1
gilbertw1 / workspace.el
Last active February 20, 2020 16:07
persp-mode + eyebrowse
(use-package persp-mode :demand t
:config
(setq wg-morph-on nil
persp-autokill-buffer-on-remove 'kill-weak
persp-nil-name "nil"
persp-nil-hidden t
persp-auto-save-fname "autosave"
persp-auto-resume-time 1
persp-auto-save-opt 1
@gilbertw1
gilbertw1 / mu-index-notify.sh
Last active January 6, 2021 14:32
A simple script that re-indexes emails using mu and sends a notification if new emails are detected.
# puts timestamps into an easily comparable format
extract_timestamp() {
local RAW="$(echo "$1" | cut -c1-31)"
echo "$(date --date="$RAW" '+%Y-%m-%d:%H:%M:%S')"
}
# removes html characters that are interpreted poorly by dunst
format_string() {
echo "$1" | sed 's/>/\&gt;/' | sed 's/</\&lt;/' | sed 's/\$/\\$/'
}

XMonad Keybindings

Core

  • M-q Reload XMonad configuration
  • M-S-q Exit XMonad

Layout

  • M-SPC Switch to next layout in current workspace
  • M-S-SPC Reset layout in current workspace
  • M-f Switch to fullscreen layout
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2014-2017 Florian Bruhin (The Compiler) <[email protected]>
#
# This file is part of qutebrowser.
#
# qutebrowser is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
@gilbertw1
gilbertw1 / gvim
Created October 5, 2017 17:18
GVIM
#!/bin/sh
for file in "$@"
do
if [ -f "$file" ]; then
termite -e "nvim $file"
break
fi
done
@gilbertw1
gilbertw1 / evil.el
Created October 6, 2017 19:45
disable region limiting in evil-ex
(evil-define-command evil-ex (&optional initial-input)
:keep-visual t
:repeat abort
(interactive
(list
(let ((s (concat
(cond
(current-prefix-arg
(let ((arg (prefix-numeric-value current-prefix-arg)))
(cond ((< arg 0) (setq arg (1+ arg)))