Skip to content

Instantly share code, notes, and snippets.

@anderspollack
anderspollack / magit
Created February 27, 2025 20:09
Run magit from emacsclient
#!/bin/bash
set -euo pipefail
if ! emacsclient -a false --eval nil --quiet >/dev/null 2>&1; then
echo "Error: Emacs not running." >&2
exit 1
fi
# Runs with no window system, disables menu-bar-mode and gruvbox-light-medium theme
@anderspollack
anderspollack / .vimrc
Last active August 18, 2025 06:43
.vimrc
" Install vim-plug if not found
if empty(glob('~/.vim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
endif
" Run PlugInstall if there are missing plugins
autocmd VimEnter * if len(filter(values(g:plugs), '!isdirectory(v:val.dir)'))
\| PlugInstall --sync | source $MYVIMRC
\| endif
@anderspollack
anderspollack / karabiner.json
Last active May 21, 2022 07:03
Karabiner configuration in ~/.config/karabiner/karabiner.json
{
"global": {
"check_for_updates_on_startup": true,
"show_in_menu_bar": true,
"show_profile_name_in_menu_bar": false
},
"profiles": [
{
"complex_modifications": {
"parameters": {
@anderspollack
anderspollack / .bash_profile
Last active October 3, 2024 19:13
dotfiles
[[ -f ~/.bashrc ]] && source ~/.bashrc
[[ -f ~/.private ]] && source ~/.private