Skip to content

Instantly share code, notes, and snippets.

import XMonad
import XMonad.Actions.CopyWindow
import XMonad.Actions.CycleWS (nextWS, prevWS)
import XMonad.Actions.WindowBringer (gotoMenu')
import XMonad.Config.Gnome
import XMonad.Config.Desktop (desktopLayoutModifiers)
import XMonad.Hooks.ManageHelpers (doCenterFloat, doFullFloat, isFullscreen, composeOne, (-?>))
import XMonad.Hooks.EwmhDesktops
import XMonad.Layout (Full(..), Mirror(..), Tall(..), (|||))
import XMonad.Layout.Gaps
@travisbhartwell
travisbhartwell / nix-shell-shebang.md
Last active January 20, 2026 22:11
nix-shell and Shebang Lines

NOTE: a more up-to-date version of this can be found on my blog

nix-shell and Shebang Lines

A few days ago, version 1.9 of the Nix package manager was released. From the release notes:

nix-shell can now be used as a #!-interpreter. This allows you to write scripts that dynamically fetch their own dependencies.

# -*- mode: shell-script; sh-shell: zsh; sh-basic-offset: 4; sh-indentation: 4; coding: utf-8 -*-
local -r project_name="Java"
cd-project-today-dir "${project_name}"
font-family = MesloLGS NF
background = 000000
window-padding-x = 16
window-padding-y = 16
@travisbhartwell
travisbhartwell / process_messages.py
Last active June 26, 2025 22:16
Export LinkedIn Messages to Markdown
#!/usr/bin/env python3
from collections import defaultdict
import csv
from dataclasses import dataclass
from datetime import datetime
from pathlib import Path
import sys
@travisbhartwell
travisbhartwell / myproject-lib.coverage
Created June 21, 2025 22:03
Code coverage for MyProject
#: # -*- mode: shell-script; sh-shell: bash; sh-basic-offset: 4; sh-indentation: 4; coding: utf-8 -*-
#: # shellcheck shell=bash
:
#: # MyCmd Project Command Group Library
#: # Library for Project Task Runner Functionality
:
4: set -o nounset -o errexit -o errtrace -o pipefail
:
4: (return 0 >/dev/null 2>&1) || {
-: echo >&2 "$0 is a library only meant to be sourced."
@travisbhartwell
travisbhartwell / README.md
Created February 24, 2023 05:53
My Via JSON file for my Controller Works mini42

This is my modification of the default mini42 layout with the following changes:

  • Changed Left Control to ESC. This matches how I configure "regular" keyboards, changing Caps to Escape.
  • Changed the left Space to Left Control.
  • Moved the arrow keys in the lower layer to HJKL.

I am sure I will tweak these as I get used to my new keyboard and upload my changes here.

If it wasn't obvious, I am a developer that uses vim keybindings where-ever possible.

Title: "The One with the NFTs"
Scene 1:
(The gang is sitting in Central Perk, discussing their latest finds on the internet)
Rachel: "Guys, have you heard of these things called NFTs? They're like digital collectibles or something?"
Monica: "Yeah, I've seen them on Instagram. People are paying crazy amounts of money for them."

Flutter Development on my Pixel Slate

I watched Chrome OS: Ready for Web Development (Chrome Dev Summit 2018) last year and it's what made me realize that a Chrome OS device could work for what I needed: a replacement for my old Android tablet and a device for personal projects. When the Pixel Slate was announced, I knew it fit my needs.

Linux and Android Support

Chrome OS uses LXD containers to run the Android and desktop Linux systems. This system is called Crostini. See this page for a list of current Chrome OS devices that support Crostini.

The default container image current runs Debian stable, but you can easily create your own images. I mean to do so to run [NixOS](https: