All general purpose dot files with preferences and settings.
git clone git@github.com:islomar/dotfiles.git ~/.dotfiles
Some references used:
- CodelyTV
- https://dotfiles.github.io/
- https://github.com/marianudo/dotfiles
- https://github.com/google/styleguide/blob/gh-pages/intellij-java-google-style.xml
The hooks in hooks/ run in every repository on the machine, or only in the repositories you choose.
Both options set core.hooksPath. A repository's local value overrides the global one.
| Option | Script | Where the setting goes |
|---|---|---|
| Every repository | scripts/configure-global-git-hooks.sh |
Global Git config: core.hooksPath = ~/.dotfiles/hooks |
| One repository | scripts/configure-local-git-hooks.sh [repository-path] |
That repository's .git/config |
~/.gitconfig links to home/.gitconfig, which already contains the global setting.
A machine that links home/.gitconfig gets the hooks in every repository.
To use only the local option, remove hooksPath from home/.gitconfig on that machine.
configure-local-git-hooks.sh uses the current directory if you pass no path.
It does not replace an existing local core.hooksPath, such as one set by Husky,
because that turns off the other tool's hooks.
It prints the command to replace it anyway.
To undo it, run git config --unset core.hooksPath in the repository.
A repository with its own local core.hooksPath ignores the global hooks.
With the global option, run this in the repository:
git config core.hooksPath .git/hooksGit then runs only the repository's own hooks from .git/hooks.
To turn the global hooks back on, run git config --unset core.hooksPath.
Each file in hooks/ only calls the script with its name in scripts/, passing on its arguments and stdin.
The script holds all the logic.
| Hook | Git runs it | Script | What the script runs | Can block |
|---|---|---|---|---|
pre-commit |
Before a commit | pre-commit.sh |
The checks below | Yes |
pre-push |
Before a push | pre-push.sh |
detect-push-without-tests.sh |
Yes |
post-merge |
After a merge or a fast-forward pull | post-merge.sh |
install-dependencies-on-change.sh |
No |
post-rewrite |
After a rebase or commit --amend |
post-rewrite.sh |
install-dependencies-on-change.sh, on rebase only |
No |
scripts/pre-commit.sh runs three checks:
detect-commit-without-tests.shrejects a commit that changes JS/TS or Elixir source files without a test file.pre-pushruns the same check on the pushed commits. A repository can leave paths out of it with a.no-tests-ignorefile at its root: one extended regex per line, matched against paths relative to the root. The check skips blank lines and lines that start with#. This repository's.no-tests-ignoreleaves out^apps/.generate-markdown-toc.shupdates the doctoc table of contents in staged Markdown files and stages the result. It decodes percent-encoded anchors (#d%C3%ADato#día), because rumdl only accepts the decoded form.check-markdown.sh --stagedruns rumdl and Vale on staged Markdown files. rumdl fixes what it can and stages the fixes. Vale only reports: it blocks the commit only when it cannot run. Vale uses the repository's.vale.iniif present, otherwiseconfig/vale/.vale.ini.
install-dependencies-on-change.sh compares the commit before the pull with HEAD
and runs one command per changed dependency file:
| Changed file | Command |
|---|---|
pyproject.toml, poetry.lock |
make build |
package.json, yarn.lock |
yarn install if yarn.lock exists, otherwise npm install; then npm run build |
mix.exs, mix.lock |
mix deps.get && mix compile |
.tool-versions |
asdf install, then the Elixir setup steps from the stonehenge workflow |
These commands come from the repository you pull. A pull in an untrusted repository runs that repository's build and install scripts.
With pull.rebase = true, a pull without local commits runs post-merge.
A pull with local commits rebases them and runs post-rewrite instead.
Both run the same dependency check.
Git skips .git/hooks when core.hooksPath has a value.
Each hook script calls scripts/run-local-git-hook.sh at the end,
which runs the repository's own hook of the same name, if present.
This covers pre-commit, pre-push, post-merge and post-rewrite only.
Other hooks in .git/hooks, such as commit-msg, do not run.
- Markdown checks: rumdl, Vale and
doctoc (
npm install --global doctoc). Download the Vale styles once withvale sync --config ~/.dotfiles/config/vale/.vale.ini. Spell checking accepts English and Spanish. The Spanish dictionary lives inconfig/vale/styles/config/dictionaries, so it needs no extra install. It comes from the LibreOffice dictionaries (Debian packagehunspell-es), tri-licensed under GPL, LGPL and MPL. - Dependency check: the tools of each project, such as
make,npm,yarn,mixandasdf.
- One commit or push:
git commit --no-verify,git push --no-verify. - One pull:
git -c core.hooksPath=/dev/null pull.
- https://github.com/chipsenkbeil/choose
- https://www.macbartender.com/
- https://bjango.com/mac/istatmenus/
- https://apps.apple.com/us/app/dato/id1470584107?mt=12
- Tiling manager: https://github.com/koekeishiya/yabai
- I'm using the "IDE Settings Sync" plugin, which syncs the IDE settings on every instance where I'm logged in.
- Still, the exported settings are included in this repo as a ZIP file
Tasker writes 25,000 steps per day into Health Connect.
Setup for a new phone, the ADB helper script and the Tasker backup are in apps/tasker.
- elgato Stream Deck Mini
- https://help.elgato.com/hc/en-us/articles/360028232451-Elgato-Stream-Deck-Plugins
- App: StreamController, installed with Flatpak
- Run
install_elgato_stream_deck.sh. It installs StreamController, adds the udev rule for the device and restores the pages fromapps/streamcontroller/if StreamController has none. - On GNOME, the script also sets up automatic page switching by window: it sets
XDG_CURRENT_DESKTOP=GNOMEfor the Flatpak and requests the StreamController GNOME extension. Approve the GNOME dialog, then restart StreamController. - In StreamController, open the menu > Open Store and install what the pages use:
- Plugins: OS, Deck, OBS, Clocks, Weather, Battery and Speedtest.
- Icon packs: Material Icons and Bootstrap Icons. The pages refer to these icons, and
export_apps.shdoes not export them.
- In Settings > Plugins > OBS, enter the OBS WebSocket password.
- The OBS buttons run
obs-ctl(scripts/obs-ctl), linked into~/.local/binbyinstall-home-files.sh. export_apps.shexports the current pages toapps/streamcontroller/.- StreamController adds its own autostart entry.
- Focus the browser tab that plays sound:
apps/focus-audible-tab-extension. An OS plugin Hotkey action sendsAlt+Shift+M. The browser must have focus. - Google Meet controls: streamdeck-googlemeet.
- Version 1.6.3. The release page has the Chrome extension, the Firefox extension and the Stream Deck plugin.
- The browser extension connects to the plugin on
ws://127.0.0.1:2394. - The plugin runs in OpenDeck, which runs Elgato Stream Deck plugins on Linux.
OpenDeck installs it as
~/.config/opendeck/plugins/com.chrisregado.googlemeet.sdPlugin. - Chrome loads the extension unpacked from
apps/chrome-extension-v1.6.3. Do not move or delete this folder. Chrome does not keep its own copy. - Firefox installs the extension from the
.xpifile and keeps its own copy in the profile.
- Icons:
xdotooldoes not work from Ubuntu 22.04 (because of the migration from Xorg to Wayland)- Some alternatives:
dotoolandydotool
- Model: One by Wacom, model CTL-672
- Unpack One by Wacom: https://www.youtube.com/watch?v=GRjwkf0Qbg4
- https://www.wacom.com/en-es/about-wacom/news-and-events/2020/1436
- https://linuxwacom.github.io/
- https://help.ubuntu.com/stable/ubuntu-help/wacom.html.en
- https://github.com/linuxwacom
- OpenBoard: https://www.youtube.com/watch?v=4znZqySzUoQ
- Limnu
- Pear Deck
- Kami (web)
- Collaboard (web)
- Explain everything (web)
sudo apt install onboardsudo apt --fix-broken install- https://github.com/OpenBoard-org/OpenBoard/releases/download/v1.6.1/openboard_ubuntu_20.04_1.6.1_amd64.deb
sudo dpkg -i openboard_ubuntu_20.04_1.6.1_amd64.deb