My config files for various things
bash | ||
firefox | ||
git | ||
keepass | ||
nodejs | ||
tmux | ||
vscode | ||
windows | ||
wsl | ||
.gitignore | ||
config.sh | ||
README.md |
config
My config files for various things. Use config.sh
to automate the setup of several of them.
Things that are not checked in but which should live in this directory:
firefox/configs/
- files whose names are+
-separated filenames fromfirefox/
- these will be constructed by concatenation from the base files, and will be symlinked to from various profiles'user.js
filesfirefox/*.proxy
- proxy auto-config files - these too can be referred to in the abovefirefox/configs/
files, without the.proxy
extensiongcloud/
- Google Cloud SDK configuration filesgit/github_token
- GitHub Personal Access Token with read access to reposnodejs/.npmrc
- npm credentials, config, etc.ssh/
- SSH keys, config, etc.
Bash scripts
2path.sh
- create a symlink to a file or directory from~/bin
syncfiles.sh
- given paths to two or more files, prompt to copy the newest one over each of the older ones
WSL setup
Use wsl/install.cmd
to set up a new WSL installation. Run without arguments for details.
WSL scripts
wsl-apt
- runapt-get update
/upgrade
/install
/remove
/autoremove
/autoclean
- any package names given as arguments are treated as packages to
install
, except any prefixed with a-
are treated as packages toremove
- any package names given as arguments are treated as packages to
wsl-expose-ports
- expose one or more ports within WSL to the outside world- this sets up a port proxy and a Windows firewall rule for each exposed port, and removes previous port proxies and firewall rules
- multiple ports can be specified, each with an optional external port:
1234
exposes port 1234 as 1234,1234:5678
exposes port 5678 as 1234 - call without arguments to remove port proxies and firewall rules without creating new ones
wsl-fix-clock
- sync the WSL clock with the Windows clockwsl-fix-interop
- fixWSL_INTEROP
variable when it becomes incorrectly setwsl-services
- start useful services not automatically started by WSL- starts
procps
forsysctl
configuration
- starts
Firefox
For each profile:
- Use the script commands to create a symlink for
user.js
- Change the default search engine to DuckDuckGo
- Current approximate complement of add-ons (varies by profile):
Git scripts
git clean-branches
- delete local branches which track deleted remote branchesgit clean-config
- unset various local config values, so global config will be usedgit clean-dates
- set commit dates of all commits in the given range to their authoring datesgit clean-fork
- assumingorigin
andfork
remotes, resets default branch onfork
to first commit onorigin
, deletes all other branches onfork
that are present onorigin
, and deletes all tags onfork
git clean-modes
- reset all file modes to those in the repositorygit clean-mtime
- set a file's mtime to its most recent commit's author dategit clean-pr
- delete allpr/
branches created bygit cpr
get clean-user
- set author and committer of all commits in the given range to the currently configured identitygit cpr
- checkout a PR from GitHub by id, and set up the local branch to track the appropriate branch on the appropriate forkgit download-bundle
- download a bundle file from a remote repositorygit index-list-skip
- list all files that have had--skip-worktree
set on themgit index-skip
- set--skip-worktree
on a given filegit index-unskip
- set--no-skip-worktree
on a given filegit npm-add
- stage precisely the files that would be included in an npm packagegit track
- set current branch to track given remote and branch, defaulting to same branch namegit turbo-gc
- turbo garbage collect
Git Credential Manager Core WSL/Windows interop
Copy git/wsl/git-credential-manager
into the root of the Git for Windows installation, and symlink to it from the WSL PATH
.
Node.js/npm scripts
npma.sh
- find the given binaries searching upwards throughnode_modules
and output aliases for them, suitable for>> ~/.bash_aliases
npmg.sh
- create a commit for a new version (if there are staged changed), and create and tag an otherwise dangling commit from HEAD that contains all of the filesnpm publish
wouldnpml.sh
- find thenode_modules
where the given dependencies are used, search up further for directories defining them, and create symlinks
tmux keybindings
The included .tmux.conf
makes the following changes/additions to the default tmux keybindings:
- The prefix key is now
ctrl-a
(andctrl-a ctrl-a
is used to sendctrl-a
to the console) - Switching windows is done with
ctrl-alt-left/right
(no prefix key) - Switching panes is done with
alt-left/right/up/down
(no prefix key) - Splitting panes is done with
ctrl-a |
(horizontal) andctrl-a -
(vertical) - Reloading
~/.tmux.conf
is done withctrl-a shift-r
Mouse control is also enabled, and the terminal mode is set to screen-256color
.