• Stars
    star
    310
  • Rank 134,286 (Top 3 %)
  • Language
    Lua
  • Created over 12 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

mac OS, Arch Linux, and Debian/Ubuntu

dotfiles

My dotfiles. https://github.com/davidosomething/dotfiles

terminal screenshot

Screenshot of my ZSH prompt

My /uses post my be of interest to you!

Installation

See macOS specific notes in mac/README.md

Generally:

git clone https://github.com/davidosomething/dotfiles ~/.dotfiles

Then, run the bootstrap/symlink script for linux or bootstrap/mac for macOS.

After symlinking, bootstrap/cleanup can detect and move pre-existing dotfiles that conflict with these (mac does this).

Dev environment setup

After symlinking and restarting shell, aliases will be available. The sshkeygen alias will help in generating a new SSH key.

node, python, and ruby

Use rtx or asdf

Provisioning scripts

These will assist in installing packages and dotfiles. Best to have the environment set up first.

  • bootstrap/cleanup moves some dotfiles into their XDG Base Directory supported directories and deletes unnecessary things (with confirmation).
  • bootstrap/mac provision macOS. Runs other bootstrappers.
  • bootstrap/symlink symlinks rc files for bash, ZSH, ack, (Neo)vim, etc.

Updating

u is an alias to dot. Use u without arguments for usage.

Notes

  • bin/
    • There's a readme in bin/ describing each script/binary. This directory is in the $PATH.
  • git/
    • The comment character is # instead of ; so I can use Markdown in my commit messages without trimming the headers as comments. This is also reflected in a custom Vim highlighting syntax in vim/after/syntax/gitcommit.vim.
  • local/
    • Unversioned folder, put zshrc, bashrc, npmrc, and gitconfig here and they will be automatically sourced, LAST, by the default scripts. No dots on the filenames.
  • nvim/
  • python/
    • Never sudo pip. Set up a python virtual environment.
  • vim/
    • Not really maintained, I use neovim on all my systems now
    • See vim/README.md for more information.

rc script source order

If you have node installed, the dkosourced command will show you (not exhaustively) the order scripts get sourced. Without node echo $DKO_SOURCE works.

For X apps (no terminal) the value may be:

/etc/profile
.xprofile
  shell/vars
    shell/xdg

Shell script code style

  • Script architecture
    • Use the #!/usr/bin/env bash shebang and write with bash compatibility
    • Create a private main function with the same name as the shell script. E.g. for a script called fun, there should be a __fun() that gets called with the original arguments __fun $@
    • Two space indents
    • Prefer . over source
  • Function names
    • For private functions in a script, use two underscores __private_func() These function names are safe to reuse after running the script once. When namespaced, they are in the form of __dko_function_name().
  • Variable interpolation
    • Always use curly braces around the variable name when interpolating in double quotes.
  • Variable names
    • Stick to nouns, lower camel case
  • Variable scope
    • Use local and readonly variables as much as possible over global/shell-scoped variables.
  • Comparison
    • Not strict on POSIX, but portability
    • Do NOT use BASH arrays, use ZSH or Python if need something complicated
    • Use BASH == for string comparison
    • Use BASH (( A == 2 )) for integer comparison (note not $A, $ not needed)

Credits

Logo from jglovier/dotfiles-logo

More Repositories

1

vim-colors-meh

My perpetually WIP colorscheme
Vim Script
59
star
2

format-ts-errors.nvim

Neovim plugin to format tsserver LSP errors
Lua
52
star
3

git-my

Lists a user's remote branches and shows if it was merged and/or available locally
Shell
32
star
4

git-ink

Annotate your git branches
Shell
17
star
5

16.davidosomething.com

davidosomething.com static site, 2016 version
JavaScript
12
star
6

EasyClipRing.vim

vim plugin - pum completion menu for EasyClip yanks
Vim Script
10
star
7

duotone-base16

abandoned, someone else made a different one
JavaScript
9
star
8

grunt-peach

Search and replace strings in SQL dumps, including PHP serialized strings.
CoffeeScript
7
star
9

yanjing

KWin script to resize and move windows
JavaScript
6
star
10

everandever.nvim

Lua utilities for composing an LSP progress indicator.
Lua
4
star
11

vopen

Open files in a single vim/gvim server
Shell
4
star
12

grunt-toggl

Toggl API for Grunt. E.g. start time tracking with `grunt watch` or `grunt toggl`
JavaScript
3
star
13

vim-enhanced-resolver

[unmaintained] Vim plugin to resolve node/JS/commonJS/Webpack modules
Vim Script
3
star
14

jqrpg

This is an old jQuery 1.4 proof of concept RPG tile engine.
JavaScript
3
star
15

dkowpsnippets

Useful WordPress snippets to include in your theme's functions.php
PHP
3
star
16

potatoshuttle-dotfiles

DEFUNCT dotfiles for cygwin environment on my shuttle
Shell
2
star
17

git-relevant

Shell
2
star
18

git-take

Curry-style command to assist in `git checkout` single files
Shell
2
star
19

apcaccess-command-output

Script to output APC UPS short status using apcaccess command
Shell
2
star
20

syntastic-hbstidy

Vim plugin to clean up Handlebars templates BEFORE running Tidy via Syntastic
Vim Script
2
star
21

sagaofthemarshes

Visual Basic
2
star
22

jquery.wunderkind

CSS imagemap generator with eventable hotspots
JavaScript
2
star
23

projects

things I might build -- see the issues
2
star
24

Facebook-OpenGraph-API-Album-Loader

Loads public albums from Facebook and displays a gallery
JavaScript
2
star
25

caddy-docker-proxy-cloudflare

Caddy with docker proxy and cloudflare module
Dockerfile
1
star
26

dkowpconfig

boilerplate .gitignore and wp-config stuff for WordPress projects
PHP
1
star
27

camo.vim

Fork, fixed line endings for vim colorscheme camo
Vim Script
1
star
28

glutton

Backbone.js powered WordPress theme
JavaScript
1
star
29

grunt-wendy

Grunt task for custom CasperJS test runner
JavaScript
1
star
30

coffeescript-conventions

Coding conventions I adhere to for CoffeeScript
1
star
31

devcon

Dev container
Dockerfile
1
star
32

eslint-config-davidosomething

JavaScript
1
star
33

restic-docker

My fork of csumpter/restic-docker with Gotify notifications
Shell
1
star
34

gulp-remark-lint-dko

Gulp task - lint markdown using remark-lint
JavaScript
1
star
35

20.davidosomething.com

2020 version of my website
JavaScript
1
star
36

caddy-docker-proxy-google-domains

caddy-docker-proxy-google-domains
Dockerfile
1
star
37

dkovotables

Voting framework for WordPress. Lets you create objects to vote on, quizzes, polls, posts, etc.
PHP
1
star