Skip to content

Instantly share code, notes, and snippets.

View kborling's full-sized avatar
🤘

Kevin Borling kborling

🤘
View GitHub Profile
@kborling
kborling / .wezterm.lua
Created January 23, 2023 01:46
Wezterm config
local wezterm = require("wezterm")
local is_dark = wezterm.gui.get_appearance():find("Dark")
-- local is_dark = true
local function is_vi_process(pane)
return pane:get_foreground_process_name():find("n?vim") ~= nil
end
local function conditional_activate_pane(window, pane, pane_direction, vim_direction)
if is_vi_process(pane) then
@kborling
kborling / config.scm
Created December 26, 2022 18:53 — forked from mbakke/config.scm
GuixSD with custom kernel
(define-module (my packages)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (gnu packages linux)
#:use-module (guix build-system trivial)
#:use-module (gnu)
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix packages))
(define (linux-nonfree-urls version)
@kborling
kborling / flycheck-eglot.el
Created November 15, 2022 14:06 — forked from zw963/flycheck-eglot.el
flycheck works with eglot (Stolen from doom)
(defvar-local +lsp--flycheck-eglot--current-errors nil)
(defun +lsp--flycheck-eglot-init (checker callback)
"CHECKER is the checker (eglot).
CALLBACK is the function that we need to call when we are done, on all the errors."
(eglot-flymake-backend #'+lsp--flycheck-eglot--on-diagnostics)
(funcall callback 'finished +lsp--flycheck-eglot--current-errors))
(defun +lsp--flycheck-eglot--on-diagnostics (diags &rest _)
(cl-labels
@kborling
kborling / early-init.el
Created November 1, 2022 23:53
Early Init - Emacs
;;; early-init.el --- Early Init File -*- lexical-binding: t -*-
;; Copyright (c) 2020-2022 Protesilaos Stavrou <[email protected]>
;; Author: Kevin Borling <[email protected]>
;; Version: 0.1.0
;; Package-Requires: ((emacs "28.1"))
;; This file is NOT part of GNU Emacs.
@kborling
kborling / emacs.el
Created September 27, 2022 00:46
Minimal Emacs - No packages
(setq gc-cons-threshold most-positive-fixnum ; 2^61 bytes
gc-cons-percentage 0.6
read-process-output-max (* 1024 1024))
(add-hook 'emacs-startup-hook
(lambda ()
(setq gc-cons-threshold (* 100 1024 1024)
gc-cons-percentage 0.1)))
(setq large-file-warning-threshold 200000000)
doas emerge -av
media-fonts/dejavu \
media-fonts/encodings \
media-fonts/font-adobe-75dpi \
media-fonts/font-alias \
media-fonts/font-bh-100dpi \
media-fonts/font-bitstream-100dpi \
media-fonts/font-bitstream-75dpi \
media-fonts/font-cursor-misc \
media-fonts/font-daewoo-misc \
@kborling
kborling / rc.xml
Last active March 9, 2022 22:00
Openbox config
<?xml version="1.0" encoding="UTF-8"?>
<openbox_config xmlns="http://openbox.org/3.4/rc" xmlns:xi="http://www.w3.org/2001/XInclude">
<resistance>
<strength>10</strength>
<screen_edge_strength>20</screen_edge_strength>
</resistance>
<focus>
<focusNew>yes</focusNew>
<!-- always try to focus new windows when they appear. other rules do
apply -->
@kborling
kborling / make.conf
Created February 18, 2022 17:50
Portage make.conf
# These settings were set by the catalyst build script that automatically
# built this stage.
# Please consult /usr/share/portage/config/make.conf.example for a more
# detailed example.
COMMON_FLAGS="-march=native -O2 -pipe"
CFLAGS="${COMMON_FLAGS}"
CXXFLAGS="${COMMON_FLAGS}"
FCFLAGS="${COMMON_FLAGS}"
FFLAGS="${COMMON_FLAGS}"
MAKEOPTS="-j4 -l4"
@kborling
kborling / cwm_window.sh
Created January 24, 2022 02:03
Window Movements
#!/bin/sh
# Move a window to the side of a screen.
case "$1" in
"left") xdotool getactivewindow windowmove 0 y ;;
"top") xdotool getactivewindow windowmove x 0 ;;
"right")
screen_width=$(xwininfo -root | grep Width | cut -d: -f2 | tr -d ' ')
win_width=$(xdotool getactivewindow getwindowgeometry --shell | grep WIDTH | cut -d= -f2)
@kborling
kborling / .cwmrc
Last active January 24, 2022 02:04
Calm Window Manager config
# automatically add new windows to the current group
sticky yes
# snap windows to edges at 4 pixels distance
borderwidth 0
snapdist 4
gap 10 10 10 10
moveamount 10
fontname "Hack:size=10"
## colors ##