"
13 | echo "Example: ./huh.sh \"ls -l\""
14 | echo "Output: List files in long format"
15 | echo
16 | echo "This script is useful for understanding what a command does before running it."
17 | echo "It does not execute the command, only describes its functionality."
18 | }
19 |
20 | # Check for a valid command input
21 | if [[ -z "$1" ]] || [[ "$1" == "-h" || "$1" == "--help" ]]; then
22 | help_message
23 | exit 0
24 | fi
25 |
26 | # Extract the command description
27 | command_description=$(whatis "$1")
28 |
29 | # Display the command description
30 | echo "Command: $1"
31 | echo "Description: $command_description"
32 |
--------------------------------------------------------------------------------
/vscode/snippets-old/typescriptreact.json:
--------------------------------------------------------------------------------
1 | {
2 | // Place your snippets for typescriptreact here. Each snippet is defined under a snippet name and has a prefix, body and
3 | // description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
4 | // $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
5 | // same ids are connected.
6 | // Example:
7 | // "Print to console": {
8 | // "prefix": "log",
9 | // "body": [
10 | // "console.log('$1');",
11 | // "$2"
12 | // ],
13 | // "description": "Log output to console"
14 | // }
15 | "()=> Fragment Component": {
16 | "prefix": [
17 | "raff"
18 | ],
19 | "body": [
20 | "import React from 'react'\n",
21 | "const ${1:Name} = (${2:props}) => {",
22 | "\treturn (",
23 | "\t\t<${3}>\n\t\t\t${0}",
24 | "\t\t>",
25 | "\t)",
26 | "}\n",
27 | "export default ${1:Name};"
28 | ],
29 | "description": "React arrow function component with enclosing React.Fragment elements."
30 | },
31 | }
32 |
--------------------------------------------------------------------------------
/Firefox/userContent.css:
--------------------------------------------------------------------------------
1 | /*------ HOME/NEWTAB PAGE (About:home, about:newtab) ------*/
2 | @-moz-document url-prefix(about:home), url-prefix(about:newtab) {
3 | body {
4 | background-color: #393838 !important;
5 | color: var(--home-text) !important;
6 | overflow: auto !important;
7 | }
8 | }
9 |
10 | /*------ READER-VIEW ------*/
11 | @-moz-document url-prefix("about:reader") {
12 | body.dark {
13 | color: #e6d6ac !important;
14 | background-color: #2a2426 !important;
15 | }
16 | body.light {
17 | color: #222 !important;
18 | background-color: rgb(201, 186, 186) !important;
19 | }
20 | body.sepia {
21 | color: #5b4636 !important;
22 | background-color: #f4ecd8 !important;
23 | }
24 | body.serif {
25 | font-family: serif !important;
26 | }
27 | body.sans-serif {
28 | font-family: "HK Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI",
29 | Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif !important;
30 | font-weight: 200;
31 | }
32 | }
33 |
34 | @-moz-document url(chrome://devtools/content/webconsole/index.html)
35 | {
36 | :root {
37 | min-width: 33vw;
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/git/git-dates.txt:
--------------------------------------------------------------------------------
1 | # Dates
2 |
3 | %a Abbreviated weekday name
4 | %A Full weekday name
5 | %b Abbreviated month name
6 | %B Full month name
7 | %c Date and time representation appropriate for locale
8 | %d Day of month as decimal number (01 – 31)
9 | %H Hour in 24-hour format (00 – 23)
10 | %I Hour in 12-hour format (01 – 12)
11 | %j Day of year as decimal number (001 – 366)
12 | %m Month as decimal number (01 – 12)
13 | %M Minute as decimal number (00 – 59)
14 | %p Current locale's A.M./P.M. indicator for 12-hour clock
15 | %S Second as decimal number (00 – 59)
16 | %U Week of year as decimal number, with Sunday as first day of week (00 – 53)
17 | %w Weekday as decimal number (0 – 6; Sunday is 0)
18 | %W Week of year as decimal number, with Monday as first day of week (00 – 53)
19 | %x Date representation for current locale
20 | %X Time representation for current locale
21 | %y Year without century, as decimal number (00 – 99)
22 | %Y Year with century, as decimal number
23 | %z, %Z Either the time-zone name or time zone abbreviation, depending on registry settings
24 | %% Percent sign
25 |
26 |
--------------------------------------------------------------------------------
/FirefoxDeveloperEdition/userContent.css:
--------------------------------------------------------------------------------
1 | /*------ HOME/NEWTAB PAGE (About:home, about:newtab) ------*/
2 | @-moz-document url-prefix(about:home), url-prefix(about:newtab) {
3 | body {
4 | background-color: #393838 !important;
5 | color: var(--home-text) !important;
6 | overflow: auto !important;
7 | }
8 | }
9 |
10 | /*------ READER-VIEW ------*/
11 | @-moz-document url-prefix("about:reader") {
12 | body.dark {
13 | color: #e6d6ac !important;
14 | background-color: #2a2426 !important;
15 | }
16 |
17 | body.light {
18 | color: #222 !important;
19 | background-color: rgb(201, 186, 186) !important;
20 | }
21 |
22 | body.sepia {
23 | color: #5b4636 !important;
24 | background-color: #f4ecd8 !important;
25 | }
26 |
27 | body.serif {
28 | font-family: serif !important;
29 | }
30 |
31 | body.sans-serif {
32 | font-family: "HK Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI",
33 | Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif !important;
34 | font-weight: 200;
35 | }
36 | }
37 |
38 | @-moz-document url(chrome://devtools/content/webconsole/index.html){
39 | :root {
40 | min-width: 33vw;
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/scripts/check_extensions.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | #title :check-extensions.sh
3 | #description :List VS Code extensions to file, overwrite if contents is changed
4 | #author :Timothy Merritt
5 | #date :2022-10-18
6 | #version :0.0.1
7 | #usage :./check-extensions.sh
8 | #notes :
9 | #bash_version :5.2.2(1)-release
10 | #============================================================================
11 |
12 | # VS Code extension file
13 | vs_ext_file=$HOME/.dotfiles/vscode/extensions.txt
14 |
15 | # List VS Code extensions and write to file
16 | write_ext() {
17 | printf "Writing extensions to %s\n" "$vs_ext_file"
18 | sleep .5
19 | code-insiders --list-extensions >"$vs_ext_file"
20 | }
21 |
22 | # Main script
23 | main() {
24 | printf "\e[1;33m%-4s\e[mChecking VS Code Extensions\n" "●"
25 | sleep .5
26 | # Check if file exists
27 | if [ -f "$vs_ext_file" ]; then
28 | printf "Writing extensions...\n"
29 | write_ext
30 | else
31 | printf "Extension file does not exist, creating new.\n"
32 | sleep .5
33 | touch "$vs_ext_file"
34 | write_ext
35 | fi
36 | printf "\e[0;32m%-4s\e[mFinished\n" "✔"
37 | exit 0
38 | }
39 |
40 | main
41 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Configurations, Customizations, and Hacky Scripts
7 |
8 |
9 |
10 | By
11 | Timothy Merritt
12 |
13 |
14 | These are my personal dotfile/configurations, geared mostly towards a macOS web development environment.
15 |
16 | Forking or just implementing the configs here might end up breaking your stuff, but feel free to use whatever appeals to you.
17 |
18 | I've tried to credit any inspirations for these files, but over a few years of constant tweaking I'm sure some sources have been lost along the way.
19 |
20 | ## Contents
21 |
22 | - [Firefox Settings](./Firefox/README.md)
23 | - [macOS System Settings](./docs/configuration.md)
24 | - [git Settings](./git/README.md)
25 | - [iTerm Settings](./iTerm/README.md)
26 | - [Karabiner Settings](./karabiner/)
27 | - [Kitty Settings](./kitty/README.md)
28 | - [neofetch Settings](./neofetch/README.md)
29 | - [Neovim Settings](./nvim/README.md)
30 | - [Rectangle Settings](./rectangle/)
31 | - [Scripts](./scripts/README.md)
32 | - [Tools](./tools/)
33 | - [VS Code Settings](./vscode/) - _Note that these settings are the ones that change most often, and might not always be stable_
34 | - [Zsh+Oh My Zsh Settings](./zsh/README.md)
35 |
--------------------------------------------------------------------------------
/scripts/nodeswitch.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | #title :nodeswitch.sh
3 | #description :Display verbose information when switching node versions with nvm
4 | #author :Timothy Merritt
5 | #date :2024-11-07
6 | #version :0.1
7 | #usage :./nodeswitch.sh
8 | #notes :
9 | #bash_version :5.2.37(1)-release
10 | #============================================================================
11 |
12 | # Load nvm
13 | export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
14 | [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
15 |
16 | # Current Node Version
17 | CURRENT_NODE_VERSION=$(node -v)
18 |
19 | # If 'nvm use' results in a different version, grep the version number
20 | # from the output and assign it to the variable NEW_NODE_VERSION
21 | NEW_NODE_VERSION=$(nvm use | grep -o 'Now using node v[0-9]\+\.[0-9]\+\.[0-9]\+' | awk '{print $4}')
22 |
23 | # Create a main function to run the script that approximates 'nvm use' with the above verbose information included in the output
24 | main() {
25 | if [ "$CURRENT_NODE_VERSION" != "$NEW_NODE_VERSION" ]; then
26 | echo -e "🔄 Switching from Node.js version \033[1;33m$CURRENT_NODE_VERSION\033[0m to \033[1;32m$NEW_NODE_VERSION\033[0m"
27 | nvm use
28 | else
29 | echo -e "✅ Node.js version \033[1;32m$CURRENT_NODE_VERSION\033[0m is already in use"
30 | fi
31 | }
32 |
33 | # Run the main function
34 | main
35 |
--------------------------------------------------------------------------------
/scripts/diceAverage.js:
--------------------------------------------------------------------------------
1 | // usage: node diceAverage.js [dice notation with modifier]
2 | // The expected input format is "XdY+Z" or "XdY-Z" where:
3 | const diceInput = process.argv[2];
4 |
5 | if (!diceInput) {
6 | console.error(
7 | 'Please provide a valid dice notation with modifier (e.g., "3d6+4").'
8 | );
9 | process.exit(1);
10 | }
11 |
12 | const diceMatch = diceInput.match(/(\d+d\d+)([+-]\d+)?/);
13 | const diceNotation = diceMatch[1];
14 | const modifier = diceMatch[2] || "+0";
15 | if (!/^\d+d\d+$/.test(diceNotation)) {
16 | console.error(
17 | 'Invalid dice notation. Please use a format like "3d6+4" or "3d6 - 4".'
18 | );
19 | process.exit(1);
20 | }
21 |
22 | const [numberOfDice, numberOfFaces] = diceNotation.split("d").map(Number);
23 | const modifierValue = parseInt(modifier, 10) || 0;
24 |
25 | if (
26 | isNaN(numberOfDice) ||
27 | isNaN(numberOfFaces) ||
28 | numberOfDice < 1 ||
29 | numberOfFaces < 1
30 | ) {
31 | console.error(
32 | 'Invalid dice notation. Please use a format like "3d6+4" or "3d6 - 4".'
33 | );
34 | process.exit(1);
35 | }
36 |
37 | function calculateAverageRoll(numberOfDice, numberOfFaces) {
38 | return ((numberOfFaces + 1) / 2) * numberOfDice;
39 | }
40 | const averageRoll = calculateAverageRoll(numberOfDice, numberOfFaces);
41 | console.log(
42 | `The average roll of ${numberOfDice}d${numberOfFaces} ${modifier} is ${
43 | averageRoll + (modifier.startsWith("-") ? -modifierValue : modifierValue)
44 | }.`
45 | );
46 |
--------------------------------------------------------------------------------
/altTab/README:
--------------------------------------------------------------------------------
1 | # Alt-Tab
2 |
3 | Alt-Tab is a window switcher for Mac OS X. It allows you to switch between different windows of the same application just like you would on Windows, with the biggest benefit being that you get a small preview of the actual window instead of just an icon.
4 |
5 | ## Installation
6 |
7 | Alt-Tab doesn't have a proper settings export function, but you can manually use `defaults` to handle the settings.
8 |
9 | ```sh
10 | # defaults write com.lwouis.alt-tab-macos
11 |
12 | # Example
13 | defaults write com.lwouis.alt-tab-macos showDesktopIcon -bool true
14 |
15 | # To reset a setting
16 | defaults delete com.lwouis.alt-tab-macos
17 |
18 | # To list all settings
19 | defaults read com.lwouis.alt-tab-macos
20 | ```
21 |
22 | Or, you could just use the GUI :D.
23 |
24 | If you're in VS Code, here's a cool little extension for making `.plist` files pleasant to work with: https://github.com/ivanhernandez13/vscode-plist
25 |
26 |
27 | 1. Download: [GitHub](https://github.com/lwouis/alt-tab-macos) | [AltTab Website](https://alt-tab-macos.netlify.app/)
28 | 2. Make sure [`com.lwouis.alt-tab-macos.plist`](./com.lwouis.alt-tab-macos.plist) file is in `~/Library/Preferences/`—I prefer using a symlink for this to keep my settings in one place.
29 | 1. `ln -s ~/where-you-keep-your-dotfiles/com.lwouis.alt-tab-macos.plist ~/Library/Preferences/com.lwouis.alt-tab-macos.plist`
30 |
31 | *For more info: See https://github.com/lwouis/alt-tab-macos/issues/1219*
32 |
--------------------------------------------------------------------------------
/vscode/snippets-old/javascriptreact.json:
--------------------------------------------------------------------------------
1 | {
2 | // Place your snippets for javascriptreact here. Each snippet is defined under a snippet name and has a prefix, body and
3 | // description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
4 | // $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
5 | // same ids are connected.
6 | // Example:
7 | // "Print to console": {
8 | // "prefix": "log",
9 | // "body": [
10 | // "console.log('$1');",
11 | // "$2"
12 | // ],
13 | // "description": "Log output to console"
14 | // }
15 | "Fetch Template": {
16 | "prefix": [
17 | "fetch",
18 | "fetem"
19 | ],
20 | "body": [
21 | "fetch('${2:url}').then(res =>",
22 | "\tres.json().then(data => {",
23 | "\t\t// Do something with the data",
24 | "\t\t// e.g., setState(data)",
25 | "\t\t${1:console.log(data);}\n\t\t${0}",
26 | "\t})",
27 | ")"
28 | ],
29 | "description": "A for loop."
30 | },
31 | "Arrow Function Component": {
32 | "prefix": [
33 | "raff",
34 | "rarrow"
35 | ],
36 | "body": [
37 | "import React from 'react'\n",
38 | "const ${1:Name} = (${2:props}) => {",
39 | "\treturn (",
40 | "\t\t<>",
41 | "\t\t>",
42 | "\t)",
43 | "}\n",
44 | "export default ${1:Name};"
45 | ],
46 | "description": "React Arrow Func Component"
47 | },
48 | }
49 |
--------------------------------------------------------------------------------
/vscode/snippets/javascriptreact.json:
--------------------------------------------------------------------------------
1 | {
2 | // Place your snippets for javascriptreact here. Each snippet is defined under a snippet name and has a prefix, body and
3 | // description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
4 | // $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
5 | // same ids are connected.
6 | // Example:
7 | // "Print to console": {
8 | // "prefix": "log",
9 | // "body": [
10 | // "console.log('$1');",
11 | // "$2"
12 | // ],
13 | // "description": "Log output to console"
14 | // }
15 | "Fetch Template": {
16 | "prefix": [
17 | "fetch",
18 | "fetem"
19 | ],
20 | "body": [
21 | "fetch('${2:url}').then(res =>",
22 | "\tres.json().then(data => {",
23 | "\t\t// Do something with the data",
24 | "\t\t// e.g., setState(data)",
25 | "\t\t${1:console.log(data);}\n\t\t${0}",
26 | "\t})",
27 | ")"
28 | ],
29 | "description": "A for loop."
30 | },
31 | "Arrow Function Component": {
32 | "prefix": [
33 | "raff",
34 | "rarrow"
35 | ],
36 | "body": [
37 | "import React from 'react'\n",
38 | "const ${1:Name} = (${2:props}) => {",
39 | "\treturn (",
40 | "\t\t<>",
41 | "\t\t>",
42 | "\t)",
43 | "}\n",
44 | "export default ${1:Name};"
45 | ],
46 | "description": "React Arrow Func Component"
47 | },
48 | }
49 |
--------------------------------------------------------------------------------
/git/commit-conventions.txt:
--------------------------------------------------------------------------------
1 | # ----------------------------------------------------------
2 | # Header - type(scope): Brief description
3 | # ----------------------------------------------------------
4 | # * feat A new feature - SemVar MINOR
5 | # * fix A bug fix - SemVar PATCH
6 | # * BREAKING CHANGE Breaking API change - SemVar MAJOR
7 | # * docs Change to documentation only
8 | # * style Change to style (whitespace, etc.)
9 | # * refactor Change not related to a bug or feat
10 | # * perf Change that affects performance
11 | # * test Change that adds/modifies tests
12 | # * build Change to build system
13 | # * ci Change to CI pipeline/workflow
14 | # * chore General tooling/config/min refactor
15 | # ----------------------------------------------------------
16 |
17 |
18 | # ----------------------------------------------------------
19 | # Body - More description, if necessary
20 | # ----------------------------------------------------------
21 | # * Motivation behind changes, more detail into how
22 | # functionality might be affected, etc.
23 | # ----------------------------------------------------------
24 |
25 |
26 | # ----------------------------------------------------------
27 | # Footer - Associated issues, PRs, etc.
28 | # ----------------------------------------------------------
29 | # * Ex: Resolves Issue #207, see PR #15, etc.
30 | # ----------------------------------------------------------
31 |
32 |
--------------------------------------------------------------------------------
/vscode/snippets/typescript.json:
--------------------------------------------------------------------------------
1 | {
2 | // Place your snippets for typescript here. Each snippet is defined under a snippet name and has a prefix, body and
3 | // description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
4 | // $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
5 | // same ids are connected.
6 | // Example:
7 | // "Print to console": {
8 | // "prefix": "log",
9 | // "body": [
10 | // "console.log('$1');",
11 | // "$2"
12 | // ],
13 | // "description": "Log output to console"
14 | // }
15 | "Fetch Template": {
16 | "prefix": [
17 | "fetch",
18 | "fetem"
19 | ],
20 | "body": [
21 | "fetch('${2:url}').then(res =>",
22 | "\tres.json().then(data => {",
23 | "\t\t// Do something with the data",
24 | "\t\t// e.g., setState(data)",
25 | "\t\t${1:console.log(data);}\n\t\t${0}",
26 | "\t})",
27 | ")"
28 | ],
29 | "description": "A for loop."
30 | },
31 | "()=> Fragment Component": {
32 | "prefix": [
33 | "raff"
34 | ],
35 | "body": [
36 | "import React from 'react'\n",
37 | "const ${1:Name} = (${2:props}) => {",
38 | "\treturn (",
39 | "\t\t<${3}>\n\t\t\t${0}",
40 | "\t\t>",
41 | "\t)",
42 | "}\n",
43 | "export default ${1:Name};"
44 | ],
45 | "description": "React arrow function component with enclosing React.Fragment elements."
46 | },
47 | }
48 |
--------------------------------------------------------------------------------
/vscode/snippets-old/typescript.json:
--------------------------------------------------------------------------------
1 | {
2 | // Place your snippets for typescript here. Each snippet is defined under a snippet name and has a prefix, body and
3 | // description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
4 | // $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
5 | // same ids are connected.
6 | // Example:
7 | // "Print to console": {
8 | // "prefix": "log",
9 | // "body": [
10 | // "console.log('$1');",
11 | // "$2"
12 | // ],
13 | // "description": "Log output to console"
14 | // }
15 | "Fetch Template": {
16 | "prefix": [
17 | "fetch",
18 | "fetem"
19 | ],
20 | "body": [
21 | "fetch('${2:url}').then(res =>",
22 | "\tres.json().then(data => {",
23 | "\t\t// Do something with the data",
24 | "\t\t// e.g., setState(data)",
25 | "\t\t${1:console.log(data);}\n\t\t${0}",
26 | "\t})",
27 | ")"
28 | ],
29 | "description": "A for loop."
30 | },
31 | "()=> Fragment Component": {
32 | "prefix": [
33 | "raff"
34 | ],
35 | "body": [
36 | "import React from 'react'\n",
37 | "const ${1:Name} = (${2:props}) => {",
38 | "\treturn (",
39 | "\t\t<${3}>\n\t\t\t${0}",
40 | "\t\t>",
41 | "\t)",
42 | "}\n",
43 | "export default ${1:Name};"
44 | ],
45 | "description": "React arrow function component with enclosing React.Fragment elements."
46 | },
47 | }
48 |
--------------------------------------------------------------------------------
/vscode/snippets/scss.json:
--------------------------------------------------------------------------------
1 | {
2 | // Place your snippets for scss here. Each snippet is defined under a snippet name and has a prefix, body and
3 | // description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
4 | // $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
5 | // same ids are connected.
6 | // Example:
7 | // "Print to console": {
8 | // "prefix": "log",
9 | // "body": [
10 | // "console.log('$1');",
11 | // "$2"
12 | // ],
13 | // "description": "Log output to console"
14 | // }
15 | "button reset": {
16 | "prefix": [
17 | "buttonreset",
18 | "reset"
19 | ],
20 | "body": [
21 | "${1:button} {",
22 | "display: inline-block;",
23 | "border: none;",
24 | "padding: 1rem 2rem;",
25 | "margin: 0;",
26 | "text-decoration: none;",
27 | "background: {2:#0069ed};",
28 | "color: {3:#ffffff};",
29 | "font-family: inherit;",
30 | "font-size: 1rem;",
31 | "cursor: pointer;",
32 | "text-align: center;",
33 | "transition: background 250ms ease-in-out,",
34 | "transform 150ms ease;",
35 | "-webkit-appearance: none;",
36 | "-moz-appearance: none;",
37 | "}",
38 | "button:hover,",
39 | "button:focus {",
40 | "background: #0053ba;",
41 | "}",
42 | "button:focus {",
43 | "outline: 1px solid #fff;",
44 | "outline-offset: -4px;",
45 | "}",
46 | "button:active {",
47 | "transform: scale(0.99);",
48 | "}"
49 | ],
50 | "description": "Reset default button styles"
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/vscode/snippets-old/scss.json:
--------------------------------------------------------------------------------
1 | {
2 | // Place your snippets for scss here. Each snippet is defined under a snippet name and has a prefix, body and
3 | // description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
4 | // $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
5 | // same ids are connected.
6 | // Example:
7 | // "Print to console": {
8 | // "prefix": "log",
9 | // "body": [
10 | // "console.log('$1');",
11 | // "$2"
12 | // ],
13 | // "description": "Log output to console"
14 | // }
15 | "button reset": {
16 | "prefix": [
17 | "buttonreset",
18 | "reset"
19 | ],
20 | "body": [
21 | "${1:button} {",
22 | "display: inline-block;",
23 | "border: none;",
24 | "padding: 1rem 2rem;",
25 | "margin: 0;",
26 | "text-decoration: none;",
27 | "background: {2:#0069ed};",
28 | "color: {3:#ffffff};",
29 | "font-family: inherit;",
30 | "font-size: 1rem;",
31 | "cursor: pointer;",
32 | "text-align: center;",
33 | "transition: background 250ms ease-in-out,",
34 | "transform 150ms ease;",
35 | "-webkit-appearance: none;",
36 | "-moz-appearance: none;",
37 | "}",
38 | "button:hover,",
39 | "button:focus {",
40 | "background: #0053ba;",
41 | "}",
42 | "button:focus {",
43 | "outline: 1px solid #fff;",
44 | "outline-offset: -4px;",
45 | "}",
46 | "button:active {",
47 | "transform: scale(0.99);",
48 | "}"
49 | ],
50 | "description": "Reset default button styles"
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/scripts/README.md:
--------------------------------------------------------------------------------
1 | # Scripts
2 |
3 | These are some of the scripts I use in development, mostly written in Bash or Python.
4 |
5 | - [Clear Caches](#clear-caches) - Clear user and system caches
6 | - [Bash Header Generator](#bash-header-generator) - Create header information for new bash scripts
7 |
8 | ---
9 |
10 | ## upDoc
11 |
12 |
13 | A CLI updates doctor
14 |
15 |
16 | [**upDoc**](./updoc.sh) is a simple script to update a variety of my configs at the same time. It's still an early version that needs to be slimmed down and better adapted for scaling, but it works by running a series of updates, recording the results (pass/fail) for each process in a temporary file, and displaying final results. Eventually this will be run as a cron/launchd job to fully automate the process.
17 |
18 |
19 |
20 |
21 |
22 | ## Clear Caches
23 |
24 | This is a simple script written in Bash to clear out user and system caches through the CLI. See the script [here](clear_caches.sh).
25 |
26 |
27 |
28 | ## Bash Header Generator
29 |
30 | This is a bash script for writing bash scripts. Upon execution it creates an interactive prompt to generate meta information for a bash script header. [Original source here](https://code.activestate.com/recipes/577862-bash-script-to-create-a-header-for-bash-scripts/). See the script [here](make_header.sh).
31 |
32 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/vscode/snippets/javascript.json:
--------------------------------------------------------------------------------
1 | {
2 | // Place your snippets for javascript here. Each snippet is defined under a snippet name and has a prefix, body and
3 | // description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
4 | // $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
5 | // same ids are connected.
6 | // Example:
7 | // "Print to console": {
8 | // "prefix": "log",
9 | // "body": [
10 | // "console.log('$1');",
11 | // "$2"
12 | // ],
13 | // "description": "Log output to console"
14 | // }
15 | /*
16 | fetch('url').then(
17 | res =>
18 | res.json().then(data => {
19 | // Do something with the data
20 | console.log(data)
21 | })
22 | );
23 | */
24 | "Fetch Template": {
25 | "prefix": [
26 | "fetch",
27 | "fetem"
28 | ],
29 | "body": [
30 | "fetch('${2:url}').then(res =>",
31 | "\tres.json().then(data => {",
32 | "\t\t// Do something with the data",
33 | "\t\t// e.g., setState(data)",
34 | "\t\t${1:console.log(data);}\n\t\t${0}",
35 | "\t})",
36 | ")"
37 | ],
38 | "description": "Basic fetch template."
39 | },
40 | "()=> Fragment Component": {
41 | "prefix": [
42 | "raff"
43 | ],
44 | "body": [
45 | "import React from 'react'\n",
46 | "const ${1:Name} = (${2:props}) => {",
47 | "\treturn (",
48 | "\t\t<${3}>\n\t\t\t${0}",
49 | "\t\t>",
50 | "\t)",
51 | "}\n",
52 | "export default ${1:Name};"
53 | ],
54 | "description": "React arrow function component with enclosing React.Fragment elements."
55 | },
56 | "()=> Implied Return Component": {
57 | "prefix": [
58 | "rafr"
59 | ],
60 | "body": [
61 | "import React from 'react'\n",
62 | "const ${1:ComponentName} = () => (",
63 | "\t<${2}>\n\t\t\t${0}",
64 | "\t>",
65 | ")\n",
66 | "export default ${1:ComponentName};"
67 | ],
68 | "description": "React arrow function component with implied return."
69 | },
70 | }
71 |
--------------------------------------------------------------------------------
/vscode/snippets-old/javascript.json:
--------------------------------------------------------------------------------
1 | {
2 | // Place your snippets for javascript here. Each snippet is defined under a snippet name and has a prefix, body and
3 | // description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
4 | // $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
5 | // same ids are connected.
6 | // Example:
7 | // "Print to console": {
8 | // "prefix": "log",
9 | // "body": [
10 | // "console.log('$1');",
11 | // "$2"
12 | // ],
13 | // "description": "Log output to console"
14 | // }
15 | /*
16 | fetch('url').then(
17 | res =>
18 | res.json().then(data => {
19 | // Do something with the data
20 | console.log(data)
21 | })
22 | );
23 | */
24 | "Fetch Template": {
25 | "prefix": [
26 | "fetch",
27 | "fetem"
28 | ],
29 | "body": [
30 | "fetch('${2:url}').then(res =>",
31 | "\tres.json().then(data => {",
32 | "\t\t// Do something with the data",
33 | "\t\t// e.g., setState(data)",
34 | "\t\t${1:console.log(data);}\n\t\t${0}",
35 | "\t})",
36 | ")"
37 | ],
38 | "description": "Basic fetch template."
39 | },
40 | "()=> Fragment Component": {
41 | "prefix": [
42 | "raff"
43 | ],
44 | "body": [
45 | "import React from 'react'\n",
46 | "const ${1:Name} = (${2:props}) => {",
47 | "\treturn (",
48 | "\t\t<${3}>\n\t\t\t${0}",
49 | "\t\t>",
50 | "\t)",
51 | "}\n",
52 | "export default ${1:Name};"
53 | ],
54 | "description": "React arrow function component with enclosing React.Fragment elements."
55 | },
56 | "()=> Implied Return Component": {
57 | "prefix": [
58 | "rafr"
59 | ],
60 | "body": [
61 | "import React from 'react'\n",
62 | "const ${1:ComponentName} = () => (",
63 | "\t<${2}>\n\t\t\t${0}",
64 | "\t>",
65 | ")\n",
66 | "export default ${1:ComponentName};"
67 | ],
68 | "description": "React arrow function component with implied return."
69 | },
70 | }
71 |
--------------------------------------------------------------------------------
/scripts/dice_roller.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | #title :dice_roller.sh
4 | #description :Dice roller
5 | #author :Timothy Merritt
6 | #date :2024-11-18
7 | #version :0.1
8 | #usage :./dice_roller.sh
9 | #notes :
10 | #bash_version :5.2.37(1)-release
11 | #============================================================================
12 |
13 | # A CLI dice roller
14 | # Usage: ./dice_roller.sh d
15 | # Example: ./dice_roller.sh 2d6
16 | # Also accepts multipliers and modifiers
17 | # Example: ./dice_roller.sh 2d6*2+3
18 |
19 | roll_dice() {
20 | local num_dice=$1
21 | local num_sides=$2
22 | local total=0
23 |
24 | for ((i = 0; i < num_dice; i++)); do
25 | roll=$((RANDOM % num_sides + 1))
26 | total=$((total + roll))
27 | done
28 |
29 | echo "$total"
30 | }
31 |
32 | if [[ $# -ne 1 ]]; then
33 | echo "Usage: $0 d[*][+]"
34 | echo "Example: $0 2d6*2+3"
35 | echo " - The number of dice to roll"
36 | echo " - The number of sides on each die"
37 | echo " - Optional. Multiplies the total roll by this number"
38 | echo " - Optional. Adds this number to the total roll"
39 | exit 1
40 | fi
41 |
42 | input=$1
43 |
44 | num_dice=$(echo "$input" | grep -o '^[0-9]\+' | head -1)
45 | num_sides=$(echo "$input" | grep -o 'd[0-9]\+' | cut -d'd' -f2)
46 | multiplier=$(echo "$input" | grep -oE '\*[0-9]+' | cut -d'*' -f2)
47 | modifier=$(echo "$input" | grep -oE '\+[0-9]+' | cut -d'+' -f2)
48 |
49 | multiplier=${multiplier:-1}
50 | modifier=${modifier:-0}
51 |
52 | # Display individual rolls and calculate total
53 | rolls=()
54 | total=0
55 | for ((i = 0; i < num_dice; i++)); do
56 | roll=$((RANDOM % num_sides + 1))
57 | rolls+=("$roll")
58 | total=$((total + roll))
59 | done
60 |
61 | # Apply multiplier and modifier
62 | total=$((total * multiplier + modifier))
63 |
64 | rolls_str=$(
65 | IFS=" + "
66 | echo "${rolls[*]}"
67 | )
68 |
69 | if [[ $modifier -ne 0 ]]; then
70 | echo "${num_dice}d${num_sides}: $total ($rolls_str) + $modifier"
71 | else
72 | echo "${num_dice}d${num_sides}: $total ($rolls_str)"
73 | fi
74 |
--------------------------------------------------------------------------------
/scripts/make_header.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | #title :mkscript.sh
3 | #description :Make a header for a bash script open in $EDITOR
4 | #author :bgw
5 | #date :20111101
6 | #version :0.4
7 | #usage :bash mkscript.sh
8 | #notes :Install Vim and Emacs to use this script.
9 | #bash_version :4.1.5(1)-release
10 | #==============================================================================
11 | # Original source
12 | # https://code.activestate.com/recipes/577862-bash-script-to-create-a-header-for-bash-scripts/
13 |
14 | today=$(date +%Y-%m-%d)
15 | div="======================================"
16 |
17 | /usr/bin/clear
18 |
19 | _select_title() {
20 |
21 | # Get the user input.
22 | printf "Enter a title: "
23 | read -r title
24 |
25 | # Remove the spaces from the title if necessary.
26 | title=${title// /_}
27 |
28 | # Convert uppercase to lowercase.
29 | # title=${title,,} - Can cause errors on older Bash versions, use translate
30 | # instead
31 | title=$(tr 'A-Z[:lower:]' 'a-z[:lower:]' <<<"$title")
32 |
33 | # Add .sh to the end of the title if it is not there already.
34 | [ "${title: -3}" != '.sh' ] && title=${title}.sh
35 |
36 | # Check to see if the file exists already.
37 | if [ -e "$title" ]; then
38 | printf "\n%s\n%s\n\n" "The script \"$title\" already exists." \
39 | "Please select another title."
40 | _select_title
41 | fi
42 |
43 | }
44 |
45 | _select_title
46 |
47 | printf "Enter a description: "
48 | read -r dscrpt
49 | printf "Enter your name: "
50 | read -r name
51 | printf "Enter the version number: "
52 | read -r vnum
53 |
54 | # Format the output and write it to a file.
55 | printf "%-16s\n\
56 | %-16s%-8s\n\
57 | %-16s%-8s\n\
58 | %-16s%-8s\n\
59 | %-16s%-8s\n\
60 | %-16s%-8s\n\
61 | %-16s%-8s\n\
62 | %-16s%-8s\n\
63 | %-16s%-8s\n\
64 | %s\n\n\n" '#!/usr/bin/env bash' '#title' ":$title" '#description' \
65 | ":${dscrpt}" '#author' ":$name" '#date' ":$today" '#version' \
66 | ":$vnum" '#usage' ":./$title" '#notes' ':' '#bash_version' \
67 | ":${BASH_VERSION}" \#$div${div} >"$title"
68 |
69 | # Make the file executable.
70 | chmod +x "$title"
71 |
72 | # Clear screen
73 | /usr/bin/clear
74 |
75 | # Open with default editor on 12th line
76 | nvim +12 "$title"
77 |
--------------------------------------------------------------------------------
/scripts/add_prefix.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | #title :add_prefix.sh
3 | #description :Adds a prefix to each line of a file
4 | #author :Timothy Merritt
5 | #date :2023-10-21
6 | #version :0.1.0
7 | #usage :./add_prefix.sh
8 | #notes :
9 | #bash_version :5.2.15(1)-release
10 | #============================================================================
11 |
12 | # Help function
13 | help() {
14 | echo "Usage: $0 [-h] [-p prefix] [-n] [-o output] input"
15 | echo " -h: Print this help message"
16 | echo " -p: Prefix to add to each line (default is empty)"
17 | echo " -n: Include sequential numbering as prefix"
18 | echo " -o: Output file (default is stdout)"
19 | echo " input: Input file to add prefix to"
20 | }
21 |
22 | # Initialize variables
23 | prefix=""
24 | numbering=false
25 | output=""
26 | input=""
27 |
28 | # Parse options
29 | while getopts "hp:no:" opt; do
30 | case $opt in
31 | h)
32 | help
33 | exit 0
34 | ;;
35 | p)
36 | prefix="$OPTARG"
37 | ;;
38 | n)
39 | numbering=true
40 | ;;
41 | o)
42 | output="$OPTARG"
43 | ;;
44 | \?)
45 | echo "Invalid option: -$OPTARG"
46 | exit 1
47 | ;;
48 | :)
49 | echo "Option -$OPTARG requires an argument."
50 | exit 1
51 | ;;
52 | esac
53 | done
54 |
55 | # Shift to get the remaining arguments
56 | shift $((OPTIND - 1))
57 |
58 | # Check for input file
59 | if [ -z "$1" ]; then
60 | echo "Input file is required. Use -h for help."
61 | exit 1
62 | fi
63 |
64 | input="$1"
65 |
66 | # Validate input file
67 | if [ ! -f "$input" ]; then
68 | echo "Input file not found!"
69 | exit 1
70 | fi
71 |
72 | # Function to count lines in a file
73 | count_lines() {
74 | wc -l "$1" | awk '{ print $1 }'
75 | }
76 |
77 | # Function to process lines
78 | process_lines() {
79 | lineno=1
80 | total_lines=$(count_lines "$input")
81 | padding_length=$((${#total_lines} + 1))
82 |
83 | while read -r line; do
84 | output_line="$prefix"
85 | [ "$numbering" = true ] && output_line="${output_line}$(printf "%0${padding_length}d " $lineno)"
86 | output_line="${output_line}${line}"
87 | echo "$output_line"
88 | lineno=$((lineno + 1))
89 | done <"$input"
90 | }
91 |
92 | # Handle output
93 | if [ -z "$output" ]; then
94 | process_lines
95 | else
96 | process_lines >"$output"
97 | fi
98 |
--------------------------------------------------------------------------------
/scripts/get_commits.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | #title :get_commits.sh
3 | #description :Get commits for a given date range in a specified repo
4 | #author :Timothy Merritt
5 | #date :2024-04-23
6 | #version :0.1
7 | #usage :./get_commits.sh
8 | #notes :
9 | #bash_version :5.2.26(1)-release
10 | #============================================================================
11 |
12 | # WIP: This script is a work in progress and is not yet fully functional.
13 |
14 | # Default values
15 | start_date=$(date "+%Y-%m-%d")
16 | end_date=$(date "+%Y-%m-%d")
17 | search_dir=~/Work
18 |
19 | # Function to show help
20 | show_help() {
21 | echo "Usage: git-commits.sh [-s start_date] [-e end_date] [-d search_dir]"
22 | echo " -s Start date in YYYY-MM-DD format (default is 2 weeks ago)"
23 | echo " -e End date in YYYY-MM-DD format (default is today)"
24 | echo " -d Directory to search for Git repositories (default is ~/Projects)"
25 | }
26 |
27 | # # Validate date format
28 | # validate_date() {
29 | # if ! date -d "$1" "+%Y-%m-%d" &>/dev/null; then
30 | # echo "Error: Date format is invalid. Please use YYYY-MM-DD."
31 | # exit 1
32 | # fi
33 | # }
34 |
35 | # Parse command-line options
36 | while getopts 'hs:e:d:' flag; do
37 | case "${flag}" in
38 | s)
39 | # validate_date "${OPTARG}"
40 | start_date="${OPTARG}"
41 | ;;
42 | e)
43 | # validate_date "${OPTARG}"
44 | end_date="${OPTARG}"
45 | ;;
46 | d) search_dir="${OPTARG}" ;;
47 | h)
48 | show_help
49 | exit 0
50 | ;;
51 | *)
52 | show_help
53 | exit 1
54 | ;;
55 | esac
56 | done
57 |
58 | # Check if the search directory exists
59 | if [ ! -d "$search_dir" ]; then
60 | echo "Error: The directory '$search_dir' does not exist."
61 | exit 1
62 | fi
63 |
64 | # Find all git repositories and iterate over them
65 | find "$search_dir" -type d -name .git | while read -r gitdir; do
66 | # If dirs are in $serach_dir/Archive, skip them
67 | if [[ $gitdir == *Archive* ]]; then
68 | continue
69 | fi
70 |
71 | # Go to the repository directory
72 | repo_dir=$(dirname "$gitdir")
73 | echo "Repository: $repo_dir"
74 | cd "$repo_dir" || exit
75 |
76 | # Put the resulting commits into a temporary file, then print them from the file
77 |
78 | # Use git log to filter commits by date range
79 | git log --since="$start_date" --until="$end_date" --author="Timothy Merritt" --author="timmybytes" --format="%h - %an, %ad : %s" >commits.txt
80 | cat commits.txt
81 |
82 | # Go back to the original directory
83 | cd - || exit
84 |
85 | done
86 |
--------------------------------------------------------------------------------
/vscode/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | # VS Code Settings
4 |
5 | > As a warning, these settings are the most volatile of my dotfiles, since I change my editor configuration almost daily. Often this is just switching themes, fonts, or turning extension settings on/off, but sometimes there may be unexpected breaking changes.
6 |
7 | ## Core Settings
8 |
9 | These settings mostly cover editor behavior and general aesthetics, arranged (mostly) alphabetically. Many settings are tied either to extensions or other overrides, so it's worth going through these carefully if you're adopting them for yourself.
10 |
11 | ### Fonts & Typography
12 |
13 | I have fonts I prefer listed here and grouped by whether or not they include support for ligatures, with all but the current active font commented out. This makes switching back and forth easier when I get tired of a given font's look. If you plan to use any of the fonts listed in the settings, make sure you either have them downloaded and configured locally and/or have proper licenses for using them.
14 |
15 | ### Intellisense & Autocomplete
16 |
17 | Often I've experienced issues with accepting Intellisense suggestions with the Enter/Tab keys. The settings here, along with a couple custom keybindings, ensure behavior that's predictable, while also being compatible with the [TabOut](https://marketplace.visualstudio.com/items?itemName=albert.TabOut) extension.
18 |
19 | ### Color & Theme
20 |
21 | I mainly switch between two themes: [In Bed By 7pm](https://marketplace.visualstudio.com/items?itemName=sdras.inbedby7pm) and [Everforest](https://marketplace.visualstudio.com/items?itemName=sainnhe.everforest), with the latter having a _ton_ of overrides I've set up to customize a lot of nuances in the editor, explorer, workbench, etc. Finding and customizing elements are often done with the CodeUI extension, then manually added here for a higher degree of control (however, currently these are still WIP with some elements like the Minimap, and may clash more than they blend).
22 |
23 | ### Language Rules
24 |
25 | Mostly self-explanatory; often these are just to specify the default formatter.
26 |
27 | ## Extension Settings
28 |
29 | These are arranged alphabetically by Extension name, and are mostly self-explanatory. There are a few inactive or uninstalled extension settings here I keep for reference, or when I decide to toggle something on and off.
30 |
31 | Note that the current list of extensions I use can also be found in [extensions.txt](extensions.txt), which thanks to a githook with Husky updates each time the repo is changed (see the script in this repo's package.json).
32 |
--------------------------------------------------------------------------------
/git/README.md:
--------------------------------------------------------------------------------
1 | # Git
2 |
3 | This directory contains my preferred settings and helper functionality for git.
4 | Note these are just _my_ settings, and may break or be incompatible with your own
5 | setup.
6 |
7 | ## .gitconfig
8 |
9 | ```sh
10 | [user]
11 | name = Timothy Merritt
12 | email = xxx@xxx.xxx
13 | [color]
14 | ui = auto
15 | [filter "lfs"]
16 | required = true
17 | clean = git-lfs clean -- %f
18 | smudge = git-lfs smudge -- %f
19 | process = git-lfs filter-process
20 | [init]
21 | defaultBranch = main
22 | ```
23 |
24 | ## Git Hooks
25 |
26 | ### Commit Message Conventions
27 |
28 | The [commit conventions document](./commit-conventions.txt) serves as a template for git commit messages. For configuation instructions:
29 |
30 | > 📖 Read my article on [Keeping Git Commit Messages Consistent with a Custom Template](https://dev.to/timmybytes/keeping-git-commit-messages-consistent-with-a-custom-template-1jkm).
31 |
32 | For information on Semantic Versioning conventions, [see the spec](https://semver.org/#semantic-versioning-specification-semver).
33 |
34 | #### Commit messages should adhere to the following conventions:
35 |
36 | ```sh
37 | # Header - mandatory
38 | type(optional scope): Short description
39 | ^..................^: ^...............^
40 | │ * Less than 60 characters
41 | │ * Present tense
42 | │ * Concise
43 | │ * Ex: 'docs: correct spelling of CHANGELOG'
44 | │
45 | └── Contains one of the following:
46 | * feat A new feature - SemVar PATCH
47 | └── MUST coincide with 0.0.x patch version
48 | * fix A bug fix - SemVar MINOR
49 | └── MUST coincide with 0.x.0 minor version
50 | * BREAKING CHANGE Breaking API change - SemVar MAJOR
51 | └── MUST coincide with x.0.0 major version, MUST include
52 | ! before colon e.g., 'BREAKING CHANGE!: message'
53 | * docs Change to documentation only
54 | * style Change to style (whitespace, etc.)
55 | * refactor Change not related to a bug or feat
56 | * perf Change that affects performance
57 | * test Change that adds/modifies tests
58 | * build Change to build system
59 | * ci Change to CI pipeline/workflow
60 | * chore General tooling/config/min refactor
61 |
62 | # Body - optional
63 | Free form structure. Introduces motivation behind changes
64 | and/or more detailed information
65 |
66 | # Footer - optional
67 | word-token: string value
68 | OR
69 | word-token #string value
70 | ^.........^: ^.........^
71 | Consequences of the change(s), such as related issues resolved
72 | by commit, etc. 'word-token' must not contain whitespace.
73 |
74 | ```
75 |
--------------------------------------------------------------------------------
/vscode/snippets/typescriptreact.json:
--------------------------------------------------------------------------------
1 | {
2 | // Place your snippets for typescriptreact here. Each snippet is defined under a snippet name and has a prefix, body and
3 | // description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
4 | // $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
5 | // same ids are connected.
6 | // Example:
7 | // "Print to console": {
8 | // "prefix": "log",
9 | // "body": [
10 | // "console.log('$1');",
11 | // "$2"
12 | // ],
13 | // "description": "Log output to console"
14 | // }
15 | "()=> Fragment Component": {
16 | "prefix": ["raff"],
17 | "body": [
18 | "import React from 'react'\n",
19 | "const ${1:Name} = (${2:props}) => {",
20 | "\treturn (",
21 | "\t\t<${3}>\n\t\t\t${0}",
22 | "\t\t>",
23 | "\t)",
24 | "}\n",
25 | "export default ${1:Name};"
26 | ],
27 | "description": "React arrow function component with enclosing React.Fragment elements."
28 | },
29 | "Twin Functional Component: Styled w/props": {
30 | "prefix": ["tfc"],
31 | "body": [
32 | "import React, { FC } from 'react'\n",
33 | "import tw, { css, styled } from 'twin.macro'\n",
34 | "\n",
35 | "type ${1:Name}Props = {",
36 | "\t// ${2:Types}",
37 | "}",
38 | "",
39 | "const ${1:Name}: FC<${1:Name}Props> = ({",
40 | "\t/**",
41 | "\t*",
42 | "\t*/",
43 | "\tchildren,",
44 | "}) => {",
45 | "\treturn ${3}{children}",
46 | "}",
47 | "",
48 | "type ContainerProps = {",
49 | "\t${4: }",
50 | "}",
51 | "const Container = styled.div<{}>(({}) => [])"
52 | ],
53 | "description": "A functional Typescript component with Twin"
54 | },
55 | "Twin Functional Component: Twin w/o props": {
56 | "prefix": "fc",
57 | "description": "React Functional Component template",
58 | "body": [
59 | "import React, { FC } from 'react';",
60 | "import tw, { css, styled } from 'twin.macro';",
61 | "",
62 | "type $1Props = {",
63 | " //",
64 | "};",
65 | "",
66 | "/**",
67 | " * $2",
68 | " */",
69 | "export const $1: FC<$1Props> = (props) => {",
70 | " return (",
71 | " ",
72 | " Hello!",
73 | " ",
74 | " );",
75 | "};",
76 | "",
77 | "const Container = tw.div`w-full`;"
78 | ]
79 | },
80 | "Twin Macro Basic Component": {
81 | "prefix": "twc",
82 | "description": "Twin Macro Basic Component template",
83 | "body": [
84 | "export const ${1:name} = styled.div(({ customCss }: CustomCssProps) => (",
85 | "[tw`$2`, customCss]));",
86 | ""
87 | ]
88 | }
89 | }
90 |
--------------------------------------------------------------------------------
/scripts/filesearch.js:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env node
2 | //title :filesearch.js
3 | //description :Search a file for a phrase or phrases
4 | //author :Timothy Merritt
5 | //date :2022-12-05
6 | //version :0.1.0
7 | //usage :./filesearch.sh
8 | //notes :
9 | //bash_version :5.2.12(1)-release
10 | //============================================================================
11 |
12 | const fs = require("fs");
13 | const readline = require("readline");
14 |
15 | const rl = readline.createInterface({
16 | input: process.stdin,
17 | output: process.stdout,
18 | });
19 |
20 | function fileSearch() {
21 | const files = fs.readdirSync(".");
22 |
23 | // Print the list of files to the console
24 | console.log("Files in the current directory:");
25 | files.forEach((file) => console.log(file));
26 |
27 | // Prompt the user to choose one of the available files
28 | rl.question("Enter the name of a file to choose: ", (fileName) => {
29 | console.log(`You chose: ${fileName}`);
30 |
31 | // Store the user's choice in a variable
32 | const chosenFile = fileName;
33 |
34 | // Read the file content
35 | const content = fs.readFileSync(chosenFile, "utf-8");
36 |
37 | // Split the file content into an array of lines
38 | const lines = content.split("\n");
39 |
40 | // Prompt the user for the phrase(s) to search for
41 | rl.question(
42 | "Enter the phrase(s) to search for (comma-delimited): ",
43 | (searchPhrases) => {
44 | // Split the search phrases into an array
45 | const searchPhraseList = searchPhrases
46 | .split(",")
47 | .map((phrase) => phrase.trim());
48 |
49 | // Create an object to store the search results
50 | const searchResults = {};
51 |
52 | // Search each line for each search phrase
53 | lines.forEach((line, lineNumber) => {
54 | searchPhraseList.forEach((searchPhrase) => {
55 | // Use a regular expression to search for the search phrase
56 | const regex = new RegExp(searchPhrase, "gi");
57 | const matches = line.match(regex);
58 |
59 | // If there are any matches, add them to the search results object
60 | if (matches) {
61 | searchResults[lineNumber] = {
62 | line: line,
63 | matches: matches,
64 | };
65 | }
66 | });
67 | });
68 |
69 | // Print the search results to the console
70 | console.log("Search results:");
71 | Object.keys(searchResults).forEach((lineNumber) => {
72 | const { line, matches } = searchResults[lineNumber];
73 | console.log(
74 | `Line ${lineNumber}: ${line} (${matches.length} matches)`
75 | );
76 | });
77 | rl.close();
78 | }
79 | );
80 | });
81 | }
82 |
83 | fileSearch();
84 |
--------------------------------------------------------------------------------
/scripts/clear_caches.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | #===============================================================
3 | # CLEAR CACHES
4 | #===============================================================
5 | # Description: A simple script to clear out caches on Mac.
6 | # WARNING - Uses sudo — be sure you're okay with deleting!
7 | # Author: Timothy Merritt, 2020
8 | #===============================================================
9 |
10 | RED='\033[0;31m'
11 | YELLOW='\033[1;33m'
12 | GREEN='\033[0;32m'
13 | NC='\033[0m' # No Color, resets
14 | PENDING="${YELLOW}●${NC}"
15 | FAILED="${RED}𐄂${NC}"
16 | SUCCEEDED="${GREEN}✓${NC}"
17 |
18 | clear
19 |
20 | d_usr() {
21 | sudo rm -rf /Users/$USER/Library/Caches >>/Users/$USER/logs/cache_log.txt 2>&1
22 | usr_status=$?
23 | sleep 1
24 | [ "$usr_status" -eq 0 ] && printf "%b\n" "${SUCCEEDED} User Cache successfully deleted" && sleep 1 || printf "%b\n" "${FAILED} There were errors. Check ~/logs/cache_log for details" && sleep 3
25 | # tree-list 1 level deep with human-readable filesizes
26 | tree -aFL 1 -s -h -C --du /Users/$USER/Library/Caches
27 | echo
28 | }
29 |
30 | d_sys() {
31 | sudo rm -rf /Library/Caches >>/Users/$USER/logs/cache_log.txt 2>&1
32 | sys_status=$?
33 | sleep 1
34 | [ "$sys_status" -eq 0 ] && printf "%b\n" "${SUCCEEDED} System Cache successfully deleted" && sleep 1 || printf "%s\b" "${FAILED} There were errors. Check ~/logs/cache_log for details" && sleep 3
35 | # tree-list 1 level deep with human-readable filesizes
36 | tree -aFL 1 -s -h -C --du /Library/Caches
37 | echo
38 | }
39 |
40 | main() {
41 | printf "%s\n" "// DELETE CACHES"
42 | printf "─%.0s" {1..46}
43 | echo
44 | printf "%s" "" "To list current system caches, enter 'sys'"
45 | printf "%s\n" "" "To list current user caches, enter 'usr'"
46 | printf "%s" "" "To delete both caches immediately, enter 'da'"
47 | printf "%s\n" "" "Press 'Enter' to exit"
48 | printf "%s" "> "
49 | read input
50 | if [ "$input" = "da" ]; then
51 | clear
52 | d_usr
53 | d_sys
54 | main
55 | elif [ "$input" = "sys" ]; then
56 | clear
57 | # tree-list 1 level deep with human-readable filesizes
58 | tree -aFL 1 -s -h -C --du /Library/Caches
59 | printf "%s\n" "Would you like to clear the sys cache? (y/n)"
60 | read sys_cache
61 | if [ "$sys_cache" = "y" ]; then
62 | clear
63 | d_sys
64 | main
65 | else
66 | clear
67 | main
68 | fi
69 | elif [ "$input" = "usr" ]; then
70 | clear
71 | # tree-list 1 level deep with human-readable filesizes
72 | tree -aFL 1 -s -h -C --du /Users/$USER/Library/Caches
73 | printf "%s\n" "Would you like to clear the usr cache? (y/n)"
74 | read usr_cache
75 | if [ "$usr_cache" = "y" ]; then
76 | clear
77 | d_usr
78 | main
79 | else
80 | clear
81 | main
82 | fi
83 | else
84 | clear
85 | exit 0
86 | fi
87 | }
88 | main
89 |
--------------------------------------------------------------------------------
/vscode/extensions.txt:
--------------------------------------------------------------------------------
1 | aaron-bond.better-comments
2 | ahmedabdulrahman.aylin
3 | albert.tabout
4 | alexdauenhauer.nocterial-palenight
5 | amandeepmittal.pug
6 | anseki.vscode-color
7 | antiantisepticeye.vscode-color-picker
8 | assisrmatheus.sidebar-markdown-notes
9 | astro-build.astro-vscode
10 | atomiks.moonlight
11 | bradlc.vscode-tailwindcss
12 | ccy.ayu-adaptive
13 | christian-kohler.npm-intellisense
14 | cssho.vscode-svgviewer
15 | dahong.theme-bear
16 | danielknights.vscode-mjml
17 | davidanson.vscode-markdownlint
18 | dbaeumer.vscode-eslint
19 | dendron.dendron-markdown-shortcuts
20 | dennisvash.summer-time
21 | donjayamanne.githistory
22 | dracula-theme.theme-dracula
23 | dsznajder.es7-react-js-snippets
24 | dunstontc.viml
25 | eamodio.gitlens
26 | ecmel.vscode-html-css
27 | editorconfig.editorconfig
28 | equinusocio.vsc-material-theme
29 | equinusocio.vsc-material-theme-icons
30 | esbenp.prettier-vscode
31 | figma.figma-vscode-extension
32 | firefox-devtools.vscode-firefox-debug
33 | formulahendry.auto-close-tag
34 | formulahendry.auto-complete-tag
35 | formulahendry.auto-rename-tag
36 | foxundermoon.shell-format
37 | github.copilot
38 | github.copilot-chat
39 | github.vscode-github-actions
40 | gruntfuggly.todo-tree
41 | hoovercj.vscode-dimmer
42 | humao.rest-client
43 | ivhernandez.vscode-plist
44 | jayanthsrinivasan.jayanth-s-devil-dark-theme
45 | josee9988.minifyall
46 | kumar-harsh.graphql-for-vscode
47 | lightyen.tailwindcss-intellisense-twin
48 | maptz.regionfolder
49 | mgmcdermott.vscode-language-babel
50 | mhutchie.git-graph
51 | mikestead.dotenv
52 | mrmlnc.vscode-duplicate
53 | mrmlnc.vscode-pugbeautify
54 | ms-azuretools.vscode-docker
55 | ms-python.debugpy
56 | ms-python.python
57 | ms-vscode-remote.remote-containers
58 | ms-vscode.sublime-keybindings
59 | ms-vscode.vscode-js-profile-flame
60 | ms-vsliveshare.vsliveshare
61 | mvllow.rose-pine
62 | naumovs.color-highlight
63 | pawelgrzybek.gatito-theme
64 | pflannery.vscode-versionlens
65 | pkief.material-icon-theme
66 | pnp.polacode
67 | redhat.vscode-yaml
68 | remisa.shellman
69 | ritwickdey.liveserver
70 | robbowen.synthwave-vscode
71 | ryanraposo.codeui
72 | sainnhe.everforest
73 | sdras.inbedby7pm
74 | sdras.night-owl
75 | shailen.netlify
76 | shd101wyy.markdown-preview-enhanced
77 | styled-components.vscode-styled-components
78 | sumitsaha.learn-with-sumit-theme
79 | svelte.svelte-vscode
80 | tamasfe.even-better-toml
81 | taniarascia.new-moon-vscode
82 | teabyii.ayu
83 | timonwong.shellcheck
84 | tombonnike.vscode-status-bar-format-toggle
85 | tyriar.sort-lines
86 | ue.alphabetical-sorter
87 | undefined_publisher.catppuccin-vsc
88 | unifiedjs.vscode-mdx
89 | visualstudioexptteam.intellicode-api-usage-examples
90 | visualstudioexptteam.vscodeintellicode
91 | vscode-icons-team.vscode-icons
92 | wakatime.vscode-wakatime
93 | wayou.vscode-todo-highlight
94 | whizkydee.material-palenight-theme
95 | wicked-labs.wvsc-serendipity
96 | xabikos.javascriptsnippets
97 | yoavbls.pretty-ts-errors
98 | yzhang.markdown-all-in-one
99 | zhuangtongfa.material-theme
100 | zignd.html-css-class-completion
101 |
--------------------------------------------------------------------------------
/scripts/bash_colors.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | function list_colors() {
4 | local colors=(
5 | "# BASH COLORS"
6 | ""
7 | "# Regular Colors"
8 | "| Value | Color |"
9 | "| -------- | ------ |"
10 | "| \e[0;30m | Black |"
11 | "| \e[0;31m | Red |"
12 | "| \e[0;32m | Green |"
13 | "| \e[0;33m | Yellow |"
14 | "| \e[0;34m | Blue |"
15 | "| \e[0;35m | Purple |"
16 | "| \e[0;36m | Cyan |"
17 | "| \e[0;37m | White |"
18 | ""
19 | "# Bold"
20 | ""
21 | "| Value | Color |"
22 | "| -------- | -------- |"
23 | "| \e[1;30m | Black |"
24 | "| \e[1;31m | Red |"
25 | "| \e[1;32m | Green |"
26 | "| \e[1;33m | Yellow |"
27 | "| \e[1;34m | Blue |"
28 | "| \e[1;35m | Purple |"
29 | "| \e[1;36m | Cyan |"
30 | "| \e[1;37m | White |"
31 | "| \e[1m | No Color |"
32 | ""
33 | "# Underline"
34 | ""
35 | "| Value | Color |"
36 | "| -------- | -------- |"
37 | "| \e[4;30m | Black |"
38 | "| \e[4;31m | Red |"
39 | "| \e[4;32m | Green |"
40 | "| \e[4;33m | Yellow |"
41 | "| \e[4;34m | Blue |"
42 | "| \e[4;35m | Purple |"
43 | "| \e[4;36m | Cyan |"
44 | "| \e[4;37m | White |"
45 | "| \e[4m | No Color |"
46 | ""
47 | "# Background"
48 | ""
49 | "| Value | Color |"
50 | "| ------ | ------ |"
51 | "| \e[40m | Black |"
52 | "| \e[41m | Red |"
53 | "| \e[42m | Green |"
54 | "| \e[43m | Yellow |"
55 | "| \e[44m | Blue |"
56 | "| \e[45m | Purple |"
57 | "| \e[46m | Cyan |"
58 | "| \e[47m | White |"
59 | ""
60 | "# Expand Background Horizontally"
61 | ""
62 | "| Value | Color |"
63 | "| ----- | -------- |"
64 | "| \e[K | No Color |"
65 | ""
66 | "# High Intensty"
67 | ""
68 | "| Value | Color |"
69 | "| -------- | ------ |"
70 | "| \e[0;90m | Black |"
71 | "| \e[0;91m | Red |"
72 | "| \e[0;92m | Green |"
73 | "| \e[0;93m | Yellow |"
74 | "| \e[0;94m | Blue |"
75 | "| \e[0;95m | Purple |"
76 | "| \e[0;96m | Cyan |"
77 | "| \e[0;97m | White |"
78 | ""
79 | "# Bold High Intensty"
80 | ""
81 | "| Value | Color |"
82 | "| -------- | ------ |"
83 | "| \e[1;90m | Black |"
84 | "| \e[1;91m | Red |"
85 | "| \e[1;92m | Green |"
86 | "| \e[1;93m | Yellow |"
87 | "| \e[1;94m | Blue |"
88 | "| \e[1;95m | Purple |"
89 | "| \e[1;96m | Cyan |"
90 | "| \e[1;97m | White |"
91 | ""
92 | "# High Intensty backgrounds"
93 | ""
94 | "| Value | Color |"
95 | "| --------- | ------ |"
96 | "| \e[0;100m | Black |"
97 | "| \e[0;101m | Red |"
98 | "| \e[0;102m | Green |"
99 | "| \e[0;103m | Yellow |"
100 | "| \e[0;104m | Blue |"
101 | "| \e[0;105m | Purple |"
102 | "| \e[0;106m | Cyan |"
103 | "| \e[0;107m | White |"
104 | ""
105 | "# Reset"
106 | ""
107 | "| Value | Color |"
108 | "| ----- | ------ |"
109 | "| \e[0m | Reset |"
110 | ""
111 | )
112 |
113 | printf "%s\n" "${colors[@]}"
114 | }
115 |
116 | list_colors
117 |
--------------------------------------------------------------------------------
/scripts/bye-lines.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | #==============================================================================
3 | # title : bye-lines.sh
4 | # description : This script provides various text processing options.
5 | # author : Timothy Merritt
6 | # date : 2024-11-02
7 | # version : 0.2
8 | # usage : bash bye-lines.sh [file]
9 | # bash_version : 5.2
10 | #==============================================================================
11 |
12 | LOGO="
13 | _ _ _
14 | | |__ _ _ ___ | (_)_ __ ___ ___
15 | | '_ \| | | |/ _ \ | | | '_ \ / _ \/ __|
16 | | |_) | |_| | __/ | | | | | | __/\__ \\
17 | |_.__/ \__, |\___| |_|_|_| |_|\___||___/
18 | |___/
19 | v.2
20 |
21 | Let's clean this up, shall we?
22 | "
23 |
24 | #==============================================================================
25 | # Core Functionality
26 | #==============================================================================
27 |
28 | # Display help message
29 | help_message() {
30 | echo "$LOGO"
31 | echo "Usage: bye-lines.sh [file]"
32 | echo "Provides various text processing options for a given file."
33 | echo
34 | echo "Options:"
35 | echo " -h, --help Display this help message."
36 | echo
37 | echo "Examples:"
38 | echo " bye-lines.sh file.txt"
39 | }
40 |
41 | # Check for a valid file input
42 | if [[ -z "$1" ]] || [[ "$1" == "-h" || "$1" == "--help" ]]; then
43 | help_message
44 | exit 0
45 | elif [[ ! -f "$1" ]]; then
46 | echo "Error: File '$1' does not exist."
47 | exit 1
48 | fi
49 |
50 | # Create a temporary file to store results
51 | temp_file=$(mktemp)
52 |
53 | #==============================================================================
54 | # Text Processing Functions
55 | #==============================================================================
56 |
57 | # Add empty lines to a file
58 | add_empty_lines() {
59 | sed 'G' "$1" >"$temp_file"
60 | }
61 |
62 | # Remove empty lines from a file
63 | remove_empty_lines() {
64 | sed '/^[[:space:]]*$/d' "$1" >"$temp_file"
65 | }
66 |
67 | # Remove leading whitespace from each line
68 | remove_leading_whitespace() {
69 | sed 's/^[[:space:]]*//' "$1" >"$temp_file"
70 | }
71 |
72 | # Remove trailing whitespace from each line
73 | remove_trailing_whitespace() {
74 | sed 's/[[:space:]]*$//' "$1" >"$temp_file"
75 | }
76 |
77 | # Convert tabs to spaces
78 | convert_tabs_to_spaces() {
79 | sed 's/\t/ /g' "$1" >"$temp_file"
80 | }
81 |
82 | # Convert spaces to tabs
83 | convert_spaces_to_tabs() {
84 | sed 's/ /\t/g' "$1" >"$temp_file"
85 | }
86 |
87 | #==============================================================================
88 | # User Interaction
89 | #==============================================================================
90 |
91 | # Display the logo and prompt for options
92 | echo "$LOGO"
93 | echo "File: $1"
94 | echo "Choose an option:"
95 | options=("Remove empty lines" "Add empty lines" "Remove leading whitespace"
96 | "Remove trailing whitespace" "Convert tabs to spaces" "Convert spaces to tabs" "Exit")
97 |
98 | select _ in "${options[@]}"; do
99 | case $REPLY in
100 | 1) remove_empty_lines "$1" ;;
101 | 2) add_empty_lines "$1" ;;
102 | 3) remove_leading_whitespace "$1" ;;
103 | 4) remove_trailing_whitespace "$1" ;;
104 | 5) convert_tabs_to_spaces "$1" ;;
105 | 6) convert_spaces_to_tabs "$1" ;;
106 | 7)
107 | echo "Exiting. No changes made."
108 | exit 0
109 | ;;
110 | *)
111 | echo "Invalid option. Please try again."
112 | continue
113 | ;;
114 | esac
115 | break
116 | done
117 |
118 | # Show the changes before confirmation
119 | echo "Changes preview:"
120 | diff -u "$1" "$temp_file" || echo "No changes detected."
121 |
122 | # Confirm overwrite
123 | read -p "Would you like to overwrite the original file with these changes? (y/n): " answer
124 | if [[ "$answer" =~ ^[Yy]$ ]]; then
125 | mv "$temp_file" "$1"
126 | echo "Changes applied to '$1'"
127 | else
128 | echo "No changes were applied to '$1'"
129 | rm "$temp_file"
130 | fi
131 |
--------------------------------------------------------------------------------
/nvim/init.vim:
--------------------------------------------------------------------------------
1 | " ///////////////////////////////////////////////////////////
2 | "
3 | " ███╗ ██╗███████╗ ██████╗ ██╗ ██╗██╗███╗ ███╗
4 | " ████╗ ██║██╔════╝██╔═══██╗██║ ██║██║████╗ ████║
5 | " ██╔██╗ ██║█████╗ ██║ ██║██║ ██║██║██╔████╔██║
6 | " ██║╚██╗██║██╔══╝ ██║ ██║╚██╗ ██╔╝██║██║╚██╔╝██║
7 | " ██║ ╚████║███████╗╚██████╔╝ ╚████╔╝ ██║██║ ╚═╝ ██║
8 | " ╚═╝ ╚═══╝╚══════╝ ╚═════╝ ╚═══╝ ╚═╝╚═╝ ╚═╝
9 | " ~/.config/nvim/init.vim
10 | " https://github.com/timmybytes
11 | " //////////////////////////////////////////////////////////
12 |
13 | " ---------------------------------------------------------
14 | " VimPlug - Plugin Manager
15 | " ---------------------------------------------------------
16 |
17 | call plug#begin()
18 |
19 | " Themes
20 | " ---------------------------------------------------------
21 | " Theme inspired by - https://github.com/Who23/dots
22 | Plug 'drewtempelmeyer/palenight.vim'
23 | " Usage: colorscheme palenight
24 | Plug 'sainnhe/vim-color-forest-night' " e.g., 'forest-night'
25 | " Usage: colorscheme forest-night
26 | Plug 'franbach/miramare'
27 | " Usage: colorscheme miramare - DEFAULT
28 | Plug 'catppuccin/nvim', { 'branch': 'main', 'as': 'catppuccin' }
29 |
30 | " Enhancements
31 | " ---------------------------------------------------------
32 | Plug 'chrisbra/Colorizer'
33 | " Usage: ':h Colorizer'
34 | Plug 'junegunn/goyo.vim'
35 | " Usage: ':Goyo'
36 |
37 | Plug 'junegunn/limelight.vim'
38 | " Usage: ':Limelight' (works best with Goyo enabled)
39 |
40 | Plug 'ryanoasis/vim-devicons'
41 | " Usage: Enabled by default with compatible nerd fonts
42 |
43 | Plug 'Yggdroot/indentLine'
44 | " Usage: 'let g:indentLine_setColors = 0'
45 | " Usage: 'let g:indentLine_char = '│''
46 |
47 | Plug 'preservim/nerdtree'
48 | " Usage: ':NERDTree'
49 |
50 | Plug 'airblade/vim-gitgutter'
51 |
52 | Plug 'justinmk/vim-sneak'
53 | " Usage: ':s{char}{char}' Search for next instances of chars
54 | " Usage: ':``' Go back to start
55 |
56 | " Comfort
57 | " ---------------------------------------------------------
58 | " Plug 'tpope/vim-sleuth'
59 | " Usage:
60 | Plug 'tpope/vim-commentary'
61 | " Usage: ':gcc' - Comment/Uncomment line
62 |
63 | " Languages
64 | " ---------------------------------------------------------
65 | Plug 'sheerun/vim-polyglot'
66 | Plug 'tmhedberg/SimpylFold'
67 | Plug 'masukomi/vim-markdown-folding'
68 |
69 | call plug#end()
70 |
71 |
72 | " ---------------------------------------------------------
73 | " General
74 | " ---------------------------------------------------------
75 |
76 | set nocompatible
77 | syntax on
78 | syntax enable
79 | set termguicolors
80 |
81 | let g:miramare_enable_italic = 1
82 | colorscheme catppuccin
83 | set nowrap
84 | set noshowmode
85 | set autoindent
86 | set nonumber
87 | set mouse=a
88 | set number
89 | set numberwidth=6
90 |
91 | " Highlight search results
92 | set hlsearch
93 | " Press F4 to toggle highlighting on/off, and show current value.
94 | :noremap :set hlsearch! hlsearch?
95 | " Seach is case-insensitive
96 | set ignorecase
97 | augroup myautocommands
98 | " au commands - keep these grouped for performance
99 | autocmd FileType markdown set spell spelllang=en_us
100 | autocmd FileType markdown set foldexpr=NestedMarkdownFolds()
101 | " Go to last cursor position in file on reopening
102 | augroup end
103 |
104 | if has("autocmd")
105 | au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
106 | endif
107 |
108 |
109 | " Coding
110 | " ---------------------------------------------------------
111 | " Two spaces for tabs everywhere
112 | set expandtab shiftwidth=2 tabstop=2
113 | set foldenable
114 | set foldmethod=syntax
115 | set foldlevel=99
116 |
117 | let NERDTreeShowHidden=1
118 |
119 | let g:indentLine_setColors = 0
120 | let g:indentLine_char = '│'
121 |
122 | " Auto reload changed files
123 | set autoread
124 |
125 | set scrolloff=5
126 | " Leave 5 lines of buffer when scrolling
127 | set sidescrolloff=10
128 | " Leave 10 characters of horizontal buffer when scrolling
129 |
130 | " Writing/Prose
131 | " ---------------------------------------------------------
132 | set spellfile=~/.dotfiles/nvim/spell/en.utf-8.add
133 | " inoremap u[s1z=`]au
134 | setlocal textwidth=80
135 | setlocal wrapmargin=0
136 |
137 | " TODO: Broken
138 | " Statusline
139 | " ---------------------------------------------------------
140 | " source ~/.config/nvim/statusline.vim
141 |
--------------------------------------------------------------------------------
/nvim/statusline.vim:
--------------------------------------------------------------------------------
1 | " Based on https://github.com/Who23/dots/blob/master/config/nvim/statusline.vim
2 |
3 | let s:colors = {}
4 |
5 | " colors based on my current themes
6 | :if g:colors_name == "miramare"
7 | : let s:colors.black = "#2a2426"
8 | : let s:colors.lightblack = "#40373a"
9 | : let s:colors.white = "#d8caac"
10 | : let s:colors.red = "#e68183"
11 | : let s:colors.golden = "#d8caac"
12 | : let s:colors.green = "#a7c080"
13 | : let s:colors.cyan = "#89beba"
14 | : let s:colors.purple = "#e1acff"
15 | :
16 | :elseif g:colors_name == "clean"
17 | : let s:colors.black = "#1f1f1f"
18 | : let s:colors.lightblack = "#4f4f4f"
19 | : let s:colors.white = "#e6ddc8"
20 | : let s:colors.red = "#d5aee8"
21 | : let s:colors.golden = "#d5aee8"
22 | : let s:colors.green = "#d5aee8"
23 | : let s:colors.cyan = "#d5aee8"
24 | : let s:colors.purple = "#d5aee8"
25 | :
26 | :elseif g:colors_name == "palenight"
27 | : let s:colors.black = "#292d3e"
28 | : let s:colors.lightblack = "#434758"
29 | : let s:colors.white = "#d0d0d0"
30 | : let s:colors.red = "#f07178"
31 | : let s:colors.golden = "#ffcb6b"
32 | : let s:colors.green = "#c3e88d"
33 | : let s:colors.cyan = "#89ddff"
34 | : let s:colors.purple = "#c792ea"
35 | :
36 | :elseif g:colors_name == "catppuccin"
37 | : let s:colors.black = "#1e1e28"
38 | : let s:colors.lightblack = "#6E6C7E"
39 | : let s:colors.white = "#DFDEF1"
40 | : let s:colors.red = "#E38C8F"
41 | : let s:colors.golden = "#ECDDAA"
42 | : let s:colors.green = "#B1E1A6"
43 | : let s:colors.cyan = "#92D2E8"
44 | : let s:colors.purple = "#C6AAE8"
45 | :
46 | :endif
47 |
48 | " small highlighting function
49 | function! s:hi(group, fg, bg)
50 | exec "hi " . a:group . " guifg=" . a:fg . " guibg=" . a:bg
51 | endfunction
52 |
53 | call s:hi("clean", s:colors.black, s:colors.black)
54 |
55 | " set colors for statusline based on mode
56 | function! ModeColors(mode) " {{{
57 | " Normal mode
58 | if a:mode == 'n'
59 | call s:hi("fgc", s:colors.black, s:colors.golden)
60 | " Insert mode
61 | elseif a:mode == 'i'
62 | call s:hi("fgc", s:colors.black, s:colors.green)
63 | " Replace mode
64 | elseif a:mode == 'R'
65 | call s:hi("fgc", s:colors.black, s:colors.green)
66 | " Visual mode
67 | elseif a:mode == 'v' || a:mode == 'V' || a:mode == ""
68 | call s:hi("fgc", s:colors.black, s:colors.red)
69 | " Command mode
70 | elseif a:mode == 'c'
71 | call s:hi("fgc", s:colors.black, s:colors.cyan)
72 | " Terminal mode
73 | elseif a:mode == 't'
74 | call s:hi("fgc", s:colors.black, s:colors.purple)
75 | endif
76 |
77 | call s:hi("fgc_b", s:colors.white, s:colors.black)
78 |
79 | " If we are above a 90 char line, signal on the statusline
80 | if virtcol('.') > 90
81 | call s:hi("line_length", s:colors.black, s:colors.red)
82 | else
83 | call s:hi("line_length", s:colors.black, s:colors.golden)
84 | endif
85 |
86 | " Return empty string so as not to display anything in the statusline
87 | return ''
88 | endfunction
89 |
90 | " Return a nice mode name
91 | function! ModeName(mode)
92 | if a:mode == 'n'
93 | return 'NORMAL'
94 | " Insert mode
95 | elseif a:mode == 'i'
96 | return 'INSERT'
97 | " Replace mode
98 | elseif a:mode == 'R'
99 | return 'REPLACE'
100 | " Visual mode
101 | elseif a:mode == 'v'
102 | return 'VISUAL'
103 | elseif a:mode == 'V'
104 | return "V-LINE"
105 | elseif a:mode == ""
106 | return "V-BLOCK"
107 | " Command mode
108 | elseif a:mode == 'c'
109 | return 'COMMAND'
110 | " Terminal mode
111 | elseif a:mode == 't'
112 | return 'TERMINAL'
113 | endif
114 | endfunction
115 |
116 | call s:hi("modified_fgc", s:colors.black, s:colors.black)
117 | function! Modified(modified)
118 | if a:modified == 1
119 | call s:hi("modified_fgc", s:colors.red, s:colors.black)
120 | else
121 | call s:hi("modified_fgc", s:colors.black, s:colors.black)
122 | endif
123 | return '●'
124 | endfunction
125 |
126 | function! BufNum()
127 | return len(filter(range(1, bufnr('$')), 'buflisted(v:val)'))
128 | endfunction
129 |
130 | set noshowmode
131 | set laststatus=2
132 | set statusline=
133 |
134 | " Update colors when ya do
135 | set statusline+=%{ModeColors(mode())}
136 |
137 | " Mode
138 | set statusline+=%#fgc#%{'\ '}%{ModeName(mode())}%{'\ '}
139 |
140 | " Filename
141 | set statusline+=%#fgc_b#%{'\ '}%t%{'\ '}
142 |
143 | " Right Side
144 | set statusline+=%#clean#%=
145 |
146 | " Modified
147 | set statusline+=%#modified_fgc#%{'\ '}%{Modified(&modified)}%{'\ '}
148 |
149 | " Number of buffers/are we over 90 char line?
150 | set statusline+=%#line_length#%{'\ '}%{BufNum()}%{'\ '}
151 |
--------------------------------------------------------------------------------
/rectangle/RectangleConfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "defaults" : {
3 | "almostMaximizeWidth" : {
4 | "float" : 0
5 | },
6 | "curtainChangeSize" : {
7 | "int" : 0
8 | },
9 | "allowAnyShortcut" : {
10 | "bool" : true
11 | },
12 | "centerHalfCycles" : {
13 | "int" : 0
14 | },
15 | "ignoredSnapAreas" : {
16 | "int" : 0
17 | },
18 | "screenEdgeGapBottom" : {
19 | "float" : 0
20 | },
21 | "todoMode" : {
22 | "bool" : false
23 | },
24 | "screenEdgeGapTop" : {
25 | "float" : 0
26 | },
27 | "SUEnableAutomaticChecks" : {
28 | "bool" : true
29 | },
30 | "todoSidebarWidth" : {
31 | "float" : 400
32 | },
33 | "gapSize" : {
34 | "float" : 0
35 | },
36 | "specifiedHeight" : {
37 | "float" : 1050
38 | },
39 | "todoApplication" : {
40 |
41 | },
42 | "fullIgnoreBundleIds" : {
43 |
44 | },
45 | "disabledApps" : {
46 |
47 | },
48 | "centeredDirectionalMove" : {
49 | "int" : 0
50 | },
51 | "unsnapRestore" : {
52 | "int" : 0
53 | },
54 | "snapEdgeMarginTop" : {
55 | "float" : 5
56 | },
57 | "snapModifiers" : {
58 | "int" : 0
59 | },
60 | "moveCursorAcrossDisplays" : {
61 | "int" : 1
62 | },
63 | "altThirdCycle" : {
64 | "int" : 0
65 | },
66 | "launchOnLogin" : {
67 | "bool" : true
68 | },
69 | "hideMenubarIcon" : {
70 | "bool" : false
71 | },
72 | "traverseSingleScreen" : {
73 | "int" : 0
74 | },
75 | "snapEdgeMarginBottom" : {
76 | "float" : 5
77 | },
78 | "footprintFade" : {
79 | "int" : 0
80 | },
81 | "minimumWindowHeight" : {
82 | "float" : 0
83 | },
84 | "specifiedWidth" : {
85 | "float" : 1680
86 | },
87 | "screenEdgeGapRight" : {
88 | "float" : 0
89 | },
90 | "notifiedOfProblemApps" : {
91 | "bool" : false
92 | },
93 | "screenEdgeGapLeft" : {
94 | "float" : 0
95 | },
96 | "alternateDefaultShortcuts" : {
97 | "bool" : false
98 | },
99 | "subsequentExecutionMode" : {
100 | "int" : 0
101 | },
102 | "showAllActionsInMenu" : {
103 | "int" : 0
104 | },
105 | "footprintBorderWidth" : {
106 | "float" : 2
107 | },
108 | "relaunchOpensMenu" : {
109 | "bool" : false
110 | },
111 | "windowSnapping" : {
112 | "int" : 2
113 | },
114 | "snapEdgeMarginLeft" : {
115 | "float" : 5
116 | },
117 | "todo" : {
118 | "int" : 0
119 | },
120 | "obtainWindowOnClick" : {
121 | "int" : 0
122 | },
123 | "snapEdgeMarginRight" : {
124 | "float" : 5
125 | },
126 | "footprintColor" : {
127 |
128 | },
129 | "minimumWindowWidth" : {
130 | "float" : 0
131 | },
132 | "attemptMatchOnNextPrevDisplay" : {
133 | "int" : 0
134 | },
135 | "footprintAlpha" : {
136 | "float" : 0.30000001192092896
137 | },
138 | "almostMaximizeHeight" : {
139 | "float" : 0
140 | },
141 | "resizeOnDirectionalMove" : {
142 | "bool" : false
143 | },
144 | "sizeOffset" : {
145 | "float" : 0
146 | }
147 | },
148 | "shortcuts" : {
149 | "leftHalf" : {
150 | "keyCode" : 123,
151 | "modifierFlags" : 1572864
152 | },
153 | "bottomRight" : {
154 | "keyCode" : 124,
155 | "modifierFlags" : 786432
156 | },
157 | "nextDisplay" : {
158 | "keyCode" : 124,
159 | "modifierFlags" : 1179648
160 | },
161 | "maximize" : {
162 | "keyCode" : 3,
163 | "modifierFlags" : 1572864
164 | },
165 | "previousDisplay" : {
166 | "keyCode" : 123,
167 | "modifierFlags" : 1179648
168 | },
169 | "restore" : {
170 | "keyCode" : 51,
171 | "modifierFlags" : 786432
172 | },
173 | "topRight" : {
174 | "keyCode" : 124,
175 | "modifierFlags" : 1310720
176 | },
177 | "bottomHalf" : {
178 | "keyCode" : 125,
179 | "modifierFlags" : 1572864
180 | },
181 | "rightHalf" : {
182 | "keyCode" : 124,
183 | "modifierFlags" : 1572864
184 | },
185 | "topLeft" : {
186 | "keyCode" : 123,
187 | "modifierFlags" : 1310720
188 | },
189 | "bottomLeft" : {
190 | "keyCode" : 123,
191 | "modifierFlags" : 786432
192 | },
193 | "center" : {
194 | "keyCode" : 8,
195 | "modifierFlags" : 1572864
196 | },
197 | "topHalf" : {
198 | "keyCode" : 126,
199 | "modifierFlags" : 1572864
200 | }
201 | },
202 | "bundleId" : "com.knollsoft.Rectangle",
203 | "version" : "53"
204 | }
--------------------------------------------------------------------------------
/scripts/auto_git.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | #title :auto_git.sh
3 | #description :Automated git repo commits and pushes
4 | #author :Timothy Merritt
5 | #date :2024-11-22
6 | #version :0.1
7 | #usage :./auto_git.sh
8 | #notes :
9 | #bash_version :5.1.8(1)-release
10 | #============================================================================
11 |
12 | # Enable strict mode
13 | set -euo pipefail
14 | IFS=$'\n\t'
15 |
16 | # Set the path to the git repo
17 | GIT_REPO_PATH="/path/to/your/repo"
18 |
19 | # Set the branch name
20 | BRANCH_NAME="main"
21 |
22 | # Set the path to the log files
23 | LOG_DIR="/path/to/your/logs"
24 | LOG_FILE="$LOG_DIR/auto_git.log"
25 | ERROR_LOG_FILE="$LOG_DIR/auto_git_error.log"
26 |
27 | # Set environment variables for launchd
28 | export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
29 |
30 | # Ensure the log directory exists
31 | mkdir -p "$LOG_DIR"
32 |
33 | # Function to log messages
34 | log_message() {
35 | echo "$(date "+%Y-%m-%d %H:%M:%S") - INFO: $1" | tee -a "$LOG_FILE"
36 | }
37 |
38 | # Function to log errors
39 | log_error() {
40 | echo "$(date "+%Y-%m-%d %H:%M:%S") - ERROR: $1" | tee -a "$ERROR_LOG_FILE" >&2
41 | }
42 |
43 | # Function to send error notifications (optional)
44 | send_error_notification() {
45 | # Implement your notification method here (e.g., email or system notification)
46 | # Example using osascript for macOS notifications:
47 | osascript -e 'display notification "'"$1"'" with title "Auto Git Script Error"'
48 | }
49 |
50 | # Function to check network connectivity
51 | check_network() {
52 | if ! ping -c 1 -W 5 github.com &>/dev/null; then
53 | log_error "Network is unreachable. Cannot connect to GitHub."
54 | send_error_notification "Network is unreachable. Cannot connect to GitHub."
55 | exit 1
56 | fi
57 | }
58 |
59 | # Function to prevent overlapping runs
60 | create_lock() {
61 | LOCKFILE="/tmp/auto_git.lock"
62 | exec 200>"$LOCKFILE"
63 | flock -n 200 || {
64 | log_message "Script is already running."
65 | exit 1
66 | }
67 | # Remove lock file on exit
68 | trap 'rm -f "$LOCKFILE"' EXIT
69 | }
70 |
71 | # Function to perform git operations with error handling
72 | check_commit_pull_push() {
73 | if cd "$GIT_REPO_PATH"; then
74 | log_message "Switched to repository at $GIT_REPO_PATH"
75 |
76 | # Check for unstaged changes
77 | if [[ -n "$(git status --porcelain)" ]]; then
78 | git add -A
79 | git commit -m "Auto commit at $(date "+%Y-%m-%d %H:%M:%S")" || log_message "No changes to commit"
80 | else
81 | log_message "No changes to commit"
82 | fi
83 |
84 | # Check network before pulling/pushing
85 | check_network
86 |
87 | # Pull latest changes
88 | if git pull origin "$BRANCH_NAME" --rebase; then
89 | log_message "Pulled latest changes successfully"
90 | else
91 | log_error "Failed to pull changes from remote"
92 | send_error_notification "Failed to pull changes from remote"
93 | exit 1
94 | fi
95 |
96 | # Push committed changes
97 | if git push origin "$BRANCH_NAME"; then
98 | log_message "Pushed changes to remote successfully"
99 | else
100 | log_error "Failed to push changes to remote"
101 | send_error_notification "Failed to push changes to remote"
102 | exit 1
103 | fi
104 | else
105 | log_error "Failed to access repository at $GIT_REPO_PATH"
106 | send_error_notification "Failed to access repository at $GIT_REPO_PATH"
107 | exit 1
108 | fi
109 | }
110 |
111 | # Main function
112 | main() {
113 | create_lock
114 | log_message "Starting auto git check"
115 | if check_commit_pull_push; then
116 | log_message "Auto git operations completed successfully"
117 | else
118 | log_error "Auto git operations encountered errors"
119 | fi
120 | }
121 |
122 | # Run the script
123 | main
124 |
125 | # PList file for launchd
126 | # #
127 | #
128 | #
129 | #
130 | # Label
131 | # com.user.auto_git
132 | # ProgramArguments
133 | #
134 | # /bin/bash
135 | # /usr/local/bin/auto_git.sh
136 | #
137 | # StartInterval
138 | # 3600
139 | # StandardOutPath
140 | # /path/to/your/logs/auto_git_launchd.log
141 | # StandardErrorPath
142 | # /path/to/your/logs/auto_git_launchd_error.log
143 | # EnvironmentVariables
144 | #
145 | # PATH
146 | # /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
147 | #
148 | #
149 | #
150 |
--------------------------------------------------------------------------------
/Thunderbird/userChrome.css:
--------------------------------------------------------------------------------
1 | /* WIP */
2 |
3 | :root {
4 | /* Initial Variables */
5 | --button-bgcolor: rgb(43, 42, 51);
6 | --button-hover-bgcolor: rgb(82, 82, 94);
7 | --button-active-bgcolor: rgb(91, 91, 102);
8 | --button-primary-bgcolor: rgb(0, 221, 255);
9 | --button-primary-hover-bgcolor: rgb(128, 235, 255);
10 | --button-primary-active-bgcolor: rgb(170, 242, 255);
11 | --button-primary-color: rgb(43, 42, 51);
12 | --input-bgcolor: rgb(66, 65, 77);
13 | --input-color: rgb(251, 251, 254);
14 | --input-border-color: rgb(143, 143, 157);
15 | --autocomplete-popup-separator-color: rgb(82, 82, 94);
16 | --panel-banner-item-update-supported-bgcolor: rgb(84, 255, 189);
17 | --panel-banner-item-info-icon-bgcolor: rgb(128, 235, 255);
18 | --tab-icon-overlay-stroke: rgb(66, 65, 77);
19 | --tab-icon-overlay-fill: rgb(251, 251, 254);
20 | --panel-item-hover-bgcolor: color-mix(in srgb, currentColor 9%, transparent);
21 | --arrowpanel-dimmed-further: color-mix(in srgb, currentColor 14%, transparent);
22 | --panel-item-active-bgcolor: color-mix(in srgb, currentColor 25%, transparent);
23 | --urlbar-icon-fill-opacity: 1;
24 | --panel-separator-zap-gradient: linear-gradient(90deg, #9059FF 0%, #FF4AA2 52.08%, #FFBD4F 100%);
25 | --lwt-accent-color: rgb(28, 27, 34);
26 | --lwt-text-color: rgba(251, 251, 254);
27 | --arrowpanel-background: rgb(66, 65, 77);
28 | --arrowpanel-color: rgb(251, 251, 254);
29 | --arrowpanel-border-color: rgb(82, 82, 94);
30 | --toolbar-field-background-color: rgb(28, 27, 34);
31 | --toolbar-field-color: rgb(251, 251, 254);
32 | --toolbar-field-border-color: rgba(0, 0, 0, 0);
33 | --toolbar-field-focus-background-color: rgba(66, 65, 77, 1);
34 | --toolbar-field-focus-color: rgb(251, 251, 254);
35 | --lwt-tab-text: rgb(251, 251, 254);
36 | --lwt-tab-line-color: rgba(0, 0, 0, 0);
37 | --toolbar-bgcolor: rgb(43, 42, 51);
38 | --toolbar-color: rgb(251, 251, 254);
39 | --lwt-tabs-border-color: rgba(0, 0, 0, 0);
40 | --chrome-content-separator-color: rgb(12, 12, 13);
41 | --toolbarbutton-icon-fill: rgb(251, 251, 254);
42 | --lwt-selected-tab-background-color: rgb(66, 65, 77);
43 | --autocomplete-popup-highlight-background: rgb(43, 42, 51);
44 | --sidebar-background-color: rgb(56, 56, 61);
45 | --sidebar-text-color: rgb(249, 249, 250);
46 | --sidebar-border-color: rgba(255, 255, 255, 0.10000000149011612);
47 | font-size: 12px;
48 | --calendar-761844bf-ux2d-c309-ux2d-4a4f-ux2d-9bea-ux2d-99b3c932bad1-backcolor: #ff2968;
49 | --calendar-761844bf-ux2d-c309-ux2d-4a4f-ux2d-9bea-ux2d-99b3c932bad1-forecolor: white;
50 | --calendar-fa49e3ee-ux2d-4e9e-ux2d-44ae-ux2d-bb23-ux2d-5f23400f4ab4-backcolor: #9a9cff;
51 | --calendar-fa49e3ee-ux2d-4e9e-ux2d-44ae-ux2d-bb23-ux2d-5f23400f4ab4-forecolor: #222;
52 | --calendar-851b9abe-ux2d-31a3-ux2d-4590-ux2d-a502-ux2d-c6076f641326-backcolor: #a8c2e1;
53 | --calendar-851b9abe-ux2d-31a3-ux2d-4590-ux2d-a502-ux2d-c6076f641326-forecolor: #222;
54 | --calendar-cfdcafb1-ux2d-5b40-ux2d-4ba0-ux2d-a3fc-ux2d-9209cff0be9e-backcolor: #1b9952;
55 | --calendar-cfdcafb1-ux2d-5b40-ux2d-4ba0-ux2d-a3fc-ux2d-9209cff0be9e-forecolor: white;
56 | --calendar-8f9b05f6-ux2d-06cc-ux2d-40af-ux2d-a20a-ux2d-03d5bc0f1e7d-backcolor: #92e1c0;
57 | --calendar-8f9b05f6-ux2d-06cc-ux2d-40af-ux2d-a20a-ux2d-03d5bc0f1e7d-forecolor: #222;
58 | --calendar-8bc0f304-ux2d-b49e-ux2d-4ac6-ux2d-b4f9-ux2d-5530a46a3b18-backcolor: #9fe1e7;
59 | --calendar-8bc0f304-ux2d-b49e-ux2d-4ac6-ux2d-b4f9-ux2d-5530a46a3b18-forecolor: #222;
60 | --category-follow_up-color: #6600CC;
61 | --category-gifts-color: #FF99FF;
62 | --category-miscellaneous-color: #FFCC00;
63 | --category-competition-color: #CC9933;
64 | --category-issues-color: #99FFFF;
65 | --category-meeting-color: #FFFF66;
66 | --category-travel-color: #663300;
67 | --category-calls-color: #99FF99;
68 | --category-ideas-color: #003333;
69 | --category-favorites-color: #3366FF;
70 | --category-personal-color: #003333;
71 | --category-birthday-color: #996633;
72 | --category-anniversary-color: #333333;
73 | --category-vacation-color: #660000;
74 | --category-customer-color: #CCCCCC;
75 | --category-clients-color: #FF9900;
76 | --category-public_holiday-color: #FFCC66;
77 | --category-business-color: #FFFFCC;
78 | --category-projects-color: #FFCC99;
79 | --category-status-color: #FFFF33;
80 | --category-holidays-color: #663366;
81 | --category-suppliers-color: #000099;
82 |
83 | /* ------------------------------------- */
84 | /* Custom Variables */
85 | /* ------------------------------------- */
86 |
87 | --custom-active-bgcolor: #292c3d !important;
88 | --custom-inactive-bgcolor: #292c3d !important;
89 | --custom-active-fgcolor: #eeefff !important;
90 | --custom-inactive-fgcolor: #cccccc99 !important;
91 |
92 |
93 | /* Title & Tab bar */
94 | --lwt-accent-color: #24273a !important;
95 | --tabs-toolbar-background-color: #24273a !important;
96 |
97 | --lwt-tab-text: #ffffff !important;
98 |
99 | --tree-view-bg: #24273a !important;
100 | --message-bar-background-color: #24273a !important;
101 | --foldertree-background: #24273a !important;
102 | --color-gray-90: #24273a !important;
103 | --color-gray-80: #24273a !important;
104 | }
105 |
106 | #folderPane {
107 | background-color: #24273a !important;
108 | }
109 |
110 | html body.layout-classic.layout-table div#folderPane.no-overscroll {
111 | background-color: #24273a !important;
112 | }
113 |
--------------------------------------------------------------------------------
/brew/Brewfile:
--------------------------------------------------------------------------------
1 | tap "browsh-org/browsh"
2 | tap "dart-lang/dart"
3 | tap "homebrew/bundle"
4 | tap "homebrew/cask"
5 | tap "homebrew/cask-fonts"
6 | tap "homebrew/core"
7 | tap "homebrew/services"
8 | tap "koekeishiya/formulae"
9 | tap "netlify/git-credential-netlify"
10 | tap "ngrok/ngrok"
11 | tap "sass/sass"
12 | brew "autojump"
13 | brew "bash"
14 | brew "bash-completion"
15 | brew "bat"
16 | brew "bitwarden-cli"
17 | brew "glib"
18 | brew "coreutils"
19 | brew "cowsay"
20 | brew "exercism"
21 | brew "fdupes"
22 | brew "ffmpeg"
23 | brew "figlet"
24 | brew "gawk"
25 | brew "gh"
26 | brew "gifsicle"
27 | brew "git"
28 | brew "git-lfs"
29 | brew "glow"
30 | brew "htop"
31 | brew "imagemagick"
32 | brew "lolcat"
33 | brew "lynx"
34 | brew "mas"
35 | brew "moreutils"
36 | brew "neofetch"
37 | brew "neovim"
38 | brew "netlify-cli"
39 | brew "nmap"
40 | brew "onefetch"
41 | brew "pandoc"
42 | brew "pngquant"
43 | brew "pv"
44 | brew "pyenv"
45 | brew "pyinstaller"
46 | brew "ranger"
47 | brew "ruby"
48 | brew "rxvt-unicode"
49 | brew "shellcheck"
50 | brew "shfmt"
51 | brew "subversion"
52 | brew "task"
53 | brew "thefuck"
54 | brew "tldr"
55 | brew "tmux"
56 | brew "trash"
57 | brew "tree"
58 | brew "vips"
59 | brew "wget"
60 | brew "yarn"
61 | brew "youtube-dl"
62 | brew "yt-dlp"
63 | brew "browsh-org/browsh/browsh"
64 | brew "netlify/git-credential-netlify/git-credential-netlify"
65 | brew "sass/sass/sass"
66 | cask "alt-tab"
67 | cask "cheatsheet"
68 | cask "dropbox"
69 | cask "figma"
70 | cask "font-fantasque-sans-mono"
71 | cask "font-hack-nerd-font"
72 | cask "font-iosevka"
73 | cask "font-jetbrains-mono-nerd-font"
74 | cask "font-open-sans"
75 | cask "font-victor-mono"
76 | cask "google-chrome"
77 | cask "hiddenbar"
78 | cask "itsycal"
79 | cask "keka"
80 | cask "malwarebytes"
81 | cask "mkvtools"
82 | cask "mos"
83 | cask "mullvadvpn"
84 | cask "ngrok"
85 | cask "notion"
86 | cask "phantomjs"
87 | cask "ql-ansilove"
88 | cask "qladdict"
89 | cask "qlimagesize"
90 | cask "qlmarkdown"
91 | cask "qlmobi"
92 | cask "qlstephen"
93 | cask "quicklook-csv"
94 | cask "quicklook-json"
95 | cask "raindropio"
96 | cask "signal"
97 | cask "stats"
98 | cask "syntax-highlight"
99 | cask "visual-studio-code"
100 | cask "vlc"
101 | vscode "aaron-bond.better-comments"
102 | vscode "albert.tabout"
103 | vscode "alexdauenhauer.nocterial-palenight"
104 | vscode "amandeepmittal.pug"
105 | vscode "antiantisepticeye.vscode-color-picker"
106 | vscode "assisrmatheus.sidebar-markdown-notes"
107 | vscode "astro-build.astro-vscode"
108 | vscode "atomiks.moonlight"
109 | vscode "bradlc.vscode-tailwindcss"
110 | vscode "catppuccin.catppuccin-vsc"
111 | vscode "catppuccin.catppuccin-vsc-icons"
112 | vscode "christian-kohler.npm-intellisense"
113 | vscode "danielknights.vscode-mjml"
114 | vscode "davidanson.vscode-markdownlint"
115 | vscode "dbaeumer.vscode-eslint"
116 | vscode "dendron.dendron-markdown-shortcuts"
117 | vscode "dheovani.svg-viewer"
118 | vscode "donjayamanne.githistory"
119 | vscode "dracula-theme.theme-dracula"
120 | vscode "dsznajder.es7-react-js-snippets"
121 | vscode "dunstontc.viml"
122 | vscode "eamodio.gitlens"
123 | vscode "ecmel.vscode-html-css"
124 | vscode "editorconfig.editorconfig"
125 | vscode "equinusocio.vsc-material-theme"
126 | vscode "equinusocio.vsc-material-theme-icons"
127 | vscode "esbenp.prettier-vscode"
128 | vscode "figma.figma-vscode-extension"
129 | vscode "firefox-devtools.vscode-firefox-debug"
130 | vscode "formulahendry.auto-close-tag"
131 | vscode "formulahendry.auto-complete-tag"
132 | vscode "formulahendry.auto-rename-tag"
133 | vscode "foxundermoon.shell-format"
134 | vscode "github.copilot"
135 | vscode "github.copilot-chat"
136 | vscode "github.vscode-github-actions"
137 | vscode "gruntfuggly.todo-tree"
138 | vscode "hoovercj.vscode-dimmer"
139 | vscode "humao.rest-client"
140 | vscode "josee9988.minifyall"
141 | vscode "kumar-harsh.graphql-for-vscode"
142 | vscode "lightyen.tailwindcss-intellisense-twin"
143 | vscode "maptz.regionfolder"
144 | vscode "mgmcdermott.vscode-language-babel"
145 | vscode "mhutchie.git-graph"
146 | vscode "mikestead.dotenv"
147 | vscode "mrmlnc.vscode-duplicate"
148 | vscode "mrmlnc.vscode-pugbeautify"
149 | vscode "ms-azuretools.vscode-docker"
150 | vscode "ms-vscode-remote.remote-containers"
151 | vscode "ms-vscode.sublime-keybindings"
152 | vscode "ms-vscode.vscode-js-profile-flame"
153 | vscode "ms-vsliveshare.vsliveshare"
154 | vscode "mvllow.rose-pine"
155 | vscode "naumovs.color-highlight"
156 | vscode "pflannery.vscode-versionlens"
157 | vscode "pkief.material-icon-theme"
158 | vscode "pnp.polacode"
159 | vscode "redhat.vscode-yaml"
160 | vscode "remisa.shellman"
161 | vscode "ritwickdey.liveserver"
162 | vscode "robbowen.synthwave-vscode"
163 | vscode "ryanraposo.codeui"
164 | vscode "sainnhe.everforest"
165 | vscode "sdras.inbedby7pm"
166 | vscode "sdras.night-owl"
167 | vscode "shailen.netlify"
168 | vscode "shd101wyy.markdown-preview-enhanced"
169 | vscode "styled-components.vscode-styled-components"
170 | vscode "svelte.svelte-vscode"
171 | vscode "tamasfe.even-better-toml"
172 | vscode "taniarascia.new-moon-vscode"
173 | vscode "thang-nm.catppuccin-perfect-icons"
174 | vscode "timonwong.shellcheck"
175 | vscode "tombonnike.vscode-status-bar-format-toggle"
176 | vscode "tristanremy.mirage"
177 | vscode "tyriar.sort-lines"
178 | vscode "ue.alphabetical-sorter"
179 | vscode "unifiedjs.vscode-mdx"
180 | vscode "visualstudioexptteam.intellicode-api-usage-examples"
181 | vscode "visualstudioexptteam.vscodeintellicode"
182 | vscode "vscode-icons-team.vscode-icons"
183 | vscode "wakatime.vscode-wakatime"
184 | vscode "wayou.vscode-todo-highlight"
185 | vscode "whizkydee.material-palenight-theme"
186 | vscode "xabikos.javascriptsnippets"
187 | vscode "yoavbls.pretty-ts-errors"
188 | vscode "yzhang.markdown-all-in-one"
189 | vscode "zhuangtongfa.material-theme"
190 | vscode "zignd.html-css-class-completion"
191 |
--------------------------------------------------------------------------------
/zsh/.oh-my-zsh/custom/aliases.zsh:
--------------------------------------------------------------------------------
1 | -='cd -'
2 | ...=../..
3 | ....=../../..
4 | .....=../../../..
5 | ......=../../../../..
6 | 1='cd -'
7 | 2='cd -2'
8 | 3='cd -3'
9 | 4='cd -4'
10 | 5='cd -5'
11 | 6='cd -6'
12 | 7='cd -7'
13 | 8='cd -8'
14 | 9='cd -9'
15 | _='sudo '
16 | afind='ack -il'
17 | cache='cd ~/.dotfiles/Scripts/ && ./clear_caches.sh'
18 | ct='clear; pwd; tree -aFL 1'
19 | cv=clear
20 | egrep='egrep --color=auto --exclude-dir={.bzr,CVS,.git,.hg,.svn,.idea,.tox}'
21 | fgrep='fgrep --color=auto --exclude-dir={.bzr,CVS,.git,.hg,.svn,.idea,.tox}'
22 | fix='npm audit fix'
23 | g=git
24 | ga='git add .'
25 | gaa='git add --all'
26 | gac='git add . && git commit -m '
27 | gam='git am'
28 | gama='git am --abort'
29 | gamc='git am --continue'
30 | gams='git am --skip'
31 | gamscp='git am --show-current-patch'
32 | gap='git add -p'
33 | gapa='git add --patch'
34 | gapt='git apply --3way'
35 | gau='git add --update'
36 | gav='git add --verbose'
37 | gb='git branch'
38 | gbD='git branch -D'
39 | gba='git branch -a'
40 | gbd='git branch -d'
41 | gbda='git branch --no-color --merged | command grep -vE "^(\+|\*|\s*($(git_main_branch)|development|develop|devel|dev)\s*$)" | command xargs -n 1 git branch -d'
42 | gbl='git blame -b -w'
43 | gbnm='git branch --no-merged'
44 | gbr='git branch --remote'
45 | gbs='git bisect'
46 | gbsb='git bisect bad'
47 | gbsg='git bisect good'
48 | gbsr='git bisect reset'
49 | gbss='git bisect start'
50 | gc='git commit -m '
51 | 'gc!'='git commit -v --amend'
52 | gca='git commit -v -a'
53 | 'gca!'='git commit -v -a --amend'
54 | gcam='git commit -a -m'
55 | 'gcan!'='git commit -v -a --no-edit --amend'
56 | 'gcans!'='git commit -v -a -s --no-edit --amend'
57 | gcb='git checkout -b'
58 | gcd='git checkout develop'
59 | gcf='git config --list'
60 | gcl='git clone --recurse-submodules'
61 | gclean='git clean -id'
62 | gcm='git checkout $(git_main_branch)'
63 | gcmsg='git commit -m'
64 | 'gcn!'='git commit -v --no-edit --amend'
65 | gco='git checkout'
66 | gcount='git shortlog -sn'
67 | gcp='git cherry-pick'
68 | gcpa='git cherry-pick --abort'
69 | gcpc='git cherry-pick --continue'
70 | gcs='git commit -S'
71 | gcsm='git commit -s -m'
72 | gd='git diff'
73 | gdca='git diff --cached'
74 | gdct='git describe --tags $(git rev-list --tags --max-count=1)'
75 | gdcw='git diff --cached --word-diff'
76 | gds='git diff --staged'
77 | gdt='git diff-tree --no-commit-id --name-only -r'
78 | gdw='git diff --word-diff'
79 | gf='git fetch'
80 | gfa='git fetch --all --prune --jobs=10'
81 | gfg='git ls-files | grep'
82 | gfo='git fetch origin'
83 | gg='git gui citool'
84 | gga='git gui citool --amend'
85 | ggpull='git pull origin "$(git_current_branch)"'
86 | ggpur=ggu
87 | ggpush='git push origin "$(git_current_branch)"'
88 | ggsup='git branch --set-upstream-to=origin/$(git_current_branch)'
89 | ghh='git help'
90 | gignore='git update-index --assume-unchanged'
91 | gignored='git ls-files -v | grep "^[[:lower:]]"'
92 | git-svn-dcommit-push='git svn dcommit && git push github $(git_main_branch):svntrunk'
93 | gitcheck='mgitstatus ~/Projects/\#Repos/'
94 | gk='\gitk --all --branches'
95 | gke='\gitk --all $(git log -g --pretty=%h)'
96 | gl='git pull'
97 | glg='git log --stat'
98 | glgg='git log --graph'
99 | glgga='git log --graph --decorate --all'
100 | glgm='git log --graph --max-count=10'
101 | glgp='git log --stat -p'
102 | glo='git log --oneline --decorate'
103 | globurl='noglob urlglobber '
104 | glod='git log --graph --pretty='\''%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ad) %C(bold blue)<%an>%Creset'\'
105 | glods='git log --graph --pretty='\''%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ad) %C(bold blue)<%an>%Creset'\'' --date=short'
106 | glog='git log --oneline --decorate --graph'
107 | gloga='git log --oneline --decorate --graph --all'
108 | glol='git log --graph --pretty='\''%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'\'
109 | glola='git log --graph --pretty='\''%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'\'' --all'
110 | glols='git log --graph --pretty='\''%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'\'' --stat'
111 | glp=_git_log_prettily
112 | glum='git pull upstream $(git_main_branch)'
113 | gm='git merge'
114 | gma='git merge --abort'
115 | gmom='git merge origin/$(git_main_branch)'
116 | gmt='git mergetool --no-prompt'
117 | gmtvim='git mergetool --no-prompt --tool=vimdiff'
118 | gmum='git merge upstream/$(git_main_branch)'
119 | gp='git push'
120 | gpd='git push --dry-run'
121 | gpf='git push --force-with-lease'
122 | 'gpf!'='git push --force'
123 | gpoat='git push origin --all && git push origin --tags'
124 | gpristine='git reset --hard && git clean -dffx'
125 | gpsup='git push --set-upstream origin $(git_current_branch)'
126 | gpu='git push upstream'
127 | gpv='git push -v'
128 | gr='git remote'
129 | gra='git remote add'
130 | grb='git rebase'
131 | grba='git rebase --abort'
132 | grbc='git rebase --continue'
133 | grbd='git rebase develop'
134 | grbi='git rebase -i'
135 | grbm='git rebase $(git_main_branch)'
136 | grbs='git rebase --skip'
137 | grep='grep --color=auto --exclude-dir={.bzr,CVS,.git,.hg,.svn,.idea,.tox}'
138 | grev='git revert'
139 | grh='git reset'
140 | grhh='git reset --hard'
141 | grm='git rm'
142 | grmc='git rm --cached'
143 | grmv='git remote rename'
144 | groh='git reset origin/$(git_current_branch) --hard'
145 | grrm='git remote remove'
146 | grs='git restore'
147 | grset='git remote set-url'
148 | grss='git restore --source'
149 | grt='cd "$(git rev-parse --show-toplevel || echo .)"'
150 | gru='git reset --'
151 | grup='git remote update'
152 | grv='git remote -v'
153 | gs='git status'
154 | gsb='git status -sb'
155 | gsd='git svn dcommit'
156 | gsh='git show'
157 | gsi='git submodule init'
158 | gsps='git show --pretty=short --show-signature'
159 | gsr='git svn rebase'
160 | gss='git status -s'
161 | gst='git status'
162 | gsta='git stash push'
163 | gstaa='git stash apply'
164 | gstall='git stash --all'
165 | gstc='git stash clear'
166 | gstd='git stash drop'
167 | gstl='git stash list'
168 | gstp='git stash pop'
169 | gsts='git stash show --text'
170 | gstu='git stash --include-untracked'
171 | gsu='git submodule update'
172 | gsw='git switch'
173 | gswc='git switch -c'
174 | gtl='gtl(){ git tag --sort=-v:refname -n -l "${1}*" }; noglob gtl'
175 | gts='git tag -s'
176 | gtv='git tag | sort -V'
177 | gunignore='git update-index --no-assume-unchanged'
178 | gunwip='git log -n 1 | grep -q -c "\-\-wip\-\-" && git reset HEAD~1'
179 | gup='git pull --rebase'
180 | gupa='git pull --rebase --autostash'
181 | gupav='git pull --rebase --autostash -v'
182 | gupv='git pull --rebase -v'
183 | gwch='git whatchanged -p --abbrev-commit --pretty=medium'
184 | gwip='git add -A; git rm $(git ls-files --deleted) 2> /dev/null; git commit --no-verify --no-gpg-sign -m "--wip-- [skip ci]"'
185 | history=omz_history
186 | l='ls -lah'
187 | la='ls -alh'
188 | ll='ls -alFC'
189 | ls='ls -G'
190 | lsa='ls -lah'
191 | md='mkdir -p'
192 | ohmyzsh='vim ~/.oh-my-zsh'
193 | practice='cd ~/.dotfiles/Scripts/ && ./practice.py'
194 | py=python3
195 | ql='qlmanage -p'
196 | rd=rmdir
197 | repos='cd -P $USER/Projects/#Repos; cv; pwd; t'
198 | resource='source ~/.zshrc'
199 | run-help=man
200 | shor-code='qlmanage -p $USER/vs_code_shortcuts.pdf'
201 | short='qlmanage -p $USER/Projects/SystemShortcuts/shortcuts.md'
202 | t='tree -aFL 1'
203 | tags='mdls -raw -name kMDItemUserTags'
204 | tasks='cv; task list; task projects'
205 | userchrome='cd -P $USER/Library/Application\ Support/Firefox/Profiles/p3khxkfo.default-release/chrome'
206 | vim=nvim
207 | viminit='nvim ~/.config/nvim/init.vim'
208 | vinit='nvim ~/.config/nvim/init.vim'
209 | which-command=whence
210 | zshconfig='vim ~/.zshrc'
211 |
--------------------------------------------------------------------------------
/via/keychron_q2.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Keychron Q2",
3 | "vendorProductId": 875823376,
4 | "macros": ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""],
5 | "layers": [
6 | [
7 | "KC_GRV",
8 | "KC_1",
9 | "KC_2",
10 | "KC_3",
11 | "KC_4",
12 | "KC_5",
13 | "KC_6",
14 | "KC_7",
15 | "KC_8",
16 | "KC_9",
17 | "KC_0",
18 | "KC_MINS",
19 | "KC_EQL",
20 | "KC_BSPC",
21 | "KC_MPLY",
22 | "KC_TAB",
23 | "KC_Q",
24 | "KC_W",
25 | "KC_E",
26 | "KC_R",
27 | "KC_T",
28 | "KC_Y",
29 | "KC_U",
30 | "KC_I",
31 | "KC_O",
32 | "KC_P",
33 | "KC_LBRC",
34 | "KC_RBRC",
35 | "KC_BSLS",
36 | "KC_VOLU",
37 | "KC_CAPS",
38 | "KC_A",
39 | "KC_S",
40 | "KC_D",
41 | "KC_F",
42 | "KC_G",
43 | "KC_H",
44 | "KC_J",
45 | "KC_K",
46 | "KC_L",
47 | "KC_SCLN",
48 | "KC_QUOT",
49 | "KC_DOWN",
50 | "KC_ENT",
51 | "KC_VOLD",
52 | "KC_LSFT",
53 | "KC_NO",
54 | "KC_Z",
55 | "KC_X",
56 | "KC_C",
57 | "KC_V",
58 | "KC_B",
59 | "KC_N",
60 | "KC_M",
61 | "KC_COMM",
62 | "KC_DOT",
63 | "KC_SLSH",
64 | "KC_NO",
65 | "KC_RSFT",
66 | "KC_UP",
67 | "KC_LCTL",
68 | "KC_LALT",
69 | "KC_LGUI",
70 | "KC_NO",
71 | "KC_NO",
72 | "KC_NO",
73 | "KC_SPC",
74 | "KC_NO",
75 | "KC_NO",
76 | "KC_NO",
77 | "KC_RGUI",
78 | "MO(2)",
79 | "MO(4)",
80 | "KC_LEFT",
81 | "KC_RGHT"
82 | ],
83 | [
84 | "KC_ESC",
85 | "KC_1",
86 | "KC_2",
87 | "KC_3",
88 | "KC_4",
89 | "KC_5",
90 | "KC_6",
91 | "KC_7",
92 | "KC_8",
93 | "KC_9",
94 | "KC_0",
95 | "KC_MINS",
96 | "KC_EQL",
97 | "KC_BSPC",
98 | "KC_INS",
99 | "KC_TAB",
100 | "KC_Q",
101 | "KC_W",
102 | "KC_E",
103 | "KC_R",
104 | "KC_T",
105 | "KC_Y",
106 | "KC_U",
107 | "KC_I",
108 | "KC_O",
109 | "KC_P",
110 | "KC_LBRC",
111 | "KC_RBRC",
112 | "KC_BSLS",
113 | "KC_DEL",
114 | "KC_CAPS",
115 | "KC_A",
116 | "KC_S",
117 | "KC_D",
118 | "KC_F",
119 | "KC_G",
120 | "KC_H",
121 | "KC_J",
122 | "KC_K",
123 | "KC_L",
124 | "KC_SCLN",
125 | "KC_QUOT",
126 | "KC_DOWN",
127 | "KC_ENT",
128 | "KC_HOME",
129 | "KC_LSFT",
130 | "KC_NO",
131 | "KC_Z",
132 | "KC_X",
133 | "KC_C",
134 | "KC_V",
135 | "KC_B",
136 | "KC_N",
137 | "KC_M",
138 | "KC_COMM",
139 | "KC_DOT",
140 | "KC_SLSH",
141 | "KC_NO",
142 | "KC_RSFT",
143 | "KC_UP",
144 | "KC_LCTL",
145 | "KC_LGUI",
146 | "KC_LALT",
147 | "KC_NO",
148 | "KC_NO",
149 | "KC_NO",
150 | "KC_SPC",
151 | "KC_NO",
152 | "KC_NO",
153 | "KC_NO",
154 | "KC_RALT",
155 | "MO(3)",
156 | "MO(4)",
157 | "KC_LEFT",
158 | "KC_RGHT"
159 | ],
160 | [
161 | "KC_ESC",
162 | "KC_F1",
163 | "KC_F2",
164 | "KC_F3",
165 | "KC_F4",
166 | "KC_F5",
167 | "KC_F6",
168 | "KC_F7",
169 | "KC_F8",
170 | "KC_F9",
171 | "KC_F10",
172 | "KC_F11",
173 | "KC_F12",
174 | "KC_TRNS",
175 | "KC_TRNS",
176 | "RGB_TOG",
177 | "RGB_MOD",
178 | "RGB_VAI",
179 | "RGB_HUI",
180 | "RGB_SAI",
181 | "RGB_SPI",
182 | "KC_TRNS",
183 | "KC_TRNS",
184 | "KC_TRNS",
185 | "KC_TRNS",
186 | "KC_TRNS",
187 | "KC_TRNS",
188 | "KC_TRNS",
189 | "KC_TRNS",
190 | "KC_MPRV",
191 | "RGB_M_G",
192 | "RGB_RMOD",
193 | "RGB_VAD",
194 | "RGB_HUD",
195 | "RGB_SAD",
196 | "RGB_SPD",
197 | "KC_TRNS",
198 | "KC_TRNS",
199 | "KC_TRNS",
200 | "KC_TRNS",
201 | "KC_TRNS",
202 | "KC_TRNS",
203 | "KC_PGDN",
204 | "KC_TRNS",
205 | "KC_MNXT",
206 | "KC_TRNS",
207 | "KC_NO",
208 | "KC_TRNS",
209 | "KC_TRNS",
210 | "KC_TRNS",
211 | "KC_TRNS",
212 | "KC_TRNS",
213 | "KC_TRNS",
214 | "KC_TRNS",
215 | "KC_TRNS",
216 | "KC_TRNS",
217 | "KC_TRNS",
218 | "KC_NO",
219 | "KC_TRNS",
220 | "KC_PGUP",
221 | "KC_TRNS",
222 | "KC_TRNS",
223 | "KC_TRNS",
224 | "KC_NO",
225 | "KC_NO",
226 | "KC_NO",
227 | "KC_TRNS",
228 | "KC_NO",
229 | "KC_NO",
230 | "KC_NO",
231 | "KC_TRNS",
232 | "KC_TRNS",
233 | "KC_TRNS",
234 | "KC_TRNS",
235 | "KC_TRNS"
236 | ],
237 | [
238 | "KC_GRV",
239 | "KC_BRID",
240 | "KC_BRIU",
241 | "USER02",
242 | "USER03",
243 | "RGB_VAD",
244 | "RGB_VAI",
245 | "KC_MPRV",
246 | "KC_MPLY",
247 | "KC_MNXT",
248 | "KC_MUTE",
249 | "KC_VOLD",
250 | "KC_VOLU",
251 | "KC_TRNS",
252 | "KC_TRNS",
253 | "RGB_TOG",
254 | "RGB_MOD",
255 | "RGB_VAI",
256 | "RGB_HUI",
257 | "RGB_SAI",
258 | "RGB_SPI",
259 | "KC_TRNS",
260 | "KC_TRNS",
261 | "KC_TRNS",
262 | "KC_TRNS",
263 | "KC_TRNS",
264 | "KC_TRNS",
265 | "KC_TRNS",
266 | "KC_TRNS",
267 | "KC_TRNS",
268 | "KC_TRNS",
269 | "RGB_RMOD",
270 | "RGB_VAD",
271 | "RGB_HUD",
272 | "RGB_SAD",
273 | "RGB_SPD",
274 | "KC_TRNS",
275 | "KC_TRNS",
276 | "KC_TRNS",
277 | "KC_TRNS",
278 | "KC_TRNS",
279 | "KC_TRNS",
280 | "KC_TRNS",
281 | "KC_TRNS",
282 | "KC_TRNS",
283 | "KC_TRNS",
284 | "KC_NO",
285 | "KC_TRNS",
286 | "KC_TRNS",
287 | "KC_TRNS",
288 | "KC_TRNS",
289 | "KC_TRNS",
290 | "KC_TRNS",
291 | "KC_TRNS",
292 | "KC_TRNS",
293 | "KC_TRNS",
294 | "KC_TRNS",
295 | "KC_NO",
296 | "KC_TRNS",
297 | "KC_TRNS",
298 | "KC_TRNS",
299 | "KC_TRNS",
300 | "KC_TRNS",
301 | "KC_NO",
302 | "KC_NO",
303 | "KC_NO",
304 | "KC_TRNS",
305 | "KC_NO",
306 | "KC_NO",
307 | "KC_NO",
308 | "KC_TRNS",
309 | "KC_TRNS",
310 | "KC_TRNS",
311 | "KC_TRNS",
312 | "KC_TRNS"
313 | ],
314 | [
315 | "KC_TILD",
316 | "KC_F1",
317 | "KC_F2",
318 | "KC_F3",
319 | "KC_F4",
320 | "KC_F5",
321 | "KC_F6",
322 | "KC_F7",
323 | "KC_F8",
324 | "KC_F9",
325 | "KC_F10",
326 | "KC_F11",
327 | "KC_F12",
328 | "KC_TRNS",
329 | "KC_TRNS",
330 | "RGB_TOG",
331 | "RGB_MOD",
332 | "RGB_VAI",
333 | "RGB_HUI",
334 | "RGB_SAI",
335 | "RGB_SPI",
336 | "KC_TRNS",
337 | "KC_TRNS",
338 | "KC_TRNS",
339 | "KC_TRNS",
340 | "KC_TRNS",
341 | "KC_TRNS",
342 | "KC_TRNS",
343 | "KC_TRNS",
344 | "KC_TRNS",
345 | "KC_TRNS",
346 | "RGB_RMOD",
347 | "RGB_VAD",
348 | "RGB_HUD",
349 | "RGB_SAD",
350 | "RGB_SPD",
351 | "KC_TRNS",
352 | "KC_TRNS",
353 | "KC_TRNS",
354 | "KC_TRNS",
355 | "KC_TRNS",
356 | "KC_TRNS",
357 | "KC_TRNS",
358 | "KC_TRNS",
359 | "KC_TRNS",
360 | "KC_TRNS",
361 | "KC_NO",
362 | "KC_TRNS",
363 | "KC_TRNS",
364 | "KC_TRNS",
365 | "KC_TRNS",
366 | "KC_TRNS",
367 | "KC_TRNS",
368 | "KC_TRNS",
369 | "KC_TRNS",
370 | "KC_TRNS",
371 | "KC_TRNS",
372 | "KC_NO",
373 | "KC_TRNS",
374 | "KC_TRNS",
375 | "KC_TRNS",
376 | "KC_TRNS",
377 | "KC_TRNS",
378 | "KC_NO",
379 | "KC_NO",
380 | "KC_NO",
381 | "KC_TRNS",
382 | "KC_NO",
383 | "KC_NO",
384 | "KC_NO",
385 | "KC_TRNS",
386 | "KC_TRNS",
387 | "KC_TRNS",
388 | "KC_TRNS",
389 | "KC_TRNS"
390 | ]
391 | ]
392 | }
--------------------------------------------------------------------------------
/via/keychron_q2-20251007.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Keychron Q2",
3 | "vendorProductId": 875823376,
4 | "macros": ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""],
5 | "layers": [
6 | [
7 | "KC_GRV",
8 | "KC_1",
9 | "KC_2",
10 | "KC_3",
11 | "KC_4",
12 | "KC_5",
13 | "KC_6",
14 | "KC_7",
15 | "KC_8",
16 | "KC_9",
17 | "KC_0",
18 | "KC_MINS",
19 | "KC_EQL",
20 | "KC_BSPC",
21 | "KC_MPLY",
22 | "KC_TAB",
23 | "KC_Q",
24 | "KC_W",
25 | "KC_E",
26 | "KC_R",
27 | "KC_T",
28 | "KC_Y",
29 | "KC_U",
30 | "KC_I",
31 | "KC_O",
32 | "KC_P",
33 | "KC_LBRC",
34 | "KC_RBRC",
35 | "KC_BSLS",
36 | "KC_VOLU",
37 | "KC_ESC",
38 | "KC_A",
39 | "KC_S",
40 | "KC_D",
41 | "KC_F",
42 | "KC_G",
43 | "KC_H",
44 | "KC_J",
45 | "KC_K",
46 | "KC_L",
47 | "KC_SCLN",
48 | "KC_QUOT",
49 | "KC_DOWN",
50 | "KC_ENT",
51 | "KC_VOLD",
52 | "KC_LSFT",
53 | "KC_NO",
54 | "KC_Z",
55 | "KC_X",
56 | "KC_C",
57 | "KC_V",
58 | "KC_B",
59 | "KC_N",
60 | "KC_M",
61 | "KC_COMM",
62 | "KC_DOT",
63 | "KC_SLSH",
64 | "KC_NO",
65 | "KC_RSFT",
66 | "KC_UP",
67 | "KC_LCTL",
68 | "KC_LALT",
69 | "KC_LGUI",
70 | "KC_NO",
71 | "KC_NO",
72 | "KC_NO",
73 | "KC_SPC",
74 | "KC_NO",
75 | "KC_NO",
76 | "KC_NO",
77 | "KC_RGUI",
78 | "MO(2)",
79 | "MO(4)",
80 | "KC_LEFT",
81 | "KC_RGHT"
82 | ],
83 | [
84 | "KC_ESC",
85 | "KC_1",
86 | "KC_2",
87 | "KC_3",
88 | "KC_4",
89 | "KC_5",
90 | "KC_6",
91 | "KC_7",
92 | "KC_8",
93 | "KC_9",
94 | "KC_0",
95 | "KC_MINS",
96 | "KC_EQL",
97 | "KC_BSPC",
98 | "KC_INS",
99 | "KC_TAB",
100 | "KC_Q",
101 | "KC_W",
102 | "KC_E",
103 | "KC_R",
104 | "KC_T",
105 | "KC_Y",
106 | "KC_U",
107 | "KC_I",
108 | "KC_O",
109 | "KC_P",
110 | "KC_LBRC",
111 | "KC_RBRC",
112 | "KC_BSLS",
113 | "KC_DEL",
114 | "KC_CAPS",
115 | "KC_A",
116 | "KC_S",
117 | "KC_D",
118 | "KC_F",
119 | "KC_G",
120 | "KC_H",
121 | "KC_J",
122 | "KC_K",
123 | "KC_L",
124 | "KC_SCLN",
125 | "KC_QUOT",
126 | "KC_DOWN",
127 | "KC_ENT",
128 | "KC_HOME",
129 | "KC_LSFT",
130 | "KC_NO",
131 | "KC_Z",
132 | "KC_X",
133 | "KC_C",
134 | "KC_V",
135 | "KC_B",
136 | "KC_N",
137 | "KC_M",
138 | "KC_COMM",
139 | "KC_DOT",
140 | "KC_SLSH",
141 | "KC_NO",
142 | "KC_RSFT",
143 | "KC_UP",
144 | "KC_LCTL",
145 | "KC_LGUI",
146 | "KC_LALT",
147 | "KC_NO",
148 | "KC_NO",
149 | "KC_NO",
150 | "KC_SPC",
151 | "KC_NO",
152 | "KC_NO",
153 | "KC_NO",
154 | "KC_RALT",
155 | "MO(3)",
156 | "MO(4)",
157 | "KC_LEFT",
158 | "KC_RGHT"
159 | ],
160 | [
161 | "KC_ESC",
162 | "KC_F1",
163 | "KC_F2",
164 | "KC_F3",
165 | "KC_F4",
166 | "KC_F5",
167 | "KC_F6",
168 | "KC_F7",
169 | "KC_F8",
170 | "KC_F9",
171 | "KC_F10",
172 | "KC_F11",
173 | "KC_F12",
174 | "KC_TRNS",
175 | "KC_TRNS",
176 | "RGB_TOG",
177 | "RGB_MOD",
178 | "RGB_VAI",
179 | "RGB_HUI",
180 | "RGB_SAI",
181 | "RGB_SPI",
182 | "KC_TRNS",
183 | "KC_TRNS",
184 | "KC_TRNS",
185 | "KC_TRNS",
186 | "KC_TRNS",
187 | "KC_TRNS",
188 | "KC_TRNS",
189 | "KC_TRNS",
190 | "KC_MPRV",
191 | "RGB_M_G",
192 | "RGB_RMOD",
193 | "RGB_VAD",
194 | "RGB_HUD",
195 | "RGB_SAD",
196 | "RGB_SPD",
197 | "KC_TRNS",
198 | "KC_TRNS",
199 | "KC_TRNS",
200 | "KC_TRNS",
201 | "KC_TRNS",
202 | "KC_TRNS",
203 | "KC_PGDN",
204 | "KC_TRNS",
205 | "KC_MNXT",
206 | "KC_TRNS",
207 | "KC_NO",
208 | "KC_TRNS",
209 | "KC_TRNS",
210 | "KC_TRNS",
211 | "KC_TRNS",
212 | "KC_TRNS",
213 | "KC_TRNS",
214 | "KC_TRNS",
215 | "KC_TRNS",
216 | "KC_TRNS",
217 | "KC_TRNS",
218 | "KC_NO",
219 | "KC_TRNS",
220 | "KC_PGUP",
221 | "KC_TRNS",
222 | "KC_TRNS",
223 | "KC_TRNS",
224 | "KC_NO",
225 | "KC_NO",
226 | "KC_NO",
227 | "KC_TRNS",
228 | "KC_NO",
229 | "KC_NO",
230 | "KC_NO",
231 | "KC_TRNS",
232 | "KC_TRNS",
233 | "KC_TRNS",
234 | "KC_TRNS",
235 | "KC_TRNS"
236 | ],
237 | [
238 | "KC_GRV",
239 | "KC_BRID",
240 | "KC_BRIU",
241 | "USER02",
242 | "USER03",
243 | "RGB_VAD",
244 | "RGB_VAI",
245 | "KC_MPRV",
246 | "KC_MPLY",
247 | "KC_MNXT",
248 | "KC_MUTE",
249 | "KC_VOLD",
250 | "KC_VOLU",
251 | "KC_TRNS",
252 | "KC_TRNS",
253 | "RGB_TOG",
254 | "RGB_MOD",
255 | "RGB_VAI",
256 | "RGB_HUI",
257 | "RGB_SAI",
258 | "RGB_SPI",
259 | "KC_TRNS",
260 | "KC_TRNS",
261 | "KC_TRNS",
262 | "KC_TRNS",
263 | "KC_TRNS",
264 | "KC_TRNS",
265 | "KC_TRNS",
266 | "KC_TRNS",
267 | "KC_TRNS",
268 | "KC_TRNS",
269 | "RGB_RMOD",
270 | "RGB_VAD",
271 | "RGB_HUD",
272 | "RGB_SAD",
273 | "RGB_SPD",
274 | "KC_TRNS",
275 | "KC_TRNS",
276 | "KC_TRNS",
277 | "KC_TRNS",
278 | "KC_TRNS",
279 | "KC_TRNS",
280 | "KC_TRNS",
281 | "KC_TRNS",
282 | "KC_TRNS",
283 | "KC_TRNS",
284 | "KC_NO",
285 | "KC_TRNS",
286 | "KC_TRNS",
287 | "KC_TRNS",
288 | "KC_TRNS",
289 | "KC_TRNS",
290 | "KC_TRNS",
291 | "KC_TRNS",
292 | "KC_TRNS",
293 | "KC_TRNS",
294 | "KC_TRNS",
295 | "KC_NO",
296 | "KC_TRNS",
297 | "KC_TRNS",
298 | "KC_TRNS",
299 | "KC_TRNS",
300 | "KC_TRNS",
301 | "KC_NO",
302 | "KC_NO",
303 | "KC_NO",
304 | "KC_TRNS",
305 | "KC_NO",
306 | "KC_NO",
307 | "KC_NO",
308 | "KC_TRNS",
309 | "KC_TRNS",
310 | "KC_TRNS",
311 | "KC_TRNS",
312 | "KC_TRNS"
313 | ],
314 | [
315 | "KC_TILD",
316 | "KC_F1",
317 | "KC_F2",
318 | "KC_F3",
319 | "KC_F4",
320 | "KC_F5",
321 | "KC_F6",
322 | "KC_F7",
323 | "KC_F8",
324 | "KC_F9",
325 | "KC_F10",
326 | "KC_F11",
327 | "KC_F12",
328 | "KC_TRNS",
329 | "KC_TRNS",
330 | "RGB_TOG",
331 | "RGB_MOD",
332 | "RGB_VAI",
333 | "RGB_HUI",
334 | "RGB_SAI",
335 | "RGB_SPI",
336 | "KC_TRNS",
337 | "KC_TRNS",
338 | "KC_TRNS",
339 | "KC_TRNS",
340 | "KC_TRNS",
341 | "KC_TRNS",
342 | "KC_TRNS",
343 | "KC_TRNS",
344 | "KC_TRNS",
345 | "KC_TRNS",
346 | "RGB_RMOD",
347 | "RGB_VAD",
348 | "RGB_HUD",
349 | "RGB_SAD",
350 | "RGB_SPD",
351 | "KC_TRNS",
352 | "KC_TRNS",
353 | "KC_TRNS",
354 | "KC_TRNS",
355 | "KC_TRNS",
356 | "KC_TRNS",
357 | "KC_TRNS",
358 | "KC_TRNS",
359 | "KC_TRNS",
360 | "KC_TRNS",
361 | "KC_NO",
362 | "KC_TRNS",
363 | "KC_TRNS",
364 | "KC_TRNS",
365 | "KC_TRNS",
366 | "KC_TRNS",
367 | "KC_TRNS",
368 | "KC_TRNS",
369 | "KC_TRNS",
370 | "KC_TRNS",
371 | "KC_TRNS",
372 | "KC_NO",
373 | "KC_TRNS",
374 | "KC_TRNS",
375 | "KC_TRNS",
376 | "KC_TRNS",
377 | "KC_TRNS",
378 | "KC_NO",
379 | "KC_NO",
380 | "KC_NO",
381 | "KC_TRNS",
382 | "KC_NO",
383 | "KC_NO",
384 | "KC_NO",
385 | "KC_TRNS",
386 | "KC_TRNS",
387 | "KC_TRNS",
388 | "KC_TRNS",
389 | "KC_TRNS"
390 | ]
391 | ]
392 | }
--------------------------------------------------------------------------------
/scripts/create_project.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | # WIP: Needs refined config/error handling
3 |
4 | if [ "$#" -ne 2 ]; then
5 | echo "Usage: ./create_project.sh "
6 | exit 1
7 | fi
8 |
9 | PROJECT_NAME=$1
10 | FRAMEWORK=$2
11 |
12 | if [ -d "$PROJECT_NAME" ]; then
13 | echo "Error: Directory '$PROJECT_NAME' already exists."
14 | exit 1
15 | fi
16 |
17 | if [ "$FRAMEWORK" != "next" ] && [ "$FRAMEWORK" != "vite" ]; then
18 | echo "Invalid framework. Choose either 'next' or 'vite'"
19 | exit 1
20 | fi
21 |
22 | create_project() {
23 | if [ "$FRAMEWORK" == "next" ]; then
24 | yarn create next-app --example with-typescript "$PROJECT_NAME"
25 | else
26 | yarn create @vitejs/app "$PROJECT_NAME" --template react-ts
27 | fi
28 | }
29 |
30 | install_dependencies() {
31 | cd "$PROJECT_NAME" || exit
32 | yarn add eslint prettier plop framer-motion twin.macro husky lint-staged jest chalk @testing-library/react @types/jest @types/react @types/react-dom eslint-config-prettier eslint-plugin-react eslint-plugin-react-hooks @typescript-eslint/parser @typescript-eslint/eslint-plugin -D
33 | }
34 |
35 | create_folders() {
36 | mkdir -p src/components/atoms src/components/molecules/.gitkeep src/components/organisms/.gitkeep src/components/wrappers/.gitkeep
37 | }
38 |
39 | create_configs() {
40 | cat >.eslintrc.json <.prettierrc <.lintstagedrc.json <.huskyrc.json <jest.config.js <.gitignore <README.md <LICENSE <
190 |
191 | Permission is hereby granted, free of charge, to any person obtaining a copy
192 | of this software and associated documentation files (the "Software"), to deal
193 | in the Software without restriction, including without limitation the rights
194 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
195 | copies of the Software, and to permit persons to whom the Software is
196 | furnished to do so, subject to the following conditions:
197 |
198 | The above copyright notice and this permission notice shall be included in all
199 | copies or substantial portions of the Software.
200 |
201 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
202 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
203 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
204 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
205 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
206 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
207 | SOFTWARE.
208 | EOL
209 |
210 | mkdir -p .github/workflows
211 | cat >.github/workflows/lighthouse.yml <plopfile.mjs < {
255 | plop.setPrompt('directory', require('inquirer-directory'));
256 | plop.setGenerator('component', {
257 | description: 'Generate an Atomic component',
258 | prompts: [
259 | {
260 | type: 'list',
261 | name: 'type',
262 | message: 'Component type:',
263 | choices: ['atoms', 'molecules', 'organisms', 'templates', 'pages'],
264 | },
265 | {
266 | type: 'input',
267 | name: 'name',
268 | message: 'Component name:',
269 | validate: (value) => {
270 | if (/.+/.test(value)) {
271 | return true;
272 | }
273 | return 'Component name is required';
274 | },
275 | },
276 | ],
277 | actions: [
278 | {
279 | type: 'add',
280 | path: 'src/components/{{type}}/{{pascalCase name}}/{{pascalCase name}}.tsx',
281 | templateFile: resolve(__dirname, 'templates/component.hbs'),
282 | },
283 | ],
284 | });
285 | };
286 | EOL
287 |
288 | mkdir -p templates
289 | cat >templates/component.hbs < {
295 | return (
296 | <{{pascalCase name}}Container>
297 | {{pascalCase name}} component
298 | {{pascalCase name}}Container>
299 | );
300 | };
301 |
302 | export default {{pascalCase name}};
303 | EOL
304 |
305 | cat >tailwind.config.js <
2 |
3 |
4 |
5 | Ansi 0 Color
6 |
7 | Alpha Component
8 | 1
9 | Blue Component
10 | 0.14901961386203766
11 | Color Space
12 | sRGB
13 | Green Component
14 | 0.14117647707462311
15 | Red Component
16 | 0.16470588743686676
17 |
18 | Ansi 1 Color
19 |
20 | Alpha Component
21 | 1
22 | Blue Component
23 | 0.51372551918029785
24 | Color Space
25 | sRGB
26 | Green Component
27 | 0.5058823823928833
28 | Red Component
29 | 0.90196079015731812
30 |
31 | Ansi 10 Color
32 |
33 | Alpha Component
34 | 1
35 | Blue Component
36 | 0.65490198135375977
37 | Color Space
38 | sRGB
39 | Green Component
40 | 1
41 | Red Component
42 | 0.86666667461395264
43 |
44 | Ansi 11 Color
45 |
46 | Alpha Component
47 | 1
48 | Blue Component
49 | 0.34117648005485535
50 | Color Space
51 | sRGB
52 | Green Component
53 | 0.68235296010971069
54 | Red Component
55 | 1
56 |
57 | Ansi 12 Color
58 |
59 | Alpha Component
60 | 1
61 | Blue Component
62 | 1
63 | Color Space
64 | sRGB
65 | Green Component
66 | 0.76862746477127075
67 | Red Component
68 | 0.61176472902297974
69 |
70 | Ansi 13 Color
71 |
72 | Alpha Component
73 | 1
74 | Blue Component
75 | 1
76 | Color Space
77 | sRGB
78 | Green Component
79 | 0.67450982332229614
80 | Red Component
81 | 0.88235294818878174
82 |
83 | Ansi 14 Color
84 |
85 | Alpha Component
86 | 1
87 | Blue Component
88 | 0.79607844352722168
89 | Color Space
90 | sRGB
91 | Green Component
92 | 0.90196079015731812
93 | Red Component
94 | 0.58431375026702881
95 |
96 | Ansi 15 Color
97 |
98 | Alpha Component
99 | 1
100 | Blue Component
101 | 0.99999994039535522
102 | Color Space
103 | sRGB
104 | Green Component
105 | 0.99999994039535522
106 | Red Component
107 | 0.9999966025352478
108 |
109 | Ansi 2 Color
110 |
111 | Alpha Component
112 | 1
113 | Blue Component
114 | 0.50196081399917603
115 | Color Space
116 | sRGB
117 | Green Component
118 | 0.75294119119644165
119 | Red Component
120 | 0.65490198135375977
121 |
122 | Ansi 3 Color
123 |
124 | Alpha Component
125 | 1
126 | Blue Component
127 | 0.50196081399917603
128 | Color Space
129 | sRGB
130 | Green Component
131 | 0.73333334922790527
132 | Red Component
133 | 0.85098040103912354
134 |
135 | Ansi 4 Color
136 |
137 | Alpha Component
138 | 1
139 | Blue Component
140 | 0.729411780834198
141 | Color Space
142 | sRGB
143 | Green Component
144 | 0.7450980544090271
145 | Red Component
146 | 0.5372549295425415
147 |
148 | Ansi 5 Color
149 |
150 | Alpha Component
151 | 1
152 | Blue Component
153 | 0.73725491762161255
154 | Color Space
155 | sRGB
156 | Green Component
157 | 0.62745100259780884
158 | Red Component
159 | 0.82745099067687988
160 |
161 | Ansi 6 Color
162 |
163 | Alpha Component
164 | 1
165 | Blue Component
166 | 0.58431375026702881
167 | Color Space
168 | sRGB
169 | Green Component
170 | 0.75294119119644165
171 | Red Component
172 | 0.52941179275512695
173 |
174 | Ansi 7 Color
175 |
176 | Alpha Component
177 | 1
178 | Blue Component
179 | 0.67450982332229614
180 | Color Space
181 | sRGB
182 | Green Component
183 | 0.83921569585800171
184 | Red Component
185 | 0.90196079015731812
186 |
187 | Ansi 8 Color
188 |
189 | Alpha Component
190 | 1
191 | Blue Component
192 | 0.2896960973739624
193 | Color Space
194 | sRGB
195 | Green Component
196 | 0.2744489312171936
197 | Red Component
198 | 0.3201904296875
199 |
200 | Ansi 9 Color
201 |
202 | Alpha Component
203 | 1
204 | Blue Component
205 | 0.57254904508590698
206 | Color Space
207 | sRGB
208 | Green Component
209 | 0.54509806632995605
210 | Red Component
211 | 1
212 |
213 | Background Color
214 |
215 | Alpha Component
216 | 1
217 | Blue Component
218 | 0.14901961386203766
219 | Color Space
220 | sRGB
221 | Green Component
222 | 0.14117647707462311
223 | Red Component
224 | 0.16470588743686676
225 |
226 | Badge Color
227 |
228 | Alpha Component
229 | 0.5
230 | Blue Component
231 | 0.0
232 | Color Space
233 | sRGB
234 | Green Component
235 | 0.1491314172744751
236 | Red Component
237 | 1
238 |
239 | Bold Color
240 |
241 | Alpha Component
242 | 1
243 | Blue Component
244 | 0.67450982332229614
245 | Color Space
246 | sRGB
247 | Green Component
248 | 0.83921569585800171
249 | Red Component
250 | 0.90196079015731812
251 |
252 | Cursor Color
253 |
254 | Alpha Component
255 | 1
256 | Blue Component
257 | 0.0
258 | Color Space
259 | sRGB
260 | Green Component
261 | 0.80000001192092896
262 | Red Component
263 | 1
264 |
265 | Cursor Guide Color
266 |
267 | Alpha Component
268 | 0.25
269 | Blue Component
270 | 1
271 | Color Space
272 | sRGB
273 | Green Component
274 | 0.9268307089805603
275 | Red Component
276 | 0.70213186740875244
277 |
278 | Cursor Text Color
279 |
280 | Alpha Component
281 | 1
282 | Blue Component
283 | 0.24313725531101227
284 | Color Space
285 | sRGB
286 | Green Component
287 | 0.17647059261798859
288 | Red Component
289 | 0.16078431904315948
290 |
291 | Foreground Color
292 |
293 | Alpha Component
294 | 1
295 | Blue Component
296 | 0.67450982332229614
297 | Color Space
298 | sRGB
299 | Green Component
300 | 0.83921569585800171
301 | Red Component
302 | 0.90196079015731812
303 |
304 | Link Color
305 |
306 | Alpha Component
307 | 1
308 | Blue Component
309 | 1
310 | Color Space
311 | sRGB
312 | Green Component
313 | 0.66666668653488159
314 | Red Component
315 | 0.50980395078659058
316 |
317 | Selected Text Color
318 |
319 | Alpha Component
320 | 1
321 | Blue Component
322 | 0.94509798288345337
323 | Color Space
324 | sRGB
325 | Green Component
326 | 0.93725484609603882
327 | Red Component
328 | 0.92549020051956177
329 |
330 | Selection Color
331 |
332 | Alpha Component
333 | 1
334 | Blue Component
335 | 0.54509806632995605
336 | Color Space
337 | sRGB
338 | Green Component
339 | 0.49019604921340942
340 | Red Component
341 | 0.37647062540054321
342 |
343 |
344 |
345 |
346 |
--------------------------------------------------------------------------------
/macOS/defaults.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | #title :defaults.sh
3 | #description :Main defaults script for macOS
4 | #author :Timothy Merritt
5 | #date :2024-03-29
6 | #version :0.0.1
7 | #usage :./defaults.sh
8 | #notes :
9 | #bash_version :5.2.26(1)-release
10 | #============================================================================
11 | # Main defaults script for macOS
12 | #
13 | # This script will set the defaults for macOS to my preferred settings
14 | #
15 | # This script is based on the `.macos` script from Mathias Bynens, with some
16 | # modifications to suit my preferences. The original script can be found at:
17 | # https://mths.be/macos
18 |
19 | # Close any open System Preferences panes, to prevent them from overriding
20 | # settings we’re about to change
21 | osascript -e 'tell application "System Preferences" to quit'
22 |
23 | # Ask for the administrator password upfront
24 | sudo -v
25 |
26 | # Keep-alive: update existing `sudo` time stamp until `.macos` has finished
27 | while true; do
28 | sudo -n true
29 | sleep 60
30 | kill -0 "$$" || exit
31 | done 2>/dev/null &
32 |
33 | ###############################################################################
34 | # General UI/UX #
35 | ###############################################################################
36 |
37 | # ------------------------------------------------------------------------------
38 | # * * Device Name
39 | # ------------------------------------------------------------------------------
40 | # Set computer name (as done via System Preferences → Sharing)
41 | #sudo scutil --set ComputerName "0x6D746873"
42 | #sudo scutil --set HostName "0x6D746873"
43 | #sudo scutil --set LocalHostName "0x6D746873"
44 | #sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName -string "0x6D746873"
45 |
46 | # Set sidebar icon size to small
47 | defaults write NSGlobalDomain NSTableViewDefaultSizeMode -int 1
48 |
49 | # ------------------------------------------------------------------------------
50 | # * * Fix annoyances
51 | # ------------------------------------------------------------------------------
52 | # Expand save panel by default
53 | defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true
54 | defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode2 -bool true
55 |
56 | # Expand print panel by default
57 | defaults write NSGlobalDomain PMPrintingExpandedStateForPrint -bool true
58 | defaults write NSGlobalDomain PMPrintingExpandedStateForPrint2 -bool true
59 |
60 | # Disable the “Are you sure you want to open this application?” dialog
61 | defaults write com.apple.LaunchServices LSQuarantine -bool false
62 |
63 | # ------------------------------------------------------------------------------
64 | # * * Trackpad, mouse, keyboard, input, etc
65 | # ------------------------------------------------------------------------------
66 | # Disable automatic capitalization as it’s annoying when typing code
67 | defaults write NSGlobalDomain NSAutomaticCapitalizationEnabled -bool false
68 |
69 | # Disable smart dashes as they’re annoying when typing code
70 | defaults write NSGlobalDomain NSAutomaticDashSubstitutionEnabled -bool false
71 |
72 | # Disable automatic period substitution as it’s annoying when typing code
73 | defaults write NSGlobalDomain NSAutomaticPeriodSubstitutionEnabled -bool false
74 |
75 | # Disable smart quotes as they’re annoying when typing code
76 | defaults write NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled -bool false
77 |
78 | # Trackpad: enable tap to click for this user and for the login screen
79 | defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -bool true
80 | defaults -currentHost write NSGlobalDomain com.apple.mouse.tapBehavior -int 1
81 | defaults write NSGlobalDomain com.apple.mouse.tapBehavior -int 1
82 |
83 | # Disable “natural” (Lion-style) scrolling
84 | defaults write NSGlobalDomain com.apple.swipescrolldirection -bool false
85 |
86 | # Enable full keyboard access for all controls
87 | # (e.g. enable Tab in modal dialogs)
88 | defaults write NSGlobalDomain AppleKeyboardUIMode -int 3
89 |
90 | # Disable press-and-hold for keys in favor of key repeat
91 | defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false
92 |
93 | # Set a blazingly fast keyboard repeat rate (no really, you've been warned)
94 | defaults write NSGlobalDomain KeyRepeat -int 1
95 | defaults write NSGlobalDomain InitialKeyRepeat -int 10
96 |
97 | # ------------------------------------------------------------------------------
98 | # * * Screen
99 | # ------------------------------------------------------------------------------
100 | # Require password immediately after sleep or screen saver begins
101 | defaults write com.apple.screensaver askForPassword -int 1
102 | defaults write com.apple.screensaver askForPasswordDelay -int 0
103 |
104 | # Save screenshots to the desktop
105 | defaults write com.apple.screencapture location -string "${HOME}/Desktop"
106 |
107 | # Save screenshots in PNG format (other options: BMP, GIF, JPG, PDF, TIFF)
108 | defaults write com.apple.screencapture type -string "png"
109 |
110 | # Disable shadow in screenshots
111 | defaults write com.apple.screencapture disable-shadow -bool true
112 |
113 | # ------------------------------------------------------------------------------
114 | # * * Finder
115 | # ------------------------------------------------------------------------------
116 | # Finder: allow quitting via ⌘ + Q; doing so will also hide desktop icons
117 | defaults write com.apple.finder QuitMenuItem -bool true
118 |
119 | # Finder: disable window animations and Get Info animations
120 | defaults write com.apple.finder DisableAllAnimations -bool true
121 |
122 | # Set Desktop as the default location for new Finder windows
123 | # For other paths, use `PfLo` and `file:///full/path/here/`
124 | defaults write com.apple.finder NewWindowTarget -string "PfDe"
125 | defaults write com.apple.finder NewWindowTargetPath -string "file://${HOME}/Desktop/"
126 |
127 | # Finder: show hidden files by default
128 | defaults write com.apple.finder AppleShowAllFiles -bool true
129 |
130 | # Finder: show all filename extensions
131 | defaults write NSGlobalDomain AppleShowAllExtensions -bool true
132 |
133 | # Finder: show status bar
134 | defaults write com.apple.finder ShowStatusBar -bool true
135 |
136 | # Finder: show path bar
137 | defaults write com.apple.finder ShowPathbar -bool true
138 |
139 | # Display full POSIX path as Finder window title
140 | defaults write com.apple.finder _FXShowPosixPathInTitle -bool true
141 |
142 | # When performing a search, search the current folder by default
143 | defaults write com.apple.finder FXDefaultSearchScope -string "SCcf"
144 |
145 | # Disable the warning when changing a file extension
146 | defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false
147 |
148 | # Enable spring loading for directories
149 | defaults write NSGlobalDomain com.apple.springing.enabled -bool true
150 |
151 | # Remove the spring loading delay for directories
152 | defaults write NSGlobalDomain com.apple.springing.delay -float 0
153 |
154 | # Avoid creating .DS_Store files on network or USB volumes
155 | defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
156 | defaults write com.apple.desktopservices DSDontWriteUSBStores -bool true
157 |
158 | # Automatically open a new Finder window when a volume is mounted
159 | defaults write com.apple.frameworks.diskimages auto-open-ro-root -bool true
160 | defaults write com.apple.frameworks.diskimages auto-open-rw-root -bool true
161 | defaults write com.apple.finder OpenWindowForNewRemovableDisk -bool true
162 |
163 | ## Use list view in all Finder windows by default
164 | ## Four-letter codes for the other view modes: `icnv`, `clmv`, `glyv`
165 | defaults write com.apple.finder FXPreferredViewStyle -string "Nlsv"
166 |
167 | ## Show the ~/Library folder
168 | chflags nohidden ~/Library && xattr -d com.apple.FinderInfo ~/Library
169 |
170 | ## Show the /Volumes folder
171 | sudo chflags nohidden /Volumes
172 |
173 | ## Expand the following File Info panes:
174 | ## “General”, “Open with”, and “Sharing & Permissions”
175 | defaults write com.apple.finder FXInfoPanesExpanded -dict \
176 | General -bool true \
177 | OpenWith -bool true \
178 | Privileges -bool true
179 |
180 | # ------------------------------------------------------------------------------
181 | # * * Dock, Dashboard, and hot corners
182 | # ------------------------------------------------------------------------------
183 | # Change minimize/maximize window effect
184 | defaults write com.apple.dock mineffect -string "scale"
185 |
186 | # Minimize windows into their application’s icon
187 | defaults write com.apple.dock minimize-to-application -bool true
188 |
189 | # Enable spring loading for all Dock items
190 | defaults write com.apple.dock enable-spring-load-actions-on-all-items -bool true
191 |
192 | # Show indicator lights for open applications in the Dock
193 | defaults write com.apple.dock show-process-indicators -bool true
194 |
195 | # Don’t animate opening applications from the Dock
196 | defaults write com.apple.dock launchanim -bool false
197 |
198 | # Speed up Mission Control animations
199 | defaults write com.apple.dock expose-animation-duration -float 0.1
200 |
201 | # Don’t group windows by application in Mission Control
202 | # (i.e. use the old Exposé behavior instead)
203 | defaults write com.apple.dock expose-group-by-app -bool false
204 |
205 | # Remove the auto-hiding Dock delay
206 | defaults write com.apple.dock autohide-delay -float 0
207 | # Remove the animation when hiding/showing the Dock
208 | defaults write com.apple.dock autohide-time-modifier -float 0
209 |
210 | # Automatically hide and show the Dock
211 | defaults write com.apple.dock autohide -bool true
212 |
213 | # Don’t show recent applications in Dock
214 | defaults write com.apple.dock show-recents -bool false
215 |
216 | # ------------------------------------------------------------------------------
217 | # * * iTerm
218 | # ------------------------------------------------------------------------------
219 | # Don’t display the annoying prompt when quitting iTerm
220 | defaults write com.googlecode.iterm2 PromptOnQuit -bool false
221 |
--------------------------------------------------------------------------------
/iTerm/catppuccin.itermcolors:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Ansi 0 Color
6 |
7 | Alpha Component
8 | 1
9 | Blue Component
10 | 0.49411764740943909
11 | Color Space
12 | sRGB
13 | Green Component
14 | 0.42352941632270813
15 | Red Component
16 | 0.43137255311012268
17 |
18 | Ansi 1 Color
19 |
20 | Alpha Component
21 | 1
22 | Blue Component
23 | 0.56078433990478516
24 | Color Space
25 | sRGB
26 | Green Component
27 | 0.54901963472366333
28 | Red Component
29 | 0.89019608497619629
30 |
31 | Ansi 10 Color
32 |
33 | Alpha Component
34 | 1
35 | Blue Component
36 | 0.67843139171600342
37 | Color Space
38 | sRGB
39 | Green Component
40 | 0.89019608497619629
41 | Red Component
42 | 0.69411766529083252
43 |
44 | Ansi 11 Color
45 |
46 | Alpha Component
47 | 1
48 | Blue Component
49 | 0.66666668653488159
50 | Color Space
51 | sRGB
52 | Green Component
53 | 0.86666667461395264
54 | Red Component
55 | 0.92156863212585449
56 |
57 | Ansi 12 Color
58 |
59 | Alpha Component
60 | 1
61 | Blue Component
62 | 0.93725490570068359
63 | Color Space
64 | sRGB
65 | Green Component
66 | 0.72549021244049072
67 | Red Component
68 | 0.64313727617263794
69 |
70 | Ansi 13 Color
71 |
72 | Alpha Component
73 | 1
74 | Blue Component
75 | 0.90980392694473267
76 | Color Space
77 | sRGB
78 | Green Component
79 | 0.66666668653488159
80 | Red Component
81 | 0.7764706015586853
82 |
83 | Ansi 14 Color
84 |
85 | Alpha Component
86 | 1
87 | Blue Component
88 | 0.88627451658248901
89 | Color Space
90 | sRGB
91 | Green Component
92 | 0.70588237047195435
93 | Red Component
94 | 0.89803922176361084
95 |
96 | Ansi 15 Color
97 |
98 | Alpha Component
99 | 1
100 | Blue Component
101 | 0.90980392694473267
102 | Color Space
103 | sRGB
104 | Green Component
105 | 0.85490196943283081
106 | Red Component
107 | 0.85490196943283081
108 |
109 | Ansi 2 Color
110 |
111 | Alpha Component
112 | 1
113 | Blue Component
114 | 0.67843139171600342
115 | Color Space
116 | sRGB
117 | Green Component
118 | 0.89019608497619629
119 | Red Component
120 | 0.69411766529083252
121 |
122 | Ansi 3 Color
123 |
124 | Alpha Component
125 | 1
126 | Blue Component
127 | 0.66666668653488159
128 | Color Space
129 | sRGB
130 | Green Component
131 | 0.86666667461395264
132 | Red Component
133 | 0.92156863212585449
134 |
135 | Ansi 4 Color
136 |
137 | Alpha Component
138 | 1
139 | Blue Component
140 | 0.93725490570068359
141 | Color Space
142 | sRGB
143 | Green Component
144 | 0.72549021244049072
145 | Red Component
146 | 0.64313727617263794
147 |
148 | Ansi 5 Color
149 |
150 | Alpha Component
151 | 1
152 | Blue Component
153 | 0.90980392694473267
154 | Color Space
155 | sRGB
156 | Green Component
157 | 0.66666668653488159
158 | Red Component
159 | 0.7764706015586853
160 |
161 | Ansi 6 Color
162 |
163 | Alpha Component
164 | 1
165 | Blue Component
166 | 0.88627451658248901
167 | Color Space
168 | sRGB
169 | Green Component
170 | 0.70588237047195435
171 | Red Component
172 | 0.89803922176361084
173 |
174 | Ansi 7 Color
175 |
176 | Alpha Component
177 | 1
178 | Blue Component
179 | 0.90980392694473267
180 | Color Space
181 | sRGB
182 | Green Component
183 | 0.85490196943283081
184 | Red Component
185 | 0.85490196943283081
186 |
187 | Ansi 8 Color
188 |
189 | Alpha Component
190 | 1
191 | Blue Component
192 | 0.49411764740943909
193 | Color Space
194 | sRGB
195 | Green Component
196 | 0.42352941632270813
197 | Red Component
198 | 0.43137255311012268
199 |
200 | Ansi 9 Color
201 |
202 | Alpha Component
203 | 1
204 | Blue Component
205 | 0.56078433990478516
206 | Color Space
207 | sRGB
208 | Green Component
209 | 0.54901963472366333
210 | Red Component
211 | 0.89019608497619629
212 |
213 | Background Color
214 |
215 | Alpha Component
216 | 1
217 | Blue Component
218 | 0.15686275064945221
219 | Color Space
220 | sRGB
221 | Green Component
222 | 0.11764705926179886
223 | Red Component
224 | 0.11764705926179886
225 |
226 | Badge Color
227 |
228 | Alpha Component
229 | 0.5
230 | Blue Component
231 | 0.54901963472366333
232 | Color Space
233 | sRGB
234 | Green Component
235 | 0.54901963472366333
236 | Red Component
237 | 0.88627451658248901
238 |
239 | Bold Color
240 |
241 | Alpha Component
242 | 1
243 | Blue Component
244 | 0.49411764740943909
245 | Color Space
246 | sRGB
247 | Green Component
248 | 0.42352941632270813
249 | Red Component
250 | 0.43137255311012268
251 |
252 | Cursor Color
253 |
254 | Alpha Component
255 | 1
256 | Blue Component
257 | 0.67843139171600342
258 | Color Space
259 | sRGB
260 | Green Component
261 | 0.89019608497619629
262 | Red Component
263 | 0.69411766529083252
264 |
265 | Cursor Guide Color
266 |
267 | Alpha Component
268 | 0.25
269 | Blue Component
270 | 1
271 | Color Space
272 | sRGB
273 | Green Component
274 | 0.9268307089805603
275 | Red Component
276 | 0.70213186740875244
277 |
278 | Cursor Text Color
279 |
280 | Alpha Component
281 | 1
282 | Blue Component
283 | 0.15686275064945221
284 | Color Space
285 | sRGB
286 | Green Component
287 | 0.11764705926179886
288 | Red Component
289 | 0.11764705926179886
290 |
291 | Foreground Color
292 |
293 | Alpha Component
294 | 1
295 | Blue Component
296 | 0.90980392694473267
297 | Color Space
298 | sRGB
299 | Green Component
300 | 0.85490196943283081
301 | Red Component
302 | 0.85490196943283081
303 |
304 | Link Color
305 |
306 | Alpha Component
307 | 1
308 | Blue Component
309 | 0.92941176891326904
310 | Color Space
311 | sRGB
312 | Green Component
313 | 0.89411765336990356
314 | Red Component
315 | 0.7450980544090271
316 |
317 | Selected Text Color
318 |
319 | Alpha Component
320 | 1
321 | Blue Component
322 | 0.15686275064945221
323 | Color Space
324 | sRGB
325 | Green Component
326 | 0.11764705926179886
327 | Red Component
328 | 0.11764705926179886
329 |
330 | Selection Color
331 |
332 | Alpha Component
333 | 1
334 | Blue Component
335 | 0.90980392694473267
336 | Color Space
337 | sRGB
338 | Green Component
339 | 0.85490196943283081
340 | Red Component
341 | 0.85490196943283081
342 |
343 |
344 |
345 |
--------------------------------------------------------------------------------
/zsh/.zshrc:
--------------------------------------------------------------------------------
1 | export PATH=$HOME/bin:/usr/local/bin:$PATH
2 |
3 | # Path to your oh-my-zsh installation.
4 | export ZSH="$HOME/.oh-my-zsh"
5 |
6 | # Set name of the theme to load --- if set to "random", it will
7 | # load a random theme each time oh-my-zsh is loaded, in which case,
8 | # to know which specific one was loaded, run: echo $RANDOM_THEME
9 | # See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
10 | ZSH_THEME="robbyrussell"
11 |
12 | # Set list of themes to pick from when loading at random
13 | # Setting this variable when ZSH_THEME=random will cause zsh to load
14 | # a theme from this variable instead of looking in ~/.oh-my-zsh/themes/
15 | # If set to an empty array, this variable will have no effect.
16 | # ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" )
17 |
18 | # Uncomment the following line to use case-sensitive completion.
19 | CASE_SENSITIVE="false"
20 |
21 | # Uncomment the following line to use hyphen-insensitive completion.
22 | # Case-sensitive completion imust be off. _ and - will be interchangeable.
23 | HYPHEN_INSENSITIVE="true"
24 |
25 | # Uncomment the following line to disable bi-weekly auto-update checks.
26 | DISABLE_AUTO_UPDATE="true"
27 |
28 | # Uncomment the following line to automatically update without prompting.
29 | # DISABLE_UPDATE_PROMPT="true"
30 |
31 | # Uncomment the following line to change how often to auto-update (in days).
32 | export UPDATE_ZSH_DAYS=6
33 |
34 | # Uncomment the following line if pasting URLs and other text is messed up.
35 | # DISABLE_MAGIC_FUNCTIONS=true
36 |
37 | # Uncomment the following line to disable colors in ls.
38 | # DISABLE_LS_COLORS="true"
39 |
40 | # Uncomment the following line to disable auto-setting terminal title.
41 | # DISABLE_AUTO_TITLE="true"
42 |
43 | # Uncomment the following line to enable command auto-correction.
44 | # ENABLE_CORRECTION="true"
45 |
46 | # Uncomment the following line to display red dots whilst waiting for completion.
47 | COMPLETION_WAITING_DOTS="true"
48 |
49 | # Uncomment the following line if you want to disable marking untracked files
50 | # under VCS as dirty. This makes repository status check for large repositories
51 | # much, much faster.
52 | # DISABLE_UNTRACKED_FILES_DIRTY="true"
53 |
54 | # Uncomment the following line if you want to change the command execution time
55 | # stamp shown in the history command output.
56 | # You can set one of the optional three formats:
57 | # "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
58 | # or set a custom format using the strftime function format specifications,
59 | # see 'man strftime' for details.
60 | # HIST_STAMPS="mm/dd/yyyy"
61 |
62 | # Would you like to use another custom folder than $ZSH/custom?
63 | # ZSH_CUSTOM=/path/to/new-custom-folder
64 |
65 | # Which plugins would you like to load?
66 | # Standard plugins can be found in ~/.oh-my-zsh/plugins/*
67 | # Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
68 | # Example format: plugins=(rails git textmate ruby lighthouse)
69 | # Add wisely, as too many plugins slow down shell startup.
70 | plugins=(git alias-finder autojump zsh-autosuggestions)
71 |
72 | source $ZSH/oh-my-zsh.sh
73 |
74 | ######################################################################
75 | # USER CONFIGURATION
76 | ######################################################################
77 |
78 | # export MANPATH="/usr/local/man:$MANPATH"
79 |
80 | # You may need to manually set your language environment
81 | # export LANG=en_US.UTF-8
82 |
83 | # Preferred editor for local and remote sessions
84 | if [[ -n $SSH_CONNECTION ]]; then
85 | export EDITOR='vim'
86 | else
87 | export EDITOR='vim'
88 | fi
89 |
90 | # Compilation flags
91 | # export ARCHFLAGS="-arch x86_64"
92 |
93 | # Set personal aliases, overriding those provided by oh-my-zsh libs,
94 | # plugins, and themes. Aliases can be placed here, though oh-my-zsh
95 | # users are encouraged to define aliases within the ZSH_CUSTOM folder.
96 | # For a full list of active aliases, run `alias`.
97 |
98 | # --------------------------------------------------------------------
99 | # * ALIASES
100 | # --------------------------------------------------------------------
101 |
102 | # ------------------------- * * ZSH * * -----------------------------#
103 | alias zshconfig="vim ~/.zshrc"
104 | alias ohmyzsh="vim ~/.oh-my-zsh"
105 | # Reload zsh
106 | alias resource="source ~/.zshrc"
107 |
108 | # Fuzzy Find suggestions fix
109 | # start typing + [Up-Arrow] - fuzzy find history forward
110 | if [[ "${terminfo[kcuu1]}" != "" ]]; then
111 | autoload -U up-line-or-beginning-search
112 | zle -N up-line-or-beginning-search
113 | bindkey "${terminfo[kcuu1]}" up-line-or-beginning-search
114 | fi
115 | # start typing + [Down-Arrow] - fuzzy find history backward
116 | if [[ "${terminfo[kcud1]}" != "" ]]; then
117 | autoload -U down-line-or-beginning-search
118 | zle -N down-line-or-beginning-search
119 | bindkey "${terminfo[kcud1]}" down-line-or-beginning-search
120 | fi
121 |
122 | # Turn off the godforsaken corrections
123 | unsetopt correct_all
124 |
125 | # ---------------------- * * SHORTCUTS * * --------------------------#
126 | # Shortcut to custom Firefox CSS
127 | alias userchrome="cd -P $HOME/Library/Application\ Support/Firefox/Profiles/p3khxkfo.default-release/chrome"
128 | # Repository Directory
129 | alias repos="cd -P $HOME/Projects/Repos; cv; pwd; t"
130 | # Open coding practice sites in Firefox
131 | alias practice="cd ~/.dotfiles/Scripts/ && ./practice.py"
132 | alias vinit="nvim ~/.config/nvim/init.vim"
133 | alias viminit="nvim ~/.config/nvim/init.vim"
134 |
135 | # ------------------------ * * SHELL * * ----------------------------#
136 | # Clear screen
137 | alias cv="clear"
138 | # List simple columns
139 | alias ll="ls -alFC"
140 | # List detailed
141 | alias la="ls -alh"
142 | # Tree list all files one level deep, with summary, sizes, and color
143 | alias t="tree -aFL 1 -s -h -C --du"
144 | # Tree list all files two levels deep, with summary
145 | alias t2="tree -aFL 2 -s -h -C --du"
146 | # Tree list all files three levels deep, with summary
147 | alias t3="tree -aFL 3 -s -h -C --du"
148 | # Tree list all directories only, one level deep, with summary, sizes, and color
149 | alias td="tree -dFL 1 -s -h -C --du"
150 | # Tree list all directories only, two levels deep, with summary, sizes, and color
151 | alias td2="tree -dFL 2 -s -h -C --du"
152 | # Tree list all directories only, three levels deep, with summary, sizes, and color
153 | alias td3="tree -dFL 3 -s -h -C --du"
154 | # Clear screen, then list contents in tree
155 | alias ct="clear; pwd; tree -aFL 1"
156 | # Check files/directories for associated macos tags
157 | alias tags="mdls -raw -name kMDItemUserTags"
158 |
159 | if command -v kitty &>/dev/null; then
160 | # For kitty autocompletion
161 | autoload -Uz compinit
162 | compinit
163 | # Completion for kitty
164 | kitty + complete setup zsh | source /dev/stdin
165 | fi
166 |
167 | # ----------------------- * * CLI TOOLS * * -------------------------#
168 | # Task CLI
169 | # alias tasks="cv; task list; task projects"
170 | eval $(thefuck --alias)
171 | # Use Neovim over vim
172 | alias vim="nvim"
173 | # Prefer VS Code-Insiders over VS Code
174 | alias in-code="code-insiders"
175 | # Make regular VS Code still available
176 | alias vs-code="code"
177 | # Check/delete contents and size of User/System caches
178 | alias cache="clear_caches.sh"
179 | # npm
180 | alias fix="npm audit fix"
181 | # Create new bash script with header template
182 | alias shead="make_header.sh"
183 | # Run OMGWDYD
184 | alias omg="omgwdyd.sh"
185 | # Run upDoc
186 | alias updoc="updoc.sh"
187 | # Run gitchecks on all local repos
188 | alias gitcheckall="gitcheckall.sh"
189 | # Remove empty lines from a file
190 | alias bye-lines="bye-lines.sh"
191 | # Use preferred Node version if .nvmrc exists
192 | # alias nu="nvm use"
193 | alias nu="nodeswitch.sh"
194 | # Use dice roller
195 | alias roll="dice_roller.sh"
196 | # ------------------------- * * GIT * * -----------------------------#
197 | alias gs="git status"
198 | alias ga="git add"
199 | alias gap="git add -p"
200 | alias gc="git commit"
201 | alias gmsg="git commit"
202 | alias gac="git add . && git commit -m "
203 | alias gpo="git push origin"
204 | alias gitcheck="mgitstatus -d 1 ."
205 | # Push an empty commit to trigger deploy, action, etc.
206 | alias gem="git commit --allow-empty -m 'Trigger Build'"
207 | # ------------------------ * * MACOS * * ----------------------------#
208 | # Quicklook
209 | alias ql="qlmanage -p"
210 | alias short="qlmanage -p $HOME/Projects/SystemShortcuts/shortcuts.md"
211 | alias shor-code="qlmanage -p $HOME/vs_code_shortcuts.pdf"
212 |
213 | # ------------------------ * * RANDOM * * ---------------------------#
214 | # Python
215 | alias py="python3"
216 | # pyenv
217 | export PYENV_ROOT="$HOME/.pyenv"
218 | export PATH="$PYENV_ROOT/bin:$PATH"
219 | if command -v pyenv 1>/dev/null 2>&1; then
220 | eval "$(pyenv init --path)"
221 | fi
222 |
223 | # Show CLI tools info
224 | alias tools="bat ~/tools"
225 | alias todo="clear; cal; echo; printf "%s\n" "TASKS"; task list"
226 |
227 | alias ytdl="youtube-dl -f mp4 --write-auto-sub --write-description -o '%(upload_date)s-%(title)s.%(ext)s' -x --sub-lang en --convert-subtitles srt -k "
228 |
229 | # --------------------------------------------------------------------
230 | # * TERM & PATH
231 | # --------------------------------------------------------------------
232 | export PATH="/usr/bin:/bin:/usr/sbin:/sbin:$PATH"
233 | export TERM="xterm-256color"
234 | export PATH="/usr/local/opt/ruby/bin:$PATH"
235 | export PATH="/usr/local/sbin:$PATH"
236 | export PATH="$PATH:$HOME/bin"
237 | export PATH="$PATH:/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/bin"
238 | export PATH="$PATH:$HOME/.dotfiles/scripts"
239 | export PATH="$PATH:$HOME/.dotfiles/scripts/OMGWDYD"
240 | export HOMEBREW_NO_AUTO_UPDATE=1
241 |
242 | # bear autocomplete setup
243 | BEAR_AC_ZSH_SETUP_PATH=$HOME/Library/Caches/@sloansparger/bear/autocomplete/zsh_setup && test -f $BEAR_AC_ZSH_SETUP_PATH && source $BEAR_AC_ZSH_SETUP_PATH
244 |
245 | # added for npm-completion https://github.com/Jephuff/npm-bash-completion
246 | [ -d "/usr/local/lib/node_modules/npm-completion" ] && PATH_TO_NPM_COMPLETION="/usr/local/lib/node_modules/npm-completion" || PATH_TO_NPM_COMPLETION="/Users/$USER/.nvm/versions/node/v14.18.1/lib/node_modules/npm-completion"
247 |
248 | source $PATH_TO_NPM_COMPLETION/npm-completion.sh
249 |
250 | export PATH="/usr/local/bin:$PATH"
251 | export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
252 | [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
253 | [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
254 |
255 | export PATH="$PATH:$HOME/ngrok"
256 | export PATH="/opt/homebrew/bin:$PATH"
257 |
258 | # The next line updates PATH for Netlify's Git Credential Helper.
259 | test -f '/Users/timothymerritt/Library/Preferences/netlify/helper/path.zsh.inc' && source '/Users/timothymerritt/Library/Preferences/netlify/helper/path.zsh.inc'
260 |
--------------------------------------------------------------------------------
/karabiner/karabiner.json:
--------------------------------------------------------------------------------
1 | {
2 | "global": {
3 | "check_for_updates_on_startup": true,
4 | "show_in_menu_bar": true,
5 | "show_profile_name_in_menu_bar": true
6 | },
7 | "profiles": [
8 | {
9 | "complex_modifications": {
10 | "parameters": {
11 | "basic.simultaneous_threshold_milliseconds": 50,
12 | "basic.to_delayed_action_delay_milliseconds": 500,
13 | "basic.to_if_alone_timeout_milliseconds": 500,
14 | "basic.to_if_held_down_threshold_milliseconds": 500,
15 | "mouse_motion_to_scroll.speed": 100
16 | },
17 | "rules": [
18 | {
19 | "description": "Post Esc if Caps is tapped, Control if held.",
20 | "manipulators": [
21 | {
22 | "from": {
23 | "key_code": "left_control",
24 | "modifiers": {
25 | "optional": ["any"]
26 | }
27 | },
28 | "to": [
29 | {
30 | "key_code": "left_control",
31 | "lazy": true
32 | }
33 | ],
34 | "to_if_alone": [
35 | {
36 | "key_code": "escape"
37 | }
38 | ],
39 | "type": "basic"
40 | }
41 | ]
42 | }
43 | ]
44 | },
45 | "devices": [
46 | {
47 | "disable_built_in_keyboard_if_exists": false,
48 | "fn_function_keys": [],
49 | "identifiers": {
50 | "is_keyboard": true,
51 | "is_pointing_device": false,
52 | "product_id": 20492,
53 | "vendor_id": 12815
54 | },
55 | "ignore": false,
56 | "manipulate_caps_lock_led": true,
57 | "simple_modifications": []
58 | },
59 | {
60 | "disable_built_in_keyboard_if_exists": true,
61 | "fn_function_keys": [],
62 | "identifiers": {
63 | "is_keyboard": true,
64 | "is_pointing_device": true,
65 | "product_id": 20492,
66 | "vendor_id": 12815
67 | },
68 | "ignore": true,
69 | "manipulate_caps_lock_led": true,
70 | "simple_modifications": []
71 | }
72 | ],
73 | "fn_function_keys": [
74 | {
75 | "from": {
76 | "key_code": "f1"
77 | },
78 | "to": [
79 | {
80 | "consumer_key_code": "display_brightness_decrement"
81 | }
82 | ]
83 | },
84 | {
85 | "from": {
86 | "key_code": "f2"
87 | },
88 | "to": [
89 | {
90 | "consumer_key_code": "display_brightness_increment"
91 | }
92 | ]
93 | },
94 | {
95 | "from": {
96 | "key_code": "f3"
97 | },
98 | "to": [
99 | {
100 | "apple_vendor_keyboard_key_code": "mission_control"
101 | }
102 | ]
103 | },
104 | {
105 | "from": {
106 | "key_code": "f4"
107 | },
108 | "to": [
109 | {
110 | "apple_vendor_keyboard_key_code": "spotlight"
111 | }
112 | ]
113 | },
114 | {
115 | "from": {
116 | "key_code": "f5"
117 | },
118 | "to": [
119 | {
120 | "consumer_key_code": "dictation"
121 | }
122 | ]
123 | },
124 | {
125 | "from": {
126 | "key_code": "f6"
127 | },
128 | "to": [
129 | {
130 | "key_code": "f6"
131 | }
132 | ]
133 | },
134 | {
135 | "from": {
136 | "key_code": "f7"
137 | },
138 | "to": [
139 | {
140 | "consumer_key_code": "rewind"
141 | }
142 | ]
143 | },
144 | {
145 | "from": {
146 | "key_code": "f8"
147 | },
148 | "to": [
149 | {
150 | "consumer_key_code": "play_or_pause"
151 | }
152 | ]
153 | },
154 | {
155 | "from": {
156 | "key_code": "f9"
157 | },
158 | "to": [
159 | {
160 | "consumer_key_code": "fast_forward"
161 | }
162 | ]
163 | },
164 | {
165 | "from": {
166 | "key_code": "f10"
167 | },
168 | "to": [
169 | {
170 | "consumer_key_code": "mute"
171 | }
172 | ]
173 | },
174 | {
175 | "from": {
176 | "key_code": "f11"
177 | },
178 | "to": [
179 | {
180 | "consumer_key_code": "volume_decrement"
181 | }
182 | ]
183 | },
184 | {
185 | "from": {
186 | "key_code": "f12"
187 | },
188 | "to": [
189 | {
190 | "consumer_key_code": "volume_increment"
191 | }
192 | ]
193 | }
194 | ],
195 | "name": "Keeb",
196 | "parameters": {
197 | "delay_milliseconds_before_open_device": 1000
198 | },
199 | "selected": true,
200 | "simple_modifications": [
201 | {
202 | "from": {
203 | "key_code": "caps_lock"
204 | },
205 | "to": [
206 | {
207 | "key_code": "escape"
208 | }
209 | ]
210 | },
211 | {
212 | "from": {
213 | "key_code": "escape"
214 | },
215 | "to": [
216 | {
217 | "key_code": "caps_lock"
218 | }
219 | ]
220 | },
221 | {
222 | "from": {
223 | "key_code": "left_option"
224 | },
225 | "to": [
226 | {
227 | "key_code": "left_command"
228 | }
229 | ]
230 | },
231 | {
232 | "from": {
233 | "key_code": "left_command"
234 | },
235 | "to": [
236 | {
237 | "key_code": "left_option"
238 | }
239 | ]
240 | },
241 | {
242 | "from": {
243 | "key_code": "right_option"
244 | },
245 | "to": [
246 | {
247 | "key_code": "right_command"
248 | }
249 | ]
250 | },
251 | {
252 | "from": {
253 | "key_code": "right_command"
254 | },
255 | "to": [
256 | {
257 | "key_code": "right_option"
258 | }
259 | ]
260 | }
261 | ],
262 | "virtual_hid_keyboard": {
263 | "country_code": 0,
264 | "indicate_sticky_modifier_keys_state": true,
265 | "mouse_key_xy_scale": 100
266 | }
267 | },
268 | {
269 | "complex_modifications": {
270 | "parameters": {
271 | "basic.simultaneous_threshold_milliseconds": 50,
272 | "basic.to_delayed_action_delay_milliseconds": 500,
273 | "basic.to_if_alone_timeout_milliseconds": 1000,
274 | "basic.to_if_held_down_threshold_milliseconds": 500,
275 | "mouse_motion_to_scroll.speed": 100
276 | },
277 | "rules": []
278 | },
279 | "devices": [],
280 | "fn_function_keys": [
281 | {
282 | "from": {
283 | "key_code": "f1"
284 | },
285 | "to": [
286 | {
287 | "consumer_key_code": "display_brightness_decrement"
288 | }
289 | ]
290 | },
291 | {
292 | "from": {
293 | "key_code": "f2"
294 | },
295 | "to": [
296 | {
297 | "consumer_key_code": "display_brightness_increment"
298 | }
299 | ]
300 | },
301 | {
302 | "from": {
303 | "key_code": "f3"
304 | },
305 | "to": [
306 | {
307 | "apple_vendor_keyboard_key_code": "mission_control"
308 | }
309 | ]
310 | },
311 | {
312 | "from": {
313 | "key_code": "f4"
314 | },
315 | "to": [
316 | {
317 | "apple_vendor_keyboard_key_code": "spotlight"
318 | }
319 | ]
320 | },
321 | {
322 | "from": {
323 | "key_code": "f5"
324 | },
325 | "to": [
326 | {
327 | "consumer_key_code": "dictation"
328 | }
329 | ]
330 | },
331 | {
332 | "from": {
333 | "key_code": "f6"
334 | },
335 | "to": [
336 | {
337 | "key_code": "f6"
338 | }
339 | ]
340 | },
341 | {
342 | "from": {
343 | "key_code": "f7"
344 | },
345 | "to": [
346 | {
347 | "consumer_key_code": "rewind"
348 | }
349 | ]
350 | },
351 | {
352 | "from": {
353 | "key_code": "f8"
354 | },
355 | "to": [
356 | {
357 | "consumer_key_code": "play_or_pause"
358 | }
359 | ]
360 | },
361 | {
362 | "from": {
363 | "key_code": "f9"
364 | },
365 | "to": [
366 | {
367 | "consumer_key_code": "fast_forward"
368 | }
369 | ]
370 | },
371 | {
372 | "from": {
373 | "key_code": "f10"
374 | },
375 | "to": [
376 | {
377 | "consumer_key_code": "mute"
378 | }
379 | ]
380 | },
381 | {
382 | "from": {
383 | "key_code": "f11"
384 | },
385 | "to": [
386 | {
387 | "consumer_key_code": "volume_decrement"
388 | }
389 | ]
390 | },
391 | {
392 | "from": {
393 | "key_code": "f12"
394 | },
395 | "to": [
396 | {
397 | "consumer_key_code": "volume_increment"
398 | }
399 | ]
400 | }
401 | ],
402 | "name": "MacBook",
403 | "parameters": {
404 | "delay_milliseconds_before_open_device": 1000
405 | },
406 | "selected": false,
407 | "simple_modifications": [],
408 | "virtual_hid_keyboard": {
409 | "country_code": 0,
410 | "indicate_sticky_modifier_keys_state": true,
411 | "mouse_key_xy_scale": 100
412 | }
413 | }
414 | ]
415 | }
416 |
--------------------------------------------------------------------------------
/macOS/.macos-current:
--------------------------------------------------------------------------------
1 | # ------------------------------------------------------------------------------
2 | # /////////////////////////////// macOS Settings ///////////////////////////////
3 | # ------------------------------------------------------------------------------
4 | # Heavily inpired (mostly stolen) from:
5 | # Mathias Bynens - https://github.com/mathiasbynens/dotfiles
6 |
7 | # ------------------------------------------------------------------------------
8 | # * * Device Name
9 | # ------------------------------------------------------------------------------
10 | # Set computer name (as done via System Preferences → Sharing)
11 | sudo scutil --set ComputerName "NewName"
12 | sudo scutil --set LocalHostName "NewName"
13 |
14 | # NOTE: It is generally recommended you don't explicitly change HostName,
15 | # as it is a persistent setting not accessible from the GUI. Doing so may
16 | # require flushing the DNS cache and restarting the computer.
17 | sudo scutil --set HostName "NewName"
18 | # Reset HostName
19 | sudo scutil --set HostName ''
20 | # Flush DNS cache
21 | sudo dscacheutil -flushcache
22 |
23 | # ------------------------------------------------------------------------------
24 | # * * Fix annoyances
25 | # ------------------------------------------------------------------------------
26 | # Disable swoosh animation between Spaces
27 | # NOTE: This can also impact web sites/apps that use animation, and may cause
28 | # the animation to stop working or be disabled entirely.
29 | # System Preferences > Accessibility > Display > Reduce Motion
30 |
31 | # Disable the sound effects on boot
32 | # sudo nvram SystemAudioVolume=" "
33 |
34 | # Expand save panel by default
35 | defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true
36 | defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode2 -bool true
37 |
38 | # Disable the “Are you sure you want to open this application?” dialog
39 | defaults write com.apple.LaunchServices LSQuarantine -bool false
40 |
41 | # Show battery percentage in the menu bar
42 | defaults write com.apple.menuextra.battery ShowPercent YES
43 |
44 | # ------------------------------------------------------------------------------
45 | # * * Trackpad, mouse, keyboard, input, etc
46 | # ------------------------------------------------------------------------------
47 | # Disable automatic capitalization as it’s annoying when typing code
48 | defaults write NSGlobalDomain NSAutomaticCapitalizationEnabled -bool false
49 |
50 | # Disable smart dashes as they’re annoying when typing code
51 | defaults write NSGlobalDomain NSAutomaticDashSubstitutionEnabled -bool false
52 |
53 | # Disable automatic period substitution as it’s annoying when typing code
54 | defaults write NSGlobalDomain NSAutomaticPeriodSubstitutionEnabled -bool false
55 |
56 | # Disable smart quotes as they’re annoying when typing code
57 | defaults write NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled -bool false
58 |
59 | # Trackpad: enable tap to click for this user and for the login screen
60 | defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -bool true
61 | defaults -currentHost write NSGlobalDomain com.apple.mouse.tapBehavior -int 1
62 | defaults write NSGlobalDomain com.apple.mouse.tapBehavior -int 1
63 |
64 | # Disable “natural” (Lion-style) scrolling
65 | defaults write NSGlobalDomain com.apple.swipescrolldirection -bool false
66 |
67 | # Enable full keyboard access for all controls
68 | # (e.g. enable Tab in modal dialogs)
69 | defaults write NSGlobalDomain AppleKeyboardUIMode -int 3
70 |
71 | # Disable press-and-hold for keys in favor of key repeat
72 | defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false
73 |
74 | # Set a blazingly fast keyboard repeat rate (no really, you've been warned)
75 | defaults write NSGlobalDomain KeyRepeat -int 1
76 | defaults write NSGlobalDomain InitialKeyRepeat -int 10
77 |
78 | # ------------------------------------------------------------------------------
79 | # * * Screen
80 | # ------------------------------------------------------------------------------
81 | # Require password immediately after sleep or screen saver begins
82 | defaults write com.apple.screensaver askForPassword -int 1
83 | defaults write com.apple.screensaver askForPasswordDelay -int 0
84 |
85 | # Save screenshots to the desktop
86 | defaults write com.apple.screencapture location -string "${HOME}/Desktop"
87 |
88 | # Save screenshots in PNG format (other options: BMP, GIF, JPG, PDF, TIFF)
89 | defaults write com.apple.screencapture type -string "png"
90 |
91 | # Disable shadow in screenshots
92 | defaults write com.apple.screencapture disable-shadow -bool true
93 |
94 | # ------------------------------------------------------------------------------
95 | # * * Finder
96 | # ------------------------------------------------------------------------------
97 | # Finder: allow quitting via ⌘ + Q; doing so will also hide desktop icons
98 | defaults write com.apple.finder QuitMenuItem -bool true
99 |
100 | # Finder: disable window animations and Get Info animations
101 | defaults write com.apple.finder DisableAllAnimations -bool true
102 |
103 | # Set Desktop as the default location for new Finder windows
104 | # For other paths, use `PfLo` and `file:///full/path/here/`
105 | defaults write com.apple.finder NewWindowTarget -string "PfDe"
106 | defaults write com.apple.finder NewWindowTargetPath -string "file://${HOME}/Desktop/"
107 |
108 | # Show icons for hard drives, servers, and removable media on the desktop
109 | defaults write com.apple.finder ShowExternalHardDrivesOnDesktop -bool true
110 | defaults write com.apple.finder ShowHardDrivesOnDesktop -bool true
111 | defaults write com.apple.finder ShowMountedServersOnDesktop -bool true
112 | defaults write com.apple.finder ShowRemovableMediaOnDesktop -bool true
113 |
114 | # Finder: show hidden files by default
115 | defaults write com.apple.finder AppleShowAllFiles -bool true
116 |
117 | # Finder: show all filename extensions
118 | defaults write NSGlobalDomain AppleShowAllExtensions -bool true
119 |
120 | # Finder: show status bar
121 | defaults write com.apple.finder ShowStatusBar -bool true
122 |
123 | # Finder: show path bar
124 | defaults write com.apple.finder ShowPathbar -bool true
125 |
126 | # Display full POSIX path as Finder window title
127 | defaults write com.apple.finder _FXShowPosixPathInTitle -bool true
128 |
129 | # When performing a search, search the current folder by default
130 | defaults write com.apple.finder FXDefaultSearchScope -string "SCcf"
131 |
132 | # Disable the warning when changing a file extension
133 | defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false
134 |
135 | # Enable spring loading for directories
136 | defaults write NSGlobalDomain com.apple.springing.enabled -bool true
137 |
138 | # Remove the spring loading delay for directories
139 | defaults write NSGlobalDomain com.apple.springing.delay -float 0
140 |
141 | # Avoid creating .DS_Store files on network or USB volumes
142 | defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
143 | defaults write com.apple.desktopservices DSDontWriteUSBStores -bool true
144 |
145 | # Disable disk image verification
146 | defaults write com.apple.frameworks.diskimages skip-verify -bool true
147 | defaults write com.apple.frameworks.diskimages skip-verify-locked -bool true
148 | defaults write com.apple.frameworks.diskimages skip-verify-remote -bool true
149 |
150 | # Automatically open a new Finder window when a volume is mounted
151 | defaults write com.apple.frameworks.diskimages auto-open-ro-root -bool true
152 | defaults write com.apple.frameworks.diskimages auto-open-rw-root -bool true
153 | defaults write com.apple.finder OpenWindowForNewRemovableDisk -bool true
154 |
155 | ## Use list view in all Finder windows by default
156 | ## Four-letter codes for the other view modes: `icnv`, `clmv`, `glyv`
157 | defaults write com.apple.finder FXPreferredViewStyle -string "Nlsv"
158 |
159 | ## Show the ~/Library folder
160 | chflags nohidden ~/Library && xattr -d com.apple.FinderInfo ~/Library
161 |
162 | ## Show the /Volumes folder
163 | sudo chflags nohidden /Volumes
164 |
165 | ## Expand the following File Info panes:
166 | ## “General”, “Open with”, and “Sharing & Permissions”
167 | defaults write com.apple.finder FXInfoPanesExpanded -dict \
168 | General -bool true \
169 | OpenWith -bool true \
170 | Privileges -bool true
171 |
172 | # ------------------------------------------------------------------------------
173 | # * * Dock, Dashboard, and hot corners
174 | # ------------------------------------------------------------------------------
175 | # Change minimize/maximize window effect
176 | defaults write com.apple.dock mineffect -string "scale"
177 |
178 | # Minimize windows into their application’s icon
179 | defaults write com.apple.dock minimize-to-application -bool true
180 |
181 | # Enable spring loading for all Dock items
182 | defaults write com.apple.dock enable-spring-load-actions-on-all-items -bool true
183 |
184 | # Show indicator lights for open applications in the Dock
185 | defaults write com.apple.dock show-process-indicators -bool true
186 |
187 | # Don’t animate opening applications from the Dock
188 | defaults write com.apple.dock launchanim -bool false
189 |
190 | # Speed up Mission Control animations
191 | defaults write com.apple.dock expose-animation-duration -float 0.1
192 |
193 | # Don’t group windows by application in Mission Control
194 | # (i.e. use the old Exposé behavior instead)
195 | defaults write com.apple.dock expose-group-by-app -bool false
196 |
197 | # Remove the auto-hiding Dock delay
198 | defaults write com.apple.dock autohide-delay -float 0
199 | # Remove the animation when hiding/showing the Dock
200 | defaults write com.apple.dock autohide-time-modifier -float 0
201 |
202 | # Automatically hide and show the Dock
203 | defaults write com.apple.dock autohide -bool true
204 |
205 | # Don’t show recent applications in Dock
206 | defaults write com.apple.dock show-recents -bool false
207 |
208 | # ------------------------------------------------------------------------------
209 | # * * iTerm
210 | # ------------------------------------------------------------------------------
211 | # Don’t display the annoying prompt when quitting iTerm
212 | defaults write com.googlecode.iterm2 PromptOnQuit -bool false
213 |
214 | # ------------------------------------------------------------------------------
215 | # * * Time Machine
216 | # ------------------------------------------------------------------------------
217 | # Prevent Time Machine from prompting to use new hard drives as backup volume
218 | defaults write com.apple.TimeMachine DoNotOfferNewDisksForBackup -bool true
219 |
220 | # Disable local Time Machine backups
221 | # hash tmutil &> /dev/null && sudo tmutil disablelocal
222 |
223 | # ------------------------------------------------------------------------------
224 | # * * Energy Saving
225 | # ------------------------------------------------------------------------------
226 | # Disable machine sleep while charging
227 | sudo pmset -c sleep 0
228 |
229 | # Enable lid wakeup
230 | sudo pmset -a lidwake 1
231 |
232 | # Restart automatically on power loss
233 | sudo pmset -a autorestart 1
234 |
235 | # Restart automatically if the computer freezes
236 | sudo systemsetup -setrestartfreeze on
237 |
--------------------------------------------------------------------------------