145 Commits

Author SHA1 Message Date
Michael Housh
6410d07c70 Updated iterm2 profile 2023-09-17 22:13:35 -04:00
9e7b0675cb Added wrapping.nvim to plugins 2023-08-10 21:37:40 -04:00
06a236e8fa Fixed missing comma in plugins.lua 2023-08-10 16:31:05 -04:00
5ae3559d23 Updated nvim-tree config 2023-08-09 18:35:34 -04:00
13b0316b09 Fixed typo in espanso links 2023-05-09 10:37:23 -04:00
b6ad0cae4b Added proposals script 2023-05-03 10:27:13 -04:00
643b10e466 Added more triggers to espanso 2023-05-03 10:14:54 -04:00
6d2129504a Commit to pull from origin 2023-05-03 10:12:27 -04:00
21670bd2e2 wip 2023-04-16 20:35:29 -05:00
4a01415542 Added proposals directory to zsh env 2023-04-04 08:08:43 -04:00
48cffcb315 Added xcode snippets to espanso 2023-03-21 17:03:49 -04:00
d6e400ce67 Added git expansions to espanso 2023-03-17 23:01:38 -04:00
07d45dde36 Updating espanso configuration to new format 2023-03-17 09:00:54 -04:00
969dd4dfe4 Fixed merge conflicts in nvim configuration 2023-03-17 08:06:48 -04:00
b0c807728a Nvim and tmux changes 2023-03-17 08:02:42 -04:00
1b28706a54 Updated espanso config 2023-03-16 21:16:16 -04:00
8cc13e5aa6 Updated espanso config 2023-03-16 21:14:50 -04:00
116837b23e Updated espanso config 2023-03-16 21:06:32 -04:00
9f7613e190 Added more iterm config 2023-03-14 18:24:31 -04:00
23f99e71bb Updated nvim config 2023-03-13 18:44:20 -04:00
15fe3f52a9 Updated tmux configuration 2023-03-12 23:03:35 -04:00
80a28fded6 Updates to nvim configuration 2023-03-12 19:07:27 -04:00
31f7251095 Updated nvim config 2023-03-11 14:55:17 -05:00
2e63b3bba9 Updated nvim configuration 2023-03-11 14:46:10 -05:00
4528c89adf Nvim updates 2023-03-11 11:28:57 -05:00
fedae4bbe8 Added default branch name to git config 2023-03-10 11:06:45 -05:00
45b9e65d9c Added app-dir override for make commands 2023-03-07 12:49:15 -05:00
c5531d2460 Added app-dir override for make commands 2023-03-07 12:40:04 -05:00
064fb8591d Updated makefile 2023-03-07 11:22:34 -05:00
e6f827f481 Test dots 2023-03-06 22:04:15 -05:00
5e27d455a8 Fixed makefile on full install 2023-03-06 18:10:39 -05:00
ab0a40c3c1 Removed old brewfiles and installation scripts 2023-03-06 17:48:16 -05:00
550b67e68b Updated README 2023-03-06 17:26:49 -05:00
ab49116f7a Wip 2023-03-06 16:45:27 -05:00
28502e425b Wip 2023-03-06 16:40:41 -05:00
c9f7c105b5 Added todos 2023-03-06 15:48:32 -05:00
9d9816f43f Update brews 2023-03-06 11:55:45 -05:00
2d73822810 Updated gitignore to ingnore zsh history 2023-03-06 11:54:04 -05:00
726975d739 Removed some items from brewfiles 2023-03-06 08:34:45 -05:00
6be754d45d wip 2023-03-05 21:11:56 -05:00
8524efb765 wip 2023-03-05 14:37:02 -05:00
5b8b912844 wip 2023-03-04 16:13:06 -05:00
45d1db84c1 wip 2023-03-04 16:03:56 -05:00
cd8c6a7c04 wip 2023-03-04 15:37:13 -05:00
d88697f1a7 wip 2023-03-04 15:11:14 -05:00
47e239d7b2 wip 2023-03-04 15:02:51 -05:00
44f59251a6 wip 2023-03-04 14:31:56 -05:00
b6cc5df5e3 wip 2023-03-04 14:23:15 -05:00
f90b8f6913 wip 2023-03-04 14:21:41 -05:00
6da046a8e5 wip 2023-03-04 14:12:21 -05:00
5a44ebff88 wip 2023-03-04 11:57:58 -05:00
be4629662d wip 2023-03-04 11:21:17 -05:00
84ce050539 Added czets alias to quickly switch to my Zettlekasten directory 2023-03-02 16:35:38 -05:00
9966d8cc98 Updated vimrc with json formatting 2023-02-28 21:14:40 -05:00
9cfe3e33a1 Updated iterm profile 2023-02-26 10:42:16 -05:00
ed0fad722c added custom clean-derived-data for mac-mini 2023-02-16 17:33:23 -05:00
2d12e3f09a Fixed zshrc-local operation 2023-02-15 08:30:09 -05:00
957ee2d2fa Updated some scripts and configuration 2023-02-14 21:06:28 -05:00
689d0ba29e added clean-derived-data script 2023-02-07 15:37:34 -05:00
bc8ce6aa60 Fixed typo in vimrc 2022-02-25 14:33:19 -05:00
8329e2b32f Fixed typo in vimrc 2022-02-25 14:32:17 -05:00
acf7afd16c Added haasd script 2022-02-25 14:24:56 -05:00
e2362b22f0 Added markdown filetype to vim 2022-02-24 22:06:39 -05:00
7463a77093 Added haasp script 2022-02-24 16:37:48 -05:00
6b822772a5 Added haasz script 2022-02-23 21:32:13 -05:00
68043e29b6 Added haas to zshrc 2022-02-23 21:15:55 -05:00
672d50ddb1 Updated cd path 2022-02-11 18:40:01 -05:00
bd56bfa676 Added the -a flag to the gcm alias 2022-01-25 19:55:25 -05:00
b0c8901b05 Added hxzet command 2022-01-21 17:04:01 -05:00
a4ae5600d6 Added pzet command 2022-01-19 13:45:19 -05:00
55db0132a7 Updated cd-path 2022-01-19 09:48:33 -05:00
2b5726166b Updated cd-path 2022-01-19 09:46:01 -05:00
eeddf4454d Updated swift-zet commands 2022-01-19 09:32:09 -05:00
e6c7e49226 Added swift-zet to brewfile 2022-01-14 15:31:25 -05:00
31652a3fae Updated hcpn script and added hcpn zet config 2022-01-14 15:29:49 -05:00
41cf9345e5 Added public zet configuration 2022-01-14 14:51:31 -05:00
ac03198f70 Added scripts and updates to vimrc and zshrc 2022-01-14 14:35:07 -05:00
500c648c5b Update zet script 2022-01-05 20:41:06 -05:00
1c18e500f4 Update to pull 2022-01-05 18:17:01 -05:00
e5dae43c66 Added zet command 2022-01-05 16:59:04 -05:00
8f4dbca52d Added ZETDIR 2022-01-05 15:45:43 -05:00
f0268388f8 Updated hcpn script to commit the created note. 2022-01-05 10:02:08 -05:00
91de940171 Updated espanso email expansions 2022-01-05 08:45:50 -05:00
d85d10f1eb Added hcpn script 2022-01-04 17:17:22 -05:00
1cf65faff0 Added espanso setup script 2022-01-04 10:08:05 -05:00
59e96d3e57 Added espanso setup script 2022-01-04 10:07:18 -05:00
90223c55ee Added espanso setup script 2022-01-04 09:58:22 -05:00
8eee972eeb Updated setup script for the git directory 2022-01-03 09:44:26 -05:00
3892af26ff Updated setup script for the git directory 2022-01-03 09:42:16 -05:00
8b6aef9aee Added termcolors script 2022-01-02 20:22:36 -05:00
5fc94f0cb8 Update nvim setup script 2022-01-01 15:11:01 -05:00
051ea52172 Updated zsh setup script 2022-01-01 14:48:25 -05:00
a26ba5610c Updated tmux setup script 2022-01-01 14:20:31 -05:00
95d919811f Working on install script(s) 2022-01-01 12:45:06 -05:00
da08e4eabe Working on install script(s) 2022-01-01 12:44:25 -05:00
df56ba2e4d Zsh setup script and organization 2021-12-31 19:26:07 -05:00
4b4fd93cc7 Updated git setup 2021-12-31 17:57:15 -05:00
Michael
dfe1338084 Updated gitignore 2021-12-31 17:19:37 -05:00
Michael
45c4310798 Working on install script(s) 2021-12-31 17:14:10 -05:00
Michael
d6ab348a40 Working on install script(s) 2021-12-31 16:43:37 -05:00
a720f97df9 Making install scripts instead of stow 2021-12-31 16:11:51 -05:00
19d649da39 Updates to vimrc 2021-12-31 15:41:33 -05:00
9b10825aa0 Working on vim settings 2021-12-31 14:04:23 -05:00
8841d92e87 Working on cleaning up zshrc and aliases 2021-12-31 10:14:41 -05:00
79e085e9bf Added mkcd 2021-12-30 22:25:47 -05:00
b380cb1190 Cleaned up some scripts 2021-12-30 20:55:40 -05:00
670554b369 Cleaned up launch agent install script 2021-12-30 18:23:15 -05:00
1deab50401 Working on launch agents 2021-12-30 17:18:10 -05:00
5ba356655a Added work documents directory to shell environment 2021-12-30 16:07:33 -05:00
242ee6055e Removed some aliases 2021-12-30 14:44:35 -05:00
3b8e7e024a Fixed type in .zshrc 2021-12-30 12:54:48 -05:00
0f07b4610a Moved macOS setup script 2021-12-30 12:34:33 -05:00
7471d09afb Added default settings from macOS and added clean_screenshots script 2021-12-30 12:22:32 -05:00
6404ce4bb8 Added more environment variables and dmg script 2021-12-30 10:40:47 -05:00
0623aad631 Working on link_apps script 2021-12-29 23:25:36 -05:00
86098a7116 Added git user variable 2021-12-28 17:01:16 -05:00
71bb23e54c Added license and certificate of origin 2021-12-28 16:58:11 -05:00
28c02229b8 Added vic script 2021-12-28 16:47:34 -05:00
f9892ee952 Added some scripts 2021-12-28 15:20:30 -05:00
226e07f501 Cleaning up zshrc 2021-12-28 11:49:03 -05:00
0ee37b0a66 Fixed merge conflicts 2021-12-27 18:32:56 -05:00
c33cb65caf Added some scripts for lynx 2021-12-27 16:42:59 -05:00
2e012d8930 Added some scripts and figlet 2021-12-27 15:55:23 -05:00
083920aa09 Fixed tmux errors 2021-12-27 14:23:54 -05:00
cf5521aee2 Fixed zsh errors on M1 2021-12-27 13:01:59 -05:00
afb17d1f4e Added more text expansions and enabled vi mode in zsh 2021-12-27 11:48:05 -05:00
2d36d7326d Added espanso install script 2021-12-27 10:33:59 -05:00
1cbf56c925 Added espanso - text expander 2021-12-27 10:12:47 -05:00
489c9462cf Added scripts folder 2021-12-26 15:33:11 -05:00
375fb12359 Set base index of windows to start at 1 in tmux 2021-12-25 16:52:05 -05:00
1e2329e3d8 Added tmux and moved pure to brew 2021-12-24 17:40:15 -05:00
f22005c87c Added homebrew eval to zsh 2021-12-24 13:52:57 -05:00
af4eeab9c4 Added zsh completions directory 2021-12-22 11:02:48 -05:00
fe394ac122 Added git push keymapping 2021-12-19 13:32:52 -05:00
4186430c4e Updated keymaps 2021-12-19 13:26:53 -05:00
3e6c7e8281 Added swift language server 2021-12-19 13:12:11 -05:00
42bb38715a Added home assistant to app-store apps 2021-12-15 20:16:50 -05:00
763607dc6a Updated aliases 2021-12-15 13:29:38 -05:00
955f28957d Updated aliases 2021-12-15 11:25:09 -05:00
98fe795dd0 Added more git aliases 2021-12-15 11:11:23 -05:00
d93226021d Merge branch 'develop' 2021-12-15 11:03:59 -05:00
abf1103f62 Fixed merge conflict 2021-12-15 08:22:58 -05:00
1399fcbe26 Added rectangle to casks 2021-12-15 08:14:21 -05:00
0d141f94f9 Removed zsh_sessions from git 2021-12-15 08:12:23 -05:00
306fbd4fee Added fzf to nvim and a few zsh aliases 2021-12-14 21:11:27 -05:00
91 changed files with 2433 additions and 3311 deletions

5
.gitignore vendored
View File

@@ -5,6 +5,9 @@
**/.zcompdump* **/.zcompdump*
**/.zcompdump **/.zcompdump
**/.zcompcache **/.zcompcache
zsh/.config/zsh/history **/history
**/.zsh_history **/.zsh_history
**/.zsh_sessions **/.zsh_sessions
**/completions/*
**/.netrwhist
**/.zshrc-local

View File

@@ -2,6 +2,10 @@
^/Brewfile* ^/Brewfile*
^/README.* ^/README.*
^/LICENSE.* ^/LICENSE.*
^/LaunchAgents*
\.git \.git
\.gitignore \.gitignore
\setup*
/scripts/install-espanso-packages

36
DOC Normal file
View File

@@ -0,0 +1,36 @@
Developer Certificate of Origin
Version 1.1
Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129
Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.
Developer's Certificate of Origin 1.1
By making a contribution to this project, I certify that:
(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or
(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or
(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.
(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.

201
LICENSE Normal file
View File

@@ -0,0 +1,201 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "{}"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright 2021 Michael Housh
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

View File

@@ -1,44 +1,35 @@
BREWPATH ?= /opt/homebrew/bin
BREW = $(BREWPATH)/brew
DOTS = $(BREWPATH)/dots
APPDIR ?= /Applications
# This does not work inside of a make command.
bootstrap-homebrew: bootstrap-homebrew:
xcode-select --install | true xcode-select --install || true
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" source "$(PWD)/scripts/install-brew.sh"
chmod -R go-w $(brew --prefix)
bootstrap-brews: # Install the dots application manager.
@brew bundle \ install-dots:
--no-lock \ "$(BREW)" tap m-housh/formula
--cleanup \ "$(BREW)" install dots
--debug \
--file "$(PWD)/macOS/.config/macOS/Brewfile"
bootstrap-casks: bootstrap-minimal: bootstrap-homebrew install-dots
@brew bundle \ "$(DOTS)" install --minimal "$(APPDIR)"
--no-lock \
--cleanup \
--debug \
--file "$(PWD)/macOS/.config/macOS/Casks.Brewfile"
bootstrap-logitech: bootstrap: bootstrap-homebrew install-dots
@curl \ "$(DOTS)" install --full "$(APPDIR)"
--output ~/Downloads/logi-options.zip \
https://download01.logi.com/web/ftp/pub/techsupport/options/options_installer.zip
bootstrap-amazon-workdocs: # make a local zsh configuration file, to extend
@curl \ # the normal .zshrc for configuration that is only
--output ~/Downloads/AmazonWorkDocsDrive.pkg \ # relevant on the local machine.
https://d3f2hupz96ggz3.cloudfront.net/mac/AmazonWorkDocsDrive.pkg zshrc-local:
# check if a file already exists or not and create it if not.
test -f "$(PWD)/zsh/config/.zshrc-local" \
|| echo "#!/usr/bin/env zsh" > "$(PWD)/zsh/config/.zshrc-local"
# add symlink to appropriate location if doesn't exist.
test -L "$(HOME)/.config/zsh/.zshrc-local" \
|| ln -sfv "$(PWD)/zsh/config/.zshrc-local" "$(HOME)/.config/zsh/"
# open the file to edit.
vim "$(PWD)/zsh/config/.zshrc-local"
bootstrap-app-store: default: bootstrap
@brew bundle \
--no-lock \
--cleanup \
--debug \
--file "$(PWD)/macOS/.config/macOS/AppStore.Brewfile"
bootstrap-non-brews: bootstrap-logitech bootstrap-amazon-workdocs
stow:
@stow --stow --verbose --target ~ */
# Order matters, need to install home-brew first then formula
bootstrap: bootstrap-homebrew bootstrap-brews bootstrap-casks stow bootstrap-non-brews bootstrap-app-store
open ~/Downloads

109
README.md
View File

@@ -1,18 +1,36 @@
# My Dotfiles # My Dotfiles
This is my repository for learning dotfiles. This is a repository for my dotfiles. Be warned that these may often change and
that the installation documentation may not always be correct as things
progress. In general the setup process is something that is only done when
a new machine is purchased or I feel like testing in a virtual machine (which
does not happen often). It is helpful to have an understanding of what these
commands do on your own.
In general no pull-requests or changes will be accepted, however you can
generate an issue if you find a problem.
It currently will install homebrew and the following homebrew formula. It currently will install homebrew and the following homebrew formula.
Most of the functionality is contained in the
[dots](https://github.com/m-housh/dots) project, that is a companion to manage
the dotfiles, which expects the dotfiles directory to be at `~/.dotfiles`.
``` ```
fd fd
figlet
gh
git git
httpie
jq
mas mas
neovim pure
node node
ripgrep ripgrep
stow
swift-format swift-format
swift-zet
tmux
vim
zsh zsh
zsh-completions zsh-completions
``` ```
@@ -21,12 +39,12 @@ It will also install the following homebrew casks in the `~/Applications` direct
``` ```
docker docker
espanso
google-chrome google-chrome
iterm2 iterm2
microsoft-teams onyx
obs rapid-api
paw rectangle
sketchup-pro
``` ```
And the following fonts. And the following fonts.
@@ -39,17 +57,12 @@ font-inconsolata-nerd-font
The following applications will be installed from the macOS app store. The following applications will be installed from the macOS app store.
``` ```
Developer
Home Assistant
pwSafe pwSafe
Xcode Xcode
``` ```
The following non-app-store applications will be downloaded for later installation / setup. These will be placed in `~/Downloads`
```
Logi Options # logitech mouse / keyboard settings
AmazonWorkDocsDrive
```
## Installation ## Installation
Clone the repository. Clone the repository.
@@ -59,8 +72,6 @@ git clone https://m-housh/dotfiles.git ~/.dotfiles && \
cd ~/.dotfiles cd ~/.dotfiles
``` ```
The Makefile includes commands to install dependencies andlink the configuration using `gnu-stow`.
On a fresh system run the following command from the dotfiles root. On a fresh system run the following command from the dotfiles root.
``` ```
@@ -72,53 +83,45 @@ This start by installing homebrew, then install the required homebrew formulas a
applications from the `App Store`. When the bootstrap command is done it will open up the `~/Downloads` folder applications from the `App Store`. When the bootstrap command is done it will open up the `~/Downloads` folder
for the few applications that get downloaded from the internet, so that you can finish the installation of those applications. for the few applications that get downloaded from the internet, so that you can finish the installation of those applications.
### Minimal Setup
If you would like to just setup minimal stuff, link dotfiles, and install brews.
Then you can run the following command.
```bash
make bootstrap-minimal
```
## To set macOS settings
```bash
source scripts/setup_defaults
```
## Post Installation ## Post Installation
After everything has finished up, you will be able to open `iTerm2` and load the profile which should now be symlinked After everything has finished up, you will be able to open `iTerm2` and load
to `~/.config/macOS/iterm/profile.json` the profile which should now be symlinked to `~/.config/macOS/iterm/profile.json`
You will also want to open `neovim` and run `:PackerSync` or `:PackerInstall` to download all the `neovim` plugins.
## Make commands ## Make commands
It is also possible to not do the full bootstrapping. If you would only like to install homebrew (without any formula or casks) then you can run the following command. It is also possible to not do the full bootstrapping. If you would only like
to install homebrew (without any formula or casks) then you can run the following
command.
``` ```
make bootstrap-homebrew make bootstrap-homebrew
``` ```
Once homebrew is installed, if you'd like to install the homebrew formula (located in `macOS/.config/macOS/Brewfile`) then you can run the following command. ## Other Make Commands
``` If you would like to setup any specific `zsh` configuration that is only for
make bootstrap-brews the local machine then you can run the following command.
```bash
make zshrc-local
``` ```
To install homebrew casks (located in `macOS/.config/macOS/Casks.Brewfile`) then you can run the following command. This will generate and symlink a file that you can use to extend the default
`zshrc` configuration. In general, I use this to set custom location for
``` homebrew casks to be installed on certain machines.
make bootstrap-casks
```
To symlink the configuration files only then you can run.
```
make stow
```
To download the logitech options application and place in your `~/Downloads` folder, you can run.
```
make bootstrap-logitech
```
To download the amazon workdocs drive installer and place in your `~/Downloads` folder, you can run.
```
make bootstrap-amazon-workdocs
```
And finally to download the app store applications run.
```
make bootstrap-app-store
```

4
TODO.md Normal file
View File

@@ -0,0 +1,4 @@
# TODO
- Remove brewfiles and use the `dots` app instead.
- Add helix to `dots` app.

View File

@@ -0,0 +1,40 @@
# espanso configuration file
# For a complete introduction, visit the official docs at: https://espanso.org/docs/
# You can use this file to define the global configuration options for espanso.
# These are the parameters that will be used by default on every application,
# but you can also override them on a per-application basis.
# To make customization easier, this file contains some of the commonly used
# parameters. Feel free to uncomment and tune them to fit your needs!
# --- Toggle key
# Customize the key used to disable and enable espanso (when double tapped)
# Available options: CTRL, SHIFT, ALT, CMD, OFF
# You can also specify the key variant, such as LEFT_CTRL, RIGHT_SHIFT, etc...
# toggle_key: ALT
# You can also disable the toggle key completely with
# toggle_key: OFF
# --- Injection Backend
# Espanso supports multiple ways of injecting text into applications. Each of
# them has its quirks, therefore you may want to change it if you are having problems.
# By default, espanso uses the "Auto" backend which should work well in most cases,
# but you may want to try the "Clipboard" or "Inject" backend in case of issues.
# backend: Clipboard
# --- Auto-restart
# Enable/disable the config auto-reload after a file change is detected.
# auto_restart: false
# --- Clipboard threshold
# Because injecting long texts char-by-char is a slow operation, espanso automatically
# uses the clipboard if the text is longer than 'clipboard_threshold' characters.
# clipboard_threshold: 100
# For a list of all the available options, visit the official docs at: https://espanso.org/docs/

View File

@@ -0,0 +1,5 @@
# Xcode specific configuration.
filter_exec: "Xcode"
extra_includes:
- "../match/_xcode_snippets.yml"

View File

@@ -0,0 +1,13 @@
# These are Xcode specific matches.
matches:
- trigger: ":struct"
replace: |
struct $|$ {
}
- trigger: ":pstruct"
replace: |
public struct $|$ {
}

View File

@@ -0,0 +1,16 @@
# espanso match file
# For a complete introduction, visit the official docs at: https://espanso.org/docs/
# You can use this file to define the base matches (aka snippets)
# that will be available in every application when using espanso.
# Matches are substitution rules: when you type the "trigger" string
# it gets replaced by the "replace" string.
imports:
- "./date.yml"
- "./email.yml"
- "./housecallpro.yml"
- "./links.yml"

View File

@@ -0,0 +1,19 @@
matches:
# Print the current date
- trigger: ":date"
replace: "{{mydate}}"
vars:
- name: mydate
type: date
params:
format: "%m/%d/%Y"
# Iso-seconds
- trigger: ":isosec"
replace: "{{output}}"
vars:
- name: output
type: shell
params:
cmd: "isosec"

View File

@@ -0,0 +1,11 @@
# Email configuration.
matches:
# Email Addresses
- trigger: ":@hhe"
replace: "mhoush@houshhomeenergy.com"
- trigger: ":@service"
replace: "service@houshhomeenergy.com"
- trigger: ":@me"
replace: "michael@mhoush.com"

View File

@@ -0,0 +1,4 @@
matches:
- trigger: ":gcl"
replace: "git clone"

View File

@@ -0,0 +1,12 @@
# Commonly used in house call pro.
matches:
# House Call Pro
- trigger: ":cc"
replace: "Client Concern"
- trigger: ":diag"
replace: "Diagnostic"
- trigger: ":wd"
replace: "Work Description"
- trigger: ":wp" # I often mistype for this.
replace: "Work Description"

View File

@@ -0,0 +1,31 @@
# This file includes common url's / links.
matches:
# Github
- trigger: ":gh"
replace: "https://github.com"
# Personal Github
- trigger: ":git"
replace: "https://github.com/m-housh"
- trigger: ":pf"
replace: "https://pointfree.co"
- trigger: ":gpf"
replace: "https://github.com/pointfreeco"
- trigger: ":tca"
replace: "https://github.com/pointfreeco/swift-composable-architecture"
# Youtube
- trigger: ":yt"
replace: "https://www.youtube.com/channel/UCb58SeURd5bObfTiL0KoliA"
# Discord
- trigger: ":discord"
replace: "https://discord.gg/W3p5GJfjry"
# TruTechTools
- trigger: ":ttt"
replace: "https://trutechtools.com"

View File

@@ -1,6 +0,0 @@
[core]
excludesfile = ~/.config/git/gitignore
[user]
name = Michael Housh
email = mhoush@houshhomeenergy.com

14
git/git/config Normal file
View File

@@ -0,0 +1,14 @@
[core]
excludesfile = ~/.config/git/gitignore
[init]
defaultBranch = main
[user]
name = Michael Housh
email = mhoush@houshhomeenergy.com
[color]
ui = true
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true

15
helix/config.toml Normal file
View File

@@ -0,0 +1,15 @@
theme = "nightfox"
[editor]
line-number = "relative"
cursorline = true
color-modes = true
shell = ["zsh", "-c"]
[editor.cursor-shape]
insert = "bar"
normal = "block"
select = "underline"
[editor.file-picker]
hidden = false

View File

@@ -0,0 +1,718 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>AllowClipboardAccess</key>
<true/>
<key>Default Bookmark Guid</key>
<string>A30A702C-1CC2-4C2A-A29F-505BC017C0A6</string>
<key>DoubleClickPerformsSmartSelection</key>
<true/>
<key>EnableProxyIcon</key>
<false/>
<key>HapticFeedbackForEsc</key>
<false/>
<key>HotkeyMigratedFromSingleToMulti</key>
<true/>
<key>IRMemory</key>
<integer>4</integer>
<key>New Bookmarks</key>
<array>
<dict>
<key>ASCII Anti Aliased</key>
<true/>
<key>Ambiguous Double Width</key>
<false/>
<key>Ansi 0 Color</key>
<dict>
<key>Blue Component</key>
<string>0</string>
<key>Green Component</key>
<string>0</string>
<key>Red Component</key>
<string>0</string>
</dict>
<key>Ansi 1 Color</key>
<dict>
<key>Blue Component</key>
<string>0</string>
<key>Green Component</key>
<string>0</string>
<key>Red Component</key>
<string>0.8</string>
</dict>
<key>Ansi 10 Color</key>
<dict>
<key>Blue Component</key>
<string>0.2039216</string>
<key>Green Component</key>
<string>0.8862745</string>
<key>Red Component</key>
<string>0.5411764999999999</string>
</dict>
<key>Ansi 11 Color</key>
<dict>
<key>Blue Component</key>
<string>0.3098039</string>
<key>Green Component</key>
<string>0.9137255</string>
<key>Red Component</key>
<string>0.9882353</string>
</dict>
<key>Ansi 12 Color</key>
<dict>
<key>Blue Component</key>
<string>0.8117647</string>
<key>Green Component</key>
<string>0.6235294</string>
<key>Red Component</key>
<string>0.4470588</string>
</dict>
<key>Ansi 13 Color</key>
<dict>
<key>Blue Component</key>
<string>0.6588235</string>
<key>Green Component</key>
<string>0.4980392</string>
<key>Red Component</key>
<string>0.6784314</string>
</dict>
<key>Ansi 14 Color</key>
<dict>
<key>Blue Component</key>
<string>0.8862745</string>
<key>Green Component</key>
<string>0.8862745</string>
<key>Red Component</key>
<string>0.2039216</string>
</dict>
<key>Ansi 15 Color</key>
<dict>
<key>Blue Component</key>
<string>0.9254902</string>
<key>Green Component</key>
<string>0.9333333</string>
<key>Red Component</key>
<string>0.9333333</string>
</dict>
<key>Ansi 2 Color</key>
<dict>
<key>Blue Component</key>
<string>0.02352941</string>
<key>Green Component</key>
<string>0.6039215999999999</string>
<key>Red Component</key>
<string>0.3058824</string>
</dict>
<key>Ansi 3 Color</key>
<dict>
<key>Blue Component</key>
<string>0</string>
<key>Green Component</key>
<string>0.627451</string>
<key>Red Component</key>
<string>0.7686275</string>
</dict>
<key>Ansi 4 Color</key>
<dict>
<key>Blue Component</key>
<string>0.6431373</string>
<key>Green Component</key>
<string>0.3960784</string>
<key>Red Component</key>
<string>0.2039216</string>
</dict>
<key>Ansi 5 Color</key>
<dict>
<key>Blue Component</key>
<string>0.4823529</string>
<key>Green Component</key>
<string>0.3137255</string>
<key>Red Component</key>
<string>0.4588235</string>
</dict>
<key>Ansi 6 Color</key>
<dict>
<key>Blue Component</key>
<string>0.6039215999999999</string>
<key>Green Component</key>
<string>0.5960785</string>
<key>Red Component</key>
<string>0.02352941</string>
</dict>
<key>Ansi 7 Color</key>
<dict>
<key>Blue Component</key>
<string>0.8117647</string>
<key>Green Component</key>
<string>0.8431373</string>
<key>Red Component</key>
<string>0.827451</string>
</dict>
<key>Ansi 8 Color</key>
<dict>
<key>Blue Component</key>
<string>0.3254902</string>
<key>Green Component</key>
<string>0.3411765</string>
<key>Red Component</key>
<string>0.3333333</string>
</dict>
<key>Ansi 9 Color</key>
<dict>
<key>Blue Component</key>
<string>0.1607843</string>
<key>Green Component</key>
<string>0.1607843</string>
<key>Red Component</key>
<string>0.9372549</string>
</dict>
<key>BM Growl</key>
<true/>
<key>Background Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.10000000000000001</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>0.10000000000000001</real>
<key>Red Component</key>
<real>0.10000000000000001</real>
</dict>
<key>Background Image Location</key>
<string></string>
<key>Badge Color</key>
<dict>
<key>Alpha Component</key>
<real>0.5</real>
<key>Blue Component</key>
<real>0.0</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>0.14910030364990234</real>
<key>Red Component</key>
<real>1</real>
</dict>
<key>Blinking Cursor</key>
<false/>
<key>Blur</key>
<false/>
<key>Bold Color</key>
<dict>
<key>Blue Component</key>
<string>1</string>
<key>Green Component</key>
<string>1</string>
<key>Red Component</key>
<string>1</string>
</dict>
<key>Bound Hosts</key>
<array/>
<key>Character Encoding</key>
<integer>4</integer>
<key>Close Sessions On End</key>
<true/>
<key>Columns</key>
<integer>180</integer>
<key>Command</key>
<string></string>
<key>Cursor Color</key>
<dict>
<key>Blue Component</key>
<string>1</string>
<key>Green Component</key>
<string>1</string>
<key>Red Component</key>
<string>1</string>
</dict>
<key>Cursor Guide Color</key>
<dict>
<key>Alpha Component</key>
<real>0.25</real>
<key>Blue Component</key>
<real>1</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>0.92681378126144409</real>
<key>Red Component</key>
<real>0.70214027166366577</real>
</dict>
<key>Cursor Text Color</key>
<dict>
<key>Blue Component</key>
<string>0</string>
<key>Green Component</key>
<string>0</string>
<key>Red Component</key>
<string>0</string>
</dict>
<key>Custom Command</key>
<string>No</string>
<key>Custom Directory</key>
<string>No</string>
<key>Default Bookmark</key>
<string>No</string>
<key>Description</key>
<string>Default</string>
<key>Disable Window Resizing</key>
<true/>
<key>Flashing Bell</key>
<false/>
<key>Foreground Color</key>
<dict>
<key>Blue Component</key>
<string>1</string>
<key>Green Component</key>
<string>1</string>
<key>Red Component</key>
<string>1</string>
</dict>
<key>Guid</key>
<string>A30A702C-1CC2-4C2A-A29F-505BC017C0A6</string>
<key>Horizontal Spacing</key>
<real>1</real>
<key>Idle Code</key>
<integer>0</integer>
<key>Jobs to Ignore</key>
<array>
<string>rlogin</string>
<string>ssh</string>
<string>slogin</string>
<string>telnet</string>
</array>
<key>Keyboard Map</key>
<dict>
<key>0x2d-0x40000</key>
<dict>
<key>Action</key>
<integer>11</integer>
<key>Text</key>
<string>0x1f</string>
</dict>
<key>0x32-0x40000</key>
<dict>
<key>Action</key>
<integer>11</integer>
<key>Text</key>
<string>0x00</string>
</dict>
<key>0x33-0x40000</key>
<dict>
<key>Action</key>
<integer>11</integer>
<key>Text</key>
<string>0x1b</string>
</dict>
<key>0x34-0x40000</key>
<dict>
<key>Action</key>
<integer>11</integer>
<key>Text</key>
<string>0x1c</string>
</dict>
<key>0x35-0x40000</key>
<dict>
<key>Action</key>
<integer>11</integer>
<key>Text</key>
<string>0x1d</string>
</dict>
<key>0x36-0x40000</key>
<dict>
<key>Action</key>
<integer>11</integer>
<key>Text</key>
<string>0x1e</string>
</dict>
<key>0x37-0x40000</key>
<dict>
<key>Action</key>
<integer>11</integer>
<key>Text</key>
<string>0x1f</string>
</dict>
<key>0x38-0x40000</key>
<dict>
<key>Action</key>
<integer>11</integer>
<key>Text</key>
<string>0x7f</string>
</dict>
<key>0xf700-0x220000</key>
<dict>
<key>Action</key>
<integer>10</integer>
<key>Text</key>
<string>[1;2A</string>
</dict>
<key>0xf700-0x240000</key>
<dict>
<key>Action</key>
<integer>10</integer>
<key>Text</key>
<string>[1;5A</string>
</dict>
<key>0xf700-0x260000</key>
<dict>
<key>Action</key>
<integer>10</integer>
<key>Text</key>
<string>[1;6A</string>
</dict>
<key>0xf700-0x280000</key>
<dict>
<key>Action</key>
<integer>11</integer>
<key>Text</key>
<string>0x1b 0x1b 0x5b 0x41</string>
</dict>
<key>0xf701-0x220000</key>
<dict>
<key>Action</key>
<integer>10</integer>
<key>Text</key>
<string>[1;2B</string>
</dict>
<key>0xf701-0x240000</key>
<dict>
<key>Action</key>
<integer>10</integer>
<key>Text</key>
<string>[1;5B</string>
</dict>
<key>0xf701-0x260000</key>
<dict>
<key>Action</key>
<integer>10</integer>
<key>Text</key>
<string>[1;6B</string>
</dict>
<key>0xf701-0x280000</key>
<dict>
<key>Action</key>
<integer>11</integer>
<key>Text</key>
<string>0x1b 0x1b 0x5b 0x42</string>
</dict>
<key>0xf702-0x220000</key>
<dict>
<key>Action</key>
<integer>10</integer>
<key>Text</key>
<string>[1;2D</string>
</dict>
<key>0xf702-0x240000</key>
<dict>
<key>Action</key>
<integer>10</integer>
<key>Text</key>
<string>[1;5D</string>
</dict>
<key>0xf702-0x260000</key>
<dict>
<key>Action</key>
<integer>10</integer>
<key>Text</key>
<string>[1;6D</string>
</dict>
<key>0xf702-0x280000</key>
<dict>
<key>Action</key>
<integer>11</integer>
<key>Text</key>
<string>0x1b 0x1b 0x5b 0x44</string>
</dict>
<key>0xf703-0x220000</key>
<dict>
<key>Action</key>
<integer>10</integer>
<key>Text</key>
<string>[1;2C</string>
</dict>
<key>0xf703-0x240000</key>
<dict>
<key>Action</key>
<integer>10</integer>
<key>Text</key>
<string>[1;5C</string>
</dict>
<key>0xf703-0x260000</key>
<dict>
<key>Action</key>
<integer>10</integer>
<key>Text</key>
<string>[1;6C</string>
</dict>
<key>0xf703-0x280000</key>
<dict>
<key>Action</key>
<integer>11</integer>
<key>Text</key>
<string>0x1b 0x1b 0x5b 0x43</string>
</dict>
<key>0xf704-0x20000</key>
<dict>
<key>Action</key>
<integer>10</integer>
<key>Text</key>
<string>[1;2P</string>
</dict>
<key>0xf705-0x20000</key>
<dict>
<key>Action</key>
<integer>10</integer>
<key>Text</key>
<string>[1;2Q</string>
</dict>
<key>0xf706-0x20000</key>
<dict>
<key>Action</key>
<integer>10</integer>
<key>Text</key>
<string>[1;2R</string>
</dict>
<key>0xf707-0x20000</key>
<dict>
<key>Action</key>
<integer>10</integer>
<key>Text</key>
<string>[1;2S</string>
</dict>
<key>0xf708-0x20000</key>
<dict>
<key>Action</key>
<integer>10</integer>
<key>Text</key>
<string>[15;2~</string>
</dict>
<key>0xf709-0x20000</key>
<dict>
<key>Action</key>
<integer>10</integer>
<key>Text</key>
<string>[17;2~</string>
</dict>
<key>0xf70a-0x20000</key>
<dict>
<key>Action</key>
<integer>10</integer>
<key>Text</key>
<string>[18;2~</string>
</dict>
<key>0xf70b-0x20000</key>
<dict>
<key>Action</key>
<integer>10</integer>
<key>Text</key>
<string>[19;2~</string>
</dict>
<key>0xf70c-0x20000</key>
<dict>
<key>Action</key>
<integer>10</integer>
<key>Text</key>
<string>[20;2~</string>
</dict>
<key>0xf70d-0x20000</key>
<dict>
<key>Action</key>
<integer>10</integer>
<key>Text</key>
<string>[21;2~</string>
</dict>
<key>0xf70e-0x20000</key>
<dict>
<key>Action</key>
<integer>10</integer>
<key>Text</key>
<string>[23;2~</string>
</dict>
<key>0xf70f-0x20000</key>
<dict>
<key>Action</key>
<integer>10</integer>
<key>Text</key>
<string>[24;2~</string>
</dict>
<key>0xf729-0x20000</key>
<dict>
<key>Action</key>
<integer>10</integer>
<key>Text</key>
<string>[1;2H</string>
</dict>
<key>0xf729-0x40000</key>
<dict>
<key>Action</key>
<integer>10</integer>
<key>Text</key>
<string>[1;5H</string>
</dict>
<key>0xf72b-0x20000</key>
<dict>
<key>Action</key>
<integer>10</integer>
<key>Text</key>
<string>[1;2F</string>
</dict>
<key>0xf72b-0x40000</key>
<dict>
<key>Action</key>
<integer>10</integer>
<key>Text</key>
<string>[1;5F</string>
</dict>
</dict>
<key>Link Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.73422706127166748</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>0.35915294289588928</real>
<key>Red Component</key>
<real>0.0</real>
</dict>
<key>Mouse Reporting</key>
<true/>
<key>Name</key>
<string>mhoush</string>
<key>Non Ascii Font</key>
<string>icomoon 12</string>
<key>Non-ASCII Anti Aliased</key>
<true/>
<key>Normal Font</key>
<string>InconsolataNerdFontCompleteM-Regular 20</string>
<key>Option Key Sends</key>
<integer>0</integer>
<key>Prompt Before Closing 2</key>
<false/>
<key>Right Option Key Sends</key>
<integer>0</integer>
<key>Rows</key>
<integer>60</integer>
<key>Screen</key>
<integer>-1</integer>
<key>Scrollback Lines</key>
<integer>1000</integer>
<key>Selected Text Color</key>
<dict>
<key>Blue Component</key>
<string>0</string>
<key>Green Component</key>
<string>0</string>
<key>Red Component</key>
<string>0</string>
</dict>
<key>Selection Color</key>
<dict>
<key>Blue Component</key>
<string>1</string>
<key>Green Component</key>
<string>0.8353</string>
<key>Red Component</key>
<string>0.7098</string>
</dict>
<key>Send Code When Idle</key>
<false/>
<key>Shortcut</key>
<string></string>
<key>Show Status Bar</key>
<false/>
<key>Silence Bell</key>
<false/>
<key>Sync Title</key>
<false/>
<key>Tags</key>
<array/>
<key>Terminal Type</key>
<string>xterm-256color</string>
<key>Transparency</key>
<real>0.0</real>
<key>Unlimited Scrollback</key>
<false/>
<key>Use Bold Font</key>
<true/>
<key>Use Bright Bold</key>
<true/>
<key>Use Italic Font</key>
<true/>
<key>Use Non-ASCII Font</key>
<false/>
<key>Vertical Spacing</key>
<real>1</real>
<key>Visual Bell</key>
<true/>
<key>Window Type</key>
<integer>0</integer>
<key>Working Directory</key>
<string>/Users/michael</string>
</dict>
</array>
<key>OnlyWhenMoreTabs</key>
<false/>
<key>OpenArrangementAtStartup</key>
<false/>
<key>OpenNoWindowsAtStartup</key>
<false/>
<key>PointerActions</key>
<dict>
<key>Button,1,1,,</key>
<dict>
<key>Action</key>
<string>kContextMenuPointerAction</string>
</dict>
<key>Button,2,1,,</key>
<dict>
<key>Action</key>
<string>kPasteFromClipboardPointerAction</string>
</dict>
<key>Gesture,ThreeFingerSwipeDown,,</key>
<dict>
<key>Action</key>
<string>kPrevWindowPointerAction</string>
</dict>
<key>Gesture,ThreeFingerSwipeLeft,,</key>
<dict>
<key>Action</key>
<string>kPrevTabPointerAction</string>
</dict>
<key>Gesture,ThreeFingerSwipeRight,,</key>
<dict>
<key>Action</key>
<string>kNextTabPointerAction</string>
</dict>
<key>Gesture,ThreeFingerSwipeUp,,</key>
<dict>
<key>Action</key>
<string>kNextWindowPointerAction</string>
</dict>
</dict>
<key>Print In Black And White</key>
<true/>
<key>PromptOnQuit</key>
<false/>
<key>QuitWhenAllWindowsClosed</key>
<true/>
<key>SoundForEsc</key>
<false/>
<key>SwitchPaneModifier</key>
<integer>1</integer>
<key>TabStyleWithAutomaticOption</key>
<integer>5</integer>
<key>VisualIndicatorForEsc</key>
<false/>
<key>kCPKSelectionViewPreferredModeKey</key>
<integer>5</integer>
<key>kCPKSelectionViewShowHSBTextFieldsKey</key>
<false/>
</dict>
</plist>

View File

@@ -1,8 +1,10 @@
{ {
"Ansi 6 Color" : { "Link Color" : {
"Green Component" : "0.5960785", "Red Component" : 0,
"Blue Component" : "0.6039215999999999", "Color Space" : "sRGB",
"Red Component" : "0.02352941" "Blue Component" : 0.73422706127166748,
"Alpha Component" : 1,
"Green Component" : 0.35915294289588928
}, },
"Tags" : [ "Tags" : [
@@ -32,13 +34,9 @@
"Blue Component" : "0.1607843", "Blue Component" : "0.1607843",
"Red Component" : "0.9372549" "Red Component" : "0.9372549"
}, },
"Ansi 5 Color" : { "Horizontal Spacing" : 1,
"Green Component" : "0.3137255", "Right Option Key Sends" : 0,
"Blue Component" : "0.4823529", "Rows" : 60,
"Red Component" : "0.4588235"
},
"Use Non-ASCII Font" : false,
"Rows" : 40,
"Default Bookmark" : "No", "Default Bookmark" : "No",
"Cursor Guide Color" : { "Cursor Guide Color" : {
"Red Component" : 0.70214027166366577, "Red Component" : 0.70214027166366577,
@@ -61,6 +59,7 @@
"slogin", "slogin",
"telnet" "telnet"
], ],
"Show Status Bar" : false,
"Ansi 15 Color" : { "Ansi 15 Color" : {
"Green Component" : "0.9333333", "Green Component" : "0.9333333",
"Blue Component" : "0.9254902", "Blue Component" : "0.9254902",
@@ -89,7 +88,7 @@
"Blue Component" : "1", "Blue Component" : "1",
"Red Component" : "0.7098" "Red Component" : "0.7098"
}, },
"Columns" : 120, "Columns" : 180,
"Idle Code" : 0, "Idle Code" : 0,
"Ansi 13 Color" : { "Ansi 13 Color" : {
"Green Component" : "0.4980392", "Green Component" : "0.4980392",
@@ -108,9 +107,11 @@
"Red Component" : "0" "Red Component" : "0"
}, },
"Background Color" : { "Background Color" : {
"Green Component" : "0", "Red Component" : 0.10000000000000001,
"Blue Component" : "0", "Color Space" : "sRGB",
"Red Component" : "0" "Blue Component" : 0.10000000000000001,
"Alpha Component" : 1,
"Green Component" : 0.10000000000000001
}, },
"Character Encoding" : 4, "Character Encoding" : 4,
"Ansi 11 Color" : { "Ansi 11 Color" : {
@@ -290,7 +291,7 @@
"Color Space" : "sRGB", "Color Space" : "sRGB",
"Blue Component" : 0, "Blue Component" : 0,
"Alpha Component" : 0.5, "Alpha Component" : 0.5,
"Green Component" : 0.14910027384757996 "Green Component" : 0.14910030364990234
}, },
"Scrollback Lines" : 1000, "Scrollback Lines" : 1000,
"Send Code When Idle" : false, "Send Code When Idle" : false,
@@ -316,42 +317,44 @@
"Blue Component" : "1", "Blue Component" : "1",
"Red Component" : "1" "Red Component" : "1"
}, },
"Transparency" : 0.14805401741190161, "Transparency" : 0,
"Ansi 1 Color" : { "Ansi 1 Color" : {
"Green Component" : "0", "Green Component" : "0",
"Blue Component" : "0", "Blue Component" : "0",
"Red Component" : "0.8" "Red Component" : "0.8"
}, },
"Horizontal Spacing" : 1,
"Custom Directory" : "No",
"Ansi 4 Color" : {
"Green Component" : "0.3960784",
"Blue Component" : "0.6431373",
"Red Component" : "0.2039216"
},
"Link Color" : {
"Red Component" : 0,
"Color Space" : "sRGB",
"Blue Component" : 0.73422712087631226,
"Alpha Component" : 1,
"Green Component" : 0.35915297269821167
},
"Ansi 0 Color" : {
"Green Component" : "0",
"Blue Component" : "0",
"Red Component" : "0"
},
"Guid" : "3B878A03-0EF2-4A8C-B1FD-7DEF4A0ABF6F",
"Normal Font" : "InconsolataNerdFontCompleteM-Regular 16",
"Ansi 3 Color" : {
"Green Component" : "0.627451",
"Blue Component" : "0",
"Red Component" : "0.7686275"
},
"Ansi 2 Color" : { "Ansi 2 Color" : {
"Green Component" : "0.6039215999999999", "Green Component" : "0.6039215999999999",
"Blue Component" : "0.02352941", "Blue Component" : "0.02352941",
"Red Component" : "0.3058824" "Red Component" : "0.3058824"
}, },
"Right Option Key Sends" : 0 "Ansi 3 Color" : {
"Green Component" : "0.627451",
"Blue Component" : "0",
"Red Component" : "0.7686275"
},
"Ansi 4 Color" : {
"Green Component" : "0.3960784",
"Blue Component" : "0.6431373",
"Red Component" : "0.2039216"
},
"Ansi 5 Color" : {
"Green Component" : "0.3137255",
"Blue Component" : "0.4823529",
"Red Component" : "0.4588235"
},
"Use Non-ASCII Font" : false,
"Ansi 6 Color" : {
"Green Component" : "0.5960785",
"Blue Component" : "0.6039215999999999",
"Red Component" : "0.02352941"
},
"Normal Font" : "InconsolataNerdFontCompleteM-Regular 20",
"Custom Directory" : "No",
"Ansi 0 Color" : {
"Green Component" : "0",
"Blue Component" : "0",
"Red Component" : "0"
},
"Guid" : "A30A702C-1CC2-4C2A-A29F-505BC017C0A6"
} }

View File

@@ -1,2 +0,0 @@
mas "pwSafe", id: "520993579"
mas "Xcode", id: "497799835"

View File

@@ -1,21 +0,0 @@
tap "homebrew/cask"
tap "homebrew/cask-fonts"
# TODO: Make the application directory a global variable ??
# set arguments for all 'brew install --cask' commands
cask_args appdir: "~/Applications", require_sha: true
# formula
brew "fd" # required for some neovim plugins
brew "git"
brew "mas"
brew "neovim"
brew "node" # required for some LSP servers in neovim
brew "ripgrep"
brew "stow"
brew "swift-format"
brew "zsh"
brew "zsh-completions"
# fonts
cask "font-inconsolata-nerd-font"

View File

@@ -1,12 +0,0 @@
tap "homebrew/cask"
# casks
cask "docker"
cask "google-chrome"
cask "iterm2"
cask "microsoft-teams"
cask "obs"
cask "paw"
cask "rectangle"
cask "sketchup-pro"

View File

@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.micheal.clear-screenshots</string>
<key>ProgramArguments</key>
<array>
<string>sh</string>
<string>-c</string>
<string>/Users/michael/.local/scripts/clear_screenshots</string>
</array>
<key>StartCalendarInterval</key>
<dict>
<key>Day</key>
<integer>1</integer>
<key>Hour</key>
<integer>0</integer>
<key>Minute</key>
<integer>0</integer>
<key>Weekday</key>
<integer>0</integer>
</dict>
<key>UserName</key>
<string>michael</string>
<key>RunAtLoad</key>
<true/>
<key>StandardOutPath</key>
<string>/var/log/com.michael.clear-screenshots.out.log</string>
<key>StandardErrorPath</key>
<string>/var/log/com.michael.clear-screenshots.error.log</string>
</dict>
</plist>

View File

@@ -1,3 +0,0 @@
-- Nightfox
require('nightfox').load('nordfox')

11
nvim/ftplugin/swift.lua Normal file
View File

@@ -0,0 +1,11 @@
local o = vim.opt
local keymap = vim.api.nvim_set_keymap
local default_options = {noremap = true, silent = true}
o.tabstop = 2
o.softtabstop = 2
o.shiftwidth = 2
keymap('n', '<C-b>', '<cmd>!swift build<CR>', default_options)
keymap('n', '<C-T>', '<cmd>!swift test<CR>', default_options)

View File

@@ -13,3 +13,4 @@ vim.api.nvim_exec([[
au FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o au FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o
augroup END augroup END
]], false) ]], false)

View File

@@ -1,6 +1,7 @@
-- Setup nvim-cmp. -- Setup nvim-cmp.
local cmp = require "cmp" local cmp = require "cmp"
local lspkind = require("lspkind") local lspkind = require("lspkind")
local capabilities = require('cmp_nvim_lsp').default_capabilities()
local has_words_before = function() local has_words_before = function()
local line, col = unpack(vim.api.nvim_win_get_cursor(0)) local line, col = unpack(vim.api.nvim_win_get_cursor(0))
@@ -14,6 +15,11 @@ local feedkey = function(key, mode)
mode, true) mode, true)
end end
require'lspconfig'.sourcekit.setup {
capabilities = capabilities
}
lspkind.init({ lspkind.init({
symbol_map = { symbol_map = {
Text = "", Text = "",

View File

@@ -1,3 +1,5 @@
require("mason").setup()
require("mason-lspconfig").setup()
local nvim_lsp = require("lspconfig") local nvim_lsp = require("lspconfig")
-- Use an on_attach function to only map the following keys -- Use an on_attach function to only map the following keys
@@ -15,6 +17,7 @@ local on_attach = function(bufnr)
buf_set_keymap("n", "gd", "<Cmd>lua vim.lsp.buf.definition()<CR>", opts) buf_set_keymap("n", "gd", "<Cmd>lua vim.lsp.buf.definition()<CR>", opts)
buf_set_keymap("n", "K", "<Cmd>lua vim.lsp.buf.hover()<CR>", opts) buf_set_keymap("n", "K", "<Cmd>lua vim.lsp.buf.hover()<CR>", opts)
buf_set_keymap("n", "gi", "<cmd>lua vim.lsp.buf.implementation()<CR>", opts) buf_set_keymap("n", "gi", "<cmd>lua vim.lsp.buf.implementation()<CR>", opts)
buf_set_keymap("n", "gT", vim.lsp.buf.type_definition, opts)
-- buf_set_keymap('n', '<C-k>', '<cmd>lua vim.lsp.buf.signature_help()<CR>', opts) -- buf_set_keymap('n', '<C-k>', '<cmd>lua vim.lsp.buf.signature_help()<CR>', opts)
buf_set_keymap("n", "<space>wa", buf_set_keymap("n", "<space>wa",
"<cmd>lua vim.lsp.buf.add_workspace_folder()<CR>", opts) "<cmd>lua vim.lsp.buf.add_workspace_folder()<CR>", opts)
@@ -29,28 +32,23 @@ local on_attach = function(bufnr)
buf_set_keymap("n", "<space>ca", "<cmd>lua vim.lsp.buf.code_action()<CR>", buf_set_keymap("n", "<space>ca", "<cmd>lua vim.lsp.buf.code_action()<CR>",
opts) opts)
buf_set_keymap("n", "gr", "<cmd>lua vim.lsp.buf.references()<CR>", opts) buf_set_keymap("n", "gr", "<cmd>lua vim.lsp.buf.references()<CR>", opts)
buf_set_keymap("n", "<space>e", buf_set_keymap("n", "<space>e", "<cmd>lua vim.lsp.diagnostic.show_line_diagnostics()<CR>", opts)
"<cmd>lua vim.lsp.diagnostic.show_line_diagnostics()<CR>", buf_set_keymap("n", "[d", "<cmd>lua vim.lsp.diagnostic.goto_prev()<CR>", opts)
opts)
buf_set_keymap("n", "[d", "<cmd>lua vim.lsp.diagnostic.goto_prev()<CR>", buf_set_keymap("n", "]d", "<cmd>lua vim.lsp.diagnostic.goto_next()<CR>", opts)
opts) buf_set_keymap("n", "<space>q", "<cmd>lua vim.lsp.diagnostic.set_loclist()<CR>", opts)
buf_set_keymap("n", "]d", "<cmd>lua vim.lsp.diagnostic.goto_next()<CR>", buf_set_keymap("n", "<space>f", "<cmd>lua vim.lsp.buf.formatting()<CR>", opts)
opts)
buf_set_keymap("n", "<space>q",
"<cmd>lua vim.lsp.diagnostic.set_loclist()<CR>", opts)
buf_set_keymap("n", "<space>f", "<cmd>lua vim.lsp.buf.formatting()<CR>",
opts)
end end
-- Use a loop to conveniently call 'setup' on multiple servers and -- Use a loop to conveniently call 'setup' on multiple servers and
-- map buffer local keybindings when the language server attaches -- map buffer local keybindings when the language server attaches
local capabilities = vim.lsp.protocol.make_client_capabilities() --local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities = require("cmp_nvim_lsp").update_capabilities(capabilities) capabilities = require("cmp_nvim_lsp").default_capabilities()
local servers = { local servers = {
"gopls", "bashls", "jedi_language_server", "dockerls", "terraformls", "gopls", "bashls", "jedi_language_server", "dockerls", "terraformls",
"tsserver", "texlab", "yamlls", "jsonls" "tsserver", "texlab", "yamlls", "jsonls", "clangd", "sourcekit"
} }
for _, lsp in ipairs(servers) do for _, lsp in ipairs(servers) do
nvim_lsp[lsp].setup { nvim_lsp[lsp].setup {
@@ -147,52 +145,6 @@ for _, lsp in ipairs(servers) do
}) })
end end
local sumneko_root_path = os.getenv("HOME") .. ".cache/lua-language-server" -- Test source-kit
local sumneko_binary = "/usr/bin/lua-language-server" require'lspconfig'.sourcekit.setup{}
require"lspconfig".sumneko_lua.setup {
cmd = {sumneko_binary, "-E", sumneko_root_path .. "/main.lua"},
capabilities = capabilities,
on_attach = on_attach,
settings = {
Lua = {
runtime = {version = "LuaJIT", path = vim.split(package.path, ";")},
completion = {enable = true, callSnippet = "Both"},
diagnostics = {
enable = true,
globals = {"vim", "describe"},
disable = {"lowercase-global"}
},
workspace = {
library = {
[vim.fn.expand("$VIMRUNTIME/lua")] = true,
[vim.fn.expand("$VIMRUNTIME/lua/vim/lsp")] = true,
[vim.fn.expand("/usr/share/awesome/lib")] = true
},
-- adjust these two values if your performance is not optimal
maxPreload = 2000,
preloadFileSize = 1000
},
telemetry = {enable = false}
}
}
}
-- alternative to formatter but yamlfix is not working and I need this for respecting yamllint config
-- but yamlfix is messing up ansible files ... 😠
-- require('lspconfig')['efm'].setup{
-- filetypes = { 'json', 'yaml','lua' },
-- init_options = {documentFormatting = true, codeAction = false},
-- settings = {
-- rootMarkers = {".git/"},
-- languages = {
-- lua = {
-- {formatCommand = "lua-format -i", formatStdin = true}
-- },
-- yaml = {
-- {formatCommand = "yamlfix -", formatStdin = true}
-- },
-- json = {
-- {formatCommand = "prettier", formatStdin = true}
-- }
-- }
-- }
-- }

View File

@@ -3,7 +3,7 @@ local nightfox = require('nightfox')
-- This function set the configuration of nightfox. If a value is not passed in the setup function -- This function set the configuration of nightfox. If a value is not passed in the setup function
-- it will be taken from the default configuration above -- it will be taken from the default configuration above
nightfox.setup({ nightfox.setup({
fox = "nordfox", -- change the colorscheme to use nordfox fox = "terafox", -- change the colorscheme to use terafox
styles = { styles = {
comments = "italic", -- change style of comments to be italic comments = "italic", -- change style of comments to be italic
keywords = "bold", -- change style of keywords to be bold keywords = "bold", -- change style of keywords to be bold
@@ -14,7 +14,7 @@ nightfox.setup({
}, },
colors = { colors = {
red = "#FF000", -- Override the red color for MAX POWER red = "#FF000", -- Override the red color for MAX POWER
bg_alt = "#000000", --bg_alt = "#000000",
}, },
hlgroups = { hlgroups = {
TSPunctDelimiter = { fg = "${red}" }, -- Override a highlight group with the color red TSPunctDelimiter = { fg = "${red}" }, -- Override a highlight group with the color red
@@ -24,3 +24,4 @@ nightfox.setup({
-- Load the configuration set above and apply the colorscheme -- Load the configuration set above and apply the colorscheme
nightfox.load() nightfox.load()
vim.cmd("colorscheme terafox")

View File

@@ -32,18 +32,86 @@ g.nvim_tree_icons = {
symlink = "" symlink = ""
} }
} }
g.loaded_netrw = 1
g.loaded_netrwPlugin = 1
local tree_cb = require"nvim-tree.config".nvim_tree_callback local tree_cb = require"nvim-tree.config".nvim_tree_callback
-- This function has been generated from your
-- view.mappings.list
-- view.mappings.custom_only
-- remove_keymaps
--
-- You should add this function to your configuration and set on_attach = on_attach in the nvim-tree setup call.
--
-- Although care was taken to ensure correctness and completeness, your review is required.
--
-- Please check for the following issues in auto generated content:
-- "Mappings removed" is as you expect
-- "Mappings migrated" are correct
--
-- Please see https://github.com/nvim-tree/nvim-tree.lua/wiki/Migrating-To-on_attach for assistance in migrating.
--
local function on_attach(bufnr)
local api = require('nvim-tree.api')
local function opts(desc)
return { desc = 'nvim-tree: ' .. desc, buffer = bufnr, noremap = true, silent = true, nowait = true }
end
-- Default mappings not inserted as:
-- remove_keymaps = true
-- OR
-- view.mappings.custom_only = true
-- Mappings migrated from view.mappings.list
--
-- You will need to insert "your code goes here" for any mappings with a custom action_cb
vim.keymap.set('n', '<CR>', api.node.open.edit, opts('Open'))
vim.keymap.set('n', 'o', api.node.open.edit, opts('Open'))
vim.keymap.set('n', '<2-LeftMouse>', api.node.open.edit, opts('Open'))
vim.keymap.set('n', '<2-RightMouse>', api.tree.change_root_to_node, opts('CD'))
vim.keymap.set('n', '<C-]>', api.tree.change_root_to_node, opts('CD'))
vim.keymap.set('n', '<C-v>', api.node.open.vertical, opts('Open: Vertical Split'))
vim.keymap.set('n', '<C-s>', api.node.open.horizontal, opts('Open: Horizontal Split'))
vim.keymap.set('n', '<C-t>', api.node.open.tab, opts('Open: New Tab'))
vim.keymap.set('n', '<', api.node.navigate.sibling.prev, opts('Previous Sibling'))
vim.keymap.set('n', '>', api.node.navigate.sibling.next, opts('Next Sibling'))
vim.keymap.set('n', 'P', api.node.navigate.parent, opts('Parent Directory'))
vim.keymap.set('n', '<BS>', api.node.navigate.parent_close, opts('Close Directory'))
vim.keymap.set('n', '<S-CR>', api.node.navigate.parent_close, opts('Close Directory'))
vim.keymap.set('n', '<Tab>', api.node.open.preview, opts('Open Preview'))
vim.keymap.set('n', 'K', api.node.navigate.sibling.first, opts('First Sibling'))
vim.keymap.set('n', 'J', api.node.navigate.sibling.last, opts('Last Sibling'))
vim.keymap.set('n', 'H', api.tree.toggle_hidden_filter, opts('Toggle Dotfiles'))
vim.keymap.set('n', 'R', api.tree.reload, opts('Refresh'))
vim.keymap.set('n', 'a', api.fs.create, opts('Create'))
vim.keymap.set('n', 'd', api.fs.remove, opts('Delete'))
vim.keymap.set('n', 'r', api.fs.rename, opts('Rename'))
vim.keymap.set('n', '<C-r>', api.fs.rename_sub, opts('Rename: Omit Filename'))
vim.keymap.set('n', 'x', api.fs.cut, opts('Cut'))
vim.keymap.set('n', 'c', api.fs.copy.node, opts('Copy'))
vim.keymap.set('n', 'p', api.fs.paste, opts('Paste'))
vim.keymap.set('n', 'y', api.fs.copy.filename, opts('Copy Name'))
vim.keymap.set('n', 'Y', api.fs.copy.relative_path, opts('Copy Relative Path'))
vim.keymap.set('n', 'gy', api.fs.copy.absolute_path, opts('Copy Absolute Path'))
vim.keymap.set('n', '[c', api.node.navigate.git.prev, opts('Prev Git'))
vim.keymap.set('n', ']c', api.node.navigate.git.next, opts('Next Git'))
vim.keymap.set('n', '-', api.tree.change_root_to_parent, opts('Up'))
vim.keymap.set('n', 's', api.node.run.system, opts('Run System'))
vim.keymap.set('n', 'q', api.tree.close, opts('Close'))
vim.keymap.set('n', 'g?', api.tree.toggle_help, opts('Help'))
end
require("nvim-tree").setup { require("nvim-tree").setup {
-- disables netrw completely -- disables netrw completely
disable_netrw = true, disable_netrw = true,
-- hijack netrw window on startup -- hijack netrw window on startup
hijack_netrw = true, hijack_netrw = true,
-- open the tree when running this setup function
open_on_setup = false,
-- will not open on setup if the filetype is in this list
ignore_ft_on_setup = {},
-- closes neovim automatically when the tree is the last **WINDOW** in the view -- closes neovim automatically when the tree is the last **WINDOW** in the view
auto_close = true, --auto_close = true,
-- opens the tree when changing/opening a new tab if the tree wasn't previously opened -- opens the tree when changing/opening a new tab if the tree wasn't previously opened
open_on_tab = true, open_on_tab = true,
-- hijack the cursor in the tree to put it at the start of the filename -- hijack the cursor in the tree to put it at the start of the filename
@@ -51,11 +119,11 @@ require("nvim-tree").setup {
-- updates the root directory of the tree on `DirChanged` (when your run `:cd` usually) -- updates the root directory of the tree on `DirChanged` (when your run `:cd` usually)
update_cwd = true, update_cwd = true,
-- this option hides files and folders starting with a dot `.` -- this option hides files and folders starting with a dot `.`
hide_dotfiles = true, --hide_dotfiles = true,
-- show lsp diagnostics in the signcolumn -- show lsp diagnostics in the signcolumn
diagnostics = { diagnostics = {
enabled = true, enable = true,
icon = {hint = "", info = "", warning = "", error = ""} icons = {hint = "", info = "", warning = "", error = ""}
}, },
git = {ignore = true}, git = {ignore = true},
-- update the focused file on `BufEnter`, un-collapses the folders recursively until it finds the file -- update the focused file on `BufEnter`, un-collapses the folders recursively until it finds the file
@@ -88,46 +156,7 @@ require("nvim-tree").setup {
-- side of the tree, can be one of 'left' | 'right' | 'top' | 'bottom' -- side of the tree, can be one of 'left' | 'right' | 'top' | 'bottom'
side = "left", side = "left",
-- if true the tree will resize itself after opening a file -- if true the tree will resize itself after opening a file
auto_resize = true, --auto_resize = true,
mappings = { },
-- custom only false will merge the list with the default mappings on_attach = on_attach
-- if true, it will only use your list to set the mappings
custom_only = true,
-- list of mappings to set on the tree manually
list = {
{key = {"<CR>", "o", "<2-LeftMouse>"}, cb = tree_cb("edit")},
{key = {"<2-RightMouse>", "<C-]>"}, cb = tree_cb("cd")},
{key = "<C-v>", cb = tree_cb("vsplit")},
{key = "<C-x>", cb = tree_cb("split")},
{key = "<C-t>", cb = tree_cb("tabnew")},
{key = "<", cb = tree_cb("prev_sibling")},
{key = ">", cb = tree_cb("next_sibling")},
{key = "P", cb = tree_cb("parent_node")},
{key = "<BS>", cb = tree_cb("close_node")},
{key = "<S-CR>", cb = tree_cb("close_node")},
{key = "<Tab>", cb = tree_cb("preview")},
{key = "K", cb = tree_cb("first_sibling")},
{key = "J", cb = tree_cb("last_sibling")},
{key = "I", cb = tree_cb("toggle_ignored")},
{key = "H", cb = tree_cb("toggle_dotfiles")},
{key = "R", cb = tree_cb("refresh")},
{key = "a", cb = tree_cb("create")},
{key = "d", cb = tree_cb("remove")},
{key = "r", cb = tree_cb("rename")},
{key = "<C-r>", cb = tree_cb("full_rename")},
{key = "x", cb = tree_cb("cut")},
{key = "c", cb = tree_cb("copy")},
{key = "p", cb = tree_cb("paste")},
{key = "y", cb = tree_cb("copy_name")},
{key = "Y", cb = tree_cb("copy_path")},
{key = "gy", cb = tree_cb("copy_absolute_path")},
{key = "[c", cb = tree_cb("prev_git_item")},
{key = "]c", cb = tree_cb("next_git_item")},
{key = "-", cb = tree_cb("dir_up")},
{key = "s", cb = tree_cb("system_open")},
{key = "q", cb = tree_cb("close")},
{key = "g?", cb = tree_cb("toggle_help")}
}
}
}
} }

View File

@@ -2,6 +2,7 @@ local actions = require('telescope.actions')
local telescope = require('telescope') local telescope = require('telescope')
--telescope.load_extension('projects') --telescope.load_extension('projects')
telescope.load_extension('fzf')
telescope.setup{ telescope.setup{
defaults = { defaults = {

View File

@@ -93,7 +93,8 @@ wk.register({
g = { g = {
name = "Git", name = "Git",
c = { "<cmd>Neogit Commit<cr>", "Git Commit" }, c = { "<cmd>Neogit Commit<cr>", "Git Commit" },
g = { "<cmd>Neogit<cr>", "Open NeoGit" } g = { "<cmd>Neogit<cr>", "Open NeoGit" },
p = { "<cmd> Neogit Push<cr>" }
}, },
f = { f = {
name = "File", name = "File",

View File

@@ -1,6 +1,6 @@
local keymap = vim.api.nvim_set_keymap local keymap = vim.api.nvim_set_keymap
default_options = {noremap = true, silent = true} local default_options = {noremap = true, silent = true}
expr_options = {noremap = true, expr = true, silent = true} -- local expr_options = {noremap = true, expr = true, silent = true}
-- map the leader key -- map the leader key
keymap('n', '<Space>', '<NOP>', default_options) keymap('n', '<Space>', '<NOP>', default_options)
@@ -16,7 +16,6 @@ keymap('i', '<c-s>', '<ESC>:w<CR>a', default_options)
keymap("v", "p", "\"_dP", default_options) keymap("v", "p", "\"_dP", default_options)
-- buffer focus -- buffer focus
local opts = { noremap = true }
keymap('n', '<c-j>', '<c-w>j', default_options) keymap('n', '<c-j>', '<c-w>j', default_options)
keymap('n', '<c-h>', '<c-w>h', default_options) keymap('n', '<c-h>', '<c-w>h', default_options)
keymap('n', '<c-k>', '<c-w>k', default_options) keymap('n', '<c-k>', '<c-w>k', default_options)
@@ -31,3 +30,6 @@ keymap("n", "<Down>", ":resize +1<CR>", default_options)
-- Move selected line / block of text in visual mode -- Move selected line / block of text in visual mode
keymap("x", "K", ":move '<-2<CR>gv-gv", default_options) keymap("x", "K", ":move '<-2<CR>gv-gv", default_options)
keymap("x", "J", ":move '>+1<CR>gv-gv", default_options) keymap("x", "J", ":move '>+1<CR>gv-gv", default_options)
-- Toggle nvim-tree open or closed
keymap("n", "<c-n>", "<CMD>NvimTreeToggle<CR>", default_options)

View File

@@ -46,6 +46,8 @@ use {
requires = { {'nvim-lua/plenary.nvim'} } requires = { {'nvim-lua/plenary.nvim'} }
} }
use { 'nvim-telescope/telescope-fzf-native.nvim', run = 'make' }
use { use {
"nvim-treesitter/nvim-treesitter", "nvim-treesitter/nvim-treesitter",
config = get_config("treesitter"), config = get_config("treesitter"),
@@ -69,6 +71,8 @@ use {"onsails/lspkind-nvim", requires = {{"famiu/bufdelete.nvim"}}}
-- LSP -- LSP
use {"ray-x/lsp_signature.nvim", requires = {{"neovim/nvim-lspconfig"}}} use {"ray-x/lsp_signature.nvim", requires = {{"neovim/nvim-lspconfig"}}}
use { "williamboman/mason.nvim" }
use { "williamboman/mason-lspconfig.nvim" }
use { use {
"neovim/nvim-lspconfig", "neovim/nvim-lspconfig",
config = get_config("lsp") config = get_config("lsp")
@@ -92,13 +96,24 @@ use {
use { use {
"TimUntersberger/neogit", "TimUntersberger/neogit",
requires = {"nvim-lua/plenary.nvim"}, requires = {
"nvim-lua/plenary.nvim",
"nvim-telescope/telescope.nvim", -- optional
"sindrets/diffview.nvim", -- optional
},
cmd = "Neogit", cmd = "Neogit",
config = get_config("neogit") config = get_config("neogit")
} }
use {"hrsh7th/vim-vsnip", config = get_config("vsnip")} use {"hrsh7th/vim-vsnip", config = get_config("vsnip")}
use({
"andrewferrier/wrapping.nvim",
config = function()
require("wrapping").setup()
end,
})
-- Theme -- Theme
use { use {
'EdenEast/nightfox.nvim', 'EdenEast/nightfox.nvim',

View File

@@ -2,16 +2,14 @@ local o = vim.opt
local wo = vim.wo local wo = vim.wo
local fn = vim.fn local fn = vim.fn
vim.cmd "filetype indent plugin on" vim.cmd.set('inccommand=split')
vim.cmd "set inccommand=split"
-- o.guicursor = "n-v-c:block,i-ci-ve:ver25,r-cr:hor20,o:hor50" -- block in normal and beam cursor in insert mode
o.updatetime = 300 -- faster completion o.updatetime = 300 -- faster completion
o.timeoutlen = 400 -- time to wait for a mapped sequence to complete (in milliseconds) o.timeoutlen = 400 -- time to wait for a mapped sequence to complete (in milliseconds)
o.ttimeoutlen = 0 -- Time in milliseconds to wait for a key code sequence to complete o.ttimeoutlen = 0 -- Time in milliseconds to wait for a key code sequence to complete
o.backup = false -- creates a backup file o.backup = false -- creates a backup file
o.swapfile = true -- enable/disable swap file creation o.swapfile = false -- enable/disable swap file creation
o.dir = fn.stdpath("data") .. "/swp" -- swap file directory o.dir = fn.stdpath("data") .. "/swp" -- swap file directory
o.undofile = true -- enable/disable undo file creation o.undofile = false -- enable/disable undo file creation
o.undodir = fn.stdpath("data") .. "/undodir" -- set undo directory o.undodir = fn.stdpath("data") .. "/undodir" -- set undo directory
o.history = 500 -- Use the 'history' option to set the number of lines from command mode that are remembered. o.history = 500 -- Use the 'history' option to set the number of lines from command mode that are remembered.
o.hidden = true -- required to keep multiple buffers and open multiple buffers o.hidden = true -- required to keep multiple buffers and open multiple buffers
@@ -28,16 +26,18 @@ o.smartcase = true -- smart case
o.smartindent = true -- make indenting smarter again o.smartindent = true -- make indenting smarter again
o.splitbelow = true -- force all horizontal splits to go below current window o.splitbelow = true -- force all horizontal splits to go below current window
o.splitright = true -- force all vertical splits to go to the right of current window o.splitright = true -- force all vertical splits to go to the right of current window
o.autoindent = true -- turn on auto indent.
o.expandtab = true -- convert tabs to spaces o.expandtab = true -- convert tabs to spaces
o.smarttab = true -- turn on smart tab
o.shiftwidth = 2 -- the number of spaces inserted for each indentation o.shiftwidth = 2 -- the number of spaces inserted for each indentation
o.tabstop = 2 -- how many columns a tab counts for o.tabstop = 2 -- how many columns a tab counts for
o.termguicolors = true -- set term gui colors (most terminals support this) o.termguicolors = true -- set term gui colors (most terminals support this)
o.cursorline = true -- highlight the current line o.cursorline = true -- highlight the current line
o.scrolloff = 3 -- Minimal number of screen lines to keep above and below the cursor o.scrolloff = 8 -- Minimal number of screen lines to keep above and below the cursor
o.sidescrolloff = 5 -- The minimal number of columns to scroll horizontally o.sidescrolloff = 5 -- The minimal number of columns to scroll horizontally
o.hlsearch = true -- highlight all matches on previous search pattern o.hlsearch = true -- highlight all matches on previous search pattern
o.ignorecase = true -- ignore case in search patterns o.ignorecase = true -- ignore case in search patterns
o.foldenable = true -- disable folding; enable with zi o.foldenable = false -- disable folding; enable with zi
o.foldmethod = "expr" o.foldmethod = "expr"
o.foldexpr = "nvim_treesitter#foldexpr()" o.foldexpr = "nvim_treesitter#foldexpr()"
-- o.listchars = "eol:¬,tab:>·,trail:~,extends:>,precedes:<" -- o.listchars = "eol:¬,tab:>·,trail:~,extends:>,precedes:<"

5
nvim/lua/theme.lua Normal file
View File

@@ -0,0 +1,5 @@
-- Nightfox
require('nightfox').load('terafox')
--require('nightfox').load('terafox')
--vim.cmd("colorscheme nightfox")

4
scripts/install-brew.sh Executable file
View File

@@ -0,0 +1,4 @@
#/bin/bash
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
chmod -R go-w "$(/opt/homebrew/bin/brew --prefix)"

22
scripts/install_launch_agents Executable file
View File

@@ -0,0 +1,22 @@
#!/bin/sh
set -e
# Installs launchd agents.
agent_dir="${HOME}/Library/LaunchAgents"
uid="$(id -u "$(whoami)")"
mkdir -p "$agent_dir"
for file in "${DOTFILES}"/macOS/LaunchAgents/*.plist; do
# get just the base file name, similar to using `basename` but w/o a subshell
filename="${file##*/}"
path="${agent_dir}/${filename}"
echo "$filename"
if ! test -e "${path}"; then
echo "Installing Agent: ${filename}"
cp "${file}" "${path}"
launchctl enable "user/${uid}/${filename}"
fi
done

12
scripts/scripts/allfigl Executable file
View File

@@ -0,0 +1,12 @@
#!/bin/sh
set -e
font_dir="$(brew --prefix)/share/figlet/fonts"
for font in "${font_dir}"/*.flf; do
clear
echo "FONT: $font"
figlet -f "${font}" hello
read -r line
done

8
scripts/scripts/banner Executable file
View File

@@ -0,0 +1,8 @@
#!/bin/sh
set -e
message="${1:-m-housh}"
font="${2:-puffy}"
echo "${message}" | figlet -c -f "${font}"

4
scripts/scripts/chmox Executable file
View File

@@ -0,0 +1,4 @@
#!/bin/sh
# makes files executable
test -f "$1" && chmod +x "$1"

View File

@@ -0,0 +1,9 @@
#!/bin/sh
if [ "$(uname -n)" = "Michaels-Mac-mini.local" ]; then
echo "Removing derived data folders"
rm -r /Volumes/Bucket/Library/Developer/Xcode/DerivedData
else
echo "Removing derived data folders"
rm -r ~/Library/Developer/Xcode/DerivedData/*
fi

View File

@@ -0,0 +1,5 @@
#!/bin/sh
for file in "$SCREENSHOTS"/*; do
rm "$file"
done

8
scripts/scripts/cmt Executable file
View File

@@ -0,0 +1,8 @@
#!/bin/bash
# adapted from...
# https://github.com/rwxrob/dot/blob/main/scripts/cmt
while IFS= read -r line; do
echo "${1:-#} $line"
done

17
scripts/scripts/dmg Executable file
View File

@@ -0,0 +1,17 @@
#!/bin/sh
# Creates an encrypted disk image from a folder
set -e
from="$1"
to="$2"
if [ -z "$1" ] || [ -z "$2" ]; then
echo "Usage: dmg <fromdir> <todir>"
echo ""
exit 1
fi
name="$(isosec).dmg"
hdiutil create -encryption AES-256 -srcfolder "$from" "$to/$name"

5
scripts/scripts/duck Executable file
View File

@@ -0,0 +1,5 @@
#!/bin/bash
url="https://lite.duckduckgo.com/lite?kd=1&kp=1&q=$(urlencode "$*")"
exec lynx -vikeys "$url"

16
scripts/scripts/figl Executable file
View File

@@ -0,0 +1,16 @@
#!/bin/bash
# Create a new figlet (ascii art) from the input.
figl() {
font=${FIGL_FONT:-puffy}
declare -a buf
while IFS= read -r line; do
buf+=("$line")
done
for line in "${buf[@]}"; do
figlet -f "$font" -c "${line}" | head -6
done
}
figl "$*"

11
scripts/scripts/haasd Executable file
View File

@@ -0,0 +1,11 @@
#!/bin/bash
set -e
# Creates a new `zet` inside the $HAAS/documents repository
_main() {
(ZETDIR="$HAAS/documents" eval zet "$@")
}
_main "$@"

11
scripts/scripts/haasp Executable file
View File

@@ -0,0 +1,11 @@
#!/bin/bash
set -e
# Creates a new `zet` inside the House Call Pro `Zettlekasten`
_main() {
(ZETDIR="$HAAS/processes" eval zet "$@")
}
_main "$@"

12
scripts/scripts/haasz Executable file
View File

@@ -0,0 +1,12 @@
#!/bin/sh
set -e
# Uses the `zet` command setting the directory to the
# Housh As A System zet repository.
main() {
(ZETDIR="$HAASZET" eval zet "$@")
}
main "$@"

11
scripts/scripts/hcpn Executable file
View File

@@ -0,0 +1,11 @@
#!/bin/bash
set -e
# Creates a new `zet` inside the House Call Pro `Zettlekasten`
_main() {
(ZETDIR="$HCP_NOTES" eval zet "$@")
}
_main "$@"

11
scripts/scripts/hxzet Executable file
View File

@@ -0,0 +1,11 @@
#!/bin/bash
set -e
# Creates a new `zet` inside the House Call Pro `Zettlekasten`
_main() {
(ZETDIR="$HXZET" eval zet "$@")
}
_main "$@"

9
scripts/scripts/isosec Executable file
View File

@@ -0,0 +1,9 @@
#!/bin/sh
set -e
isosec() {
echo "$(date -u '+%Y%m%d%H%M%S')"
}
isosec

5
scripts/scripts/l Executable file
View File

@@ -0,0 +1,5 @@
#!/bin/bash
# Lists files and directories, including hidden files.
ls -lah --color "$@"

58
scripts/scripts/link_apps Executable file
View File

@@ -0,0 +1,58 @@
#!/bin/sh
# Creates symlinks from external application directory
# to another directory so applications are seen in
# spotlight searches and launchpad.
set -e
app_dir=""
destination_dir=""
# Parses the input arguments. If 2 arguments are passed in, then
# the first is where we search for applications (source) and the second
# argument is the destination directory for the symlinks to be placed in
#
# If one argument is passed in, then it is used as the destination directory
# and we use the default source directory.
_parse_args() {
arg_count="$#"
app_dir="/Volumes/M1 Mac-Mini External Drive/Applications"
destination_dir="${HOME}/Application"
if test "$arg_count" -eq 1; then
destination_dir="$1"
elif test "$arg_count" -eq 2; then
app_dir="$1"
destination_dir="$2"
fi
}
# Checks if the `app_dir` exists.
_is_mounted() {
if ! test -d "$app_dir"; then
echo "Application directory does not exist or is not mounted" >&2
return 1
fi
}
# ---------------- main -------------------
main() {
_parse_args "$@"
test -d "${destination_dir}" || echo "Destination does not exist" >&2
if test _is_mounted; then
for app in "${app_dir}"/*.app; do
destination="${destination_dir}/$(basename "${app}")"
if test -e "${destination}"; then
echo "Destination already exists: ${destination}. Skipping!" >&2
continue
fi
# remove echo to do real work.
echo ln -sv "${app}" "${destination}" >&2
done
fi
}
main "$@"

12
scripts/scripts/mkcd Executable file
View File

@@ -0,0 +1,12 @@
#!/bin/sh
# Creates a directory then `cd`'s into the directory
set -e
dir="$1"
test -n "${dir}" || echo "usage: mkcd <dir>" && exit 1
mkdir "${dir}"
cd "${dir}"

11
scripts/scripts/ncis Executable file
View File

@@ -0,0 +1,11 @@
#!/bin/bash
set -e
# Creates a new `zet` inside the House Call Pro `Zettlekasten`
_main() {
(ZETDIR="$HOME/Documents/NCISummit" eval zet "$@")
}
_main "$@"

26
scripts/scripts/newx Executable file
View File

@@ -0,0 +1,26 @@
#!/bin/sh
# Creates a new executable file in the $SCRIPTS directory.
# check if the scripts path / environment variable is set
test ! -n "${SCRIPTS}" && echo "SCRIPTS not set" && exit 1;
# fallback to check if the name arg ${1} exists, if not show usage text.
test ! -n "${1}" && \
echo "usage: newscript <name> <optional: shell>" && \
echo "shell defaults to sh if not supplied" && \
exit 1;
path="${SCRIPTS}/${1}"
shell="${2:-sh}"
if [ -e "${path}" ]; then
echo "Already exists try:"
echo "vi ${path}"
exit 1
fi
printf "#!/bin/%s\n\n" "${shell}" > "${path}"
chmod +x "${path}"
exec vim +2 "${path}"

2
scripts/scripts/path Executable file
View File

@@ -0,0 +1,2 @@
#!/bin/zsh
echo -e ${PATH//:/\\n}

4
scripts/scripts/proposals Executable file
View File

@@ -0,0 +1,4 @@
#!/bin/zsh
# Move into the proposals directory
cd "$HOME/Library/Mobile Documents/com~apple~CloudDocs/Work/Proposals"

11
scripts/scripts/pzet Executable file
View File

@@ -0,0 +1,11 @@
#!/bin/bash
set -e
# Creates a new `zet` inside the House Call Pro `Zettlekasten`
_main() {
(ZETDIR="$GHREPOS/private-zets" eval zet "$@")
}
_main "$@"

57
scripts/scripts/termcolors Executable file
View File

@@ -0,0 +1,57 @@
#!/bin/sh
# Prints the terminal theme regular colors (and some other escapes). For
# "bright/bold" variation add 1; in front of the number. Useful for
# sampling and remembering the escapes when hardcoding them into scripts
# for portability. Keep in mind that the color names are those given for
# the original color terminal and obviously can vary widely. For color
# intensive output consider shortening the names to their first letter
# instead and don't forget to wrap them within ${}. Omits (and overrides
# any inherited) colors when not interactive/piped.
black=""
red=""
green=""
yellow=""
blue=""
magenta=""
cyan=""
white=""
blink=""
reset=""
if test -t 1; then
black="\e[30m"
red="\e[31m"
green="\e[32m"
yellow="\e[33m"
blue="\e[34m"
magenta="\e[35m"
cyan="\e[36m"
white="\e[37m"
blink="\e[5m"
reset="\e[0m"
fi
echo POSIX
printf "${black}black=\"\\\e[30m\"
${red}red=\"\\\e[31m\"
${green}green=\"\\\e[32m\"
${yellow}yellow=\"\\\e[33m\"
${blue}blue=\"\\\e[34m\"
${magenta}magenta=\"\\\e[35m\"
${cyan}cyan=\"\\\e[36m\"
${white}white=\"\\\e[37m\"
reset=\"\\\e[0m\"
"
echo
echo BASH:
printf "${black}black=$'\\\e[30m'
${red}red=$'\\\e[31m'
${green}green=$'\\\e[32m'
${yellow}yellow=$'\\\e[33m'
${blue}blue=$'\\\e[34m'
${magenta}magenta=$'\\\e[35m'
${cyan}cyan=$'\\\e[36m'
${white}white=$'\\\e[37m'
reset=$'\\\e[0m'
"

8
scripts/scripts/uncmt Executable file
View File

@@ -0,0 +1,8 @@
#!/bin/bash
# adapted from...
# https://github.com/rwxrob/dot/blob/main/scripts/ucmt
while IFS= read -r line; do
echo "${line#* }"
done

34
scripts/scripts/urlencode Executable file
View File

@@ -0,0 +1,34 @@
#!/bin/bash
#!/bin/bash
# yeah, i totally stole this from stack exchange, no shame
rawurlencode() {
local string="${1}"
local strlen=${#string}
local encoded=""
local pos c o
for ((pos = 0; pos < strlen; pos++)); do
c=${string:$pos:1}
case "$c" in
[-_.~a-zA-Z0-9]) o="${c}" ;;
*) printf -v o '%%%02x' "'$c'" ;;
esac
encoded+="${o}"
done
echo "${encoded}" # You can either set a return variable (FASTER)
REPLY="${encoded}" #+or echo the result (EASIER)... or both... :p
}
if test -n "$1"; then
rawurlencode "$*"
exit
fi
IFS=
while read -r line; do
rawurlencode "$line"
done

5
scripts/scripts/vic Executable file
View File

@@ -0,0 +1,5 @@
#!/bin/sh
# opens a shell command in vi
cmd=$(command -v $1)
test -n "$cmd" && vi "$cmd"

103
scripts/setup_defaults Executable file
View File

@@ -0,0 +1,103 @@
#!/bin/bash
# sets default settings for macOS
# change screen capture / screenshot location
defaults write com.apple.screencapture location -string "$SCREENSHOTS"
# save screenshots in png format
defaults write com.apple.screencapture type -string "png"
# Disable shadow in screenshots
defaults write com.apple.screencapture disable-shadow -bool true
# Expand save panel by default
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode2 -bool true
# Expand print panel by default
defaults write NSGlobalDomain PMPrintingExpandedStateForPrint -bool true
defaults write NSGlobalDomain PMPrintingExpandedStateForPrint2 -bool true
# Disable the “Are you sure you want to open this application?” dialog
defaults write com.apple.LaunchServices LSQuarantine -bool false
# Enable full keyboard access for all controls
# (e.g. enable Tab in modal dialogs)
defaults write NSGlobalDomain AppleKeyboardUIMode -int 3
# Set a blazingly fast keyboard repeat rate
defaults write NSGlobalDomain KeyRepeat -int 1
defaults write NSGlobalDomain InitialKeyRepeat -int 10
# Finder: allow quitting via ⌘ + Q; doing so will also hide desktop icons
defaults write com.apple.finder QuitMenuItem -bool true
# Set Home as the default location for new Finder windows
defaults write com.apple.finder NewWindowTarget -string "PfHm"
defaults write com.apple.finder NewWindowTargetPath -string "file://${HOME}/"
# Show icons for hard drives, servers, and removable media on the desktop
defaults write com.apple.finder ShowExternalHardDrivesOnDesktop -bool true
defaults write com.apple.finder ShowHardDrivesOnDesktop -bool true
defaults write com.apple.finder ShowMountedServersOnDesktop -bool true
defaults write com.apple.finder ShowRemovableMediaOnDesktop -bool true
# Finder: show all filename extensions
defaults write NSGlobalDomain AppleShowAllExtensions -bool true
# Finder: show status bar
defaults write com.apple.finder ShowStatusBar -bool true
# Finder: show path bar
defaults write com.apple.finder ShowPathbar -bool true
# Display full POSIX path as Finder window title
defaults write com.apple.finder _FXShowPosixPathInTitle -bool true
# Keep folders on top when sorting by name
defaults write com.apple.finder _FXSortFoldersFirst -bool true
# When performing a search, search the current folder by default
defaults write com.apple.finder FXDefaultSearchScope -string "SCcf"
# Avoid creating .DS_Store files on network or USB volumes
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
defaults write com.apple.desktopservices DSDontWriteUSBStores -bool true
# Use column view in all Finder windows by default
# Four-letter codes for the other view modes: `icnv`, `Nlsv`, `glyv`
defaults write com.apple.finder FXPreferredViewStyle -string "clmv"
# Disable the warning before emptying the Trash
defaults write com.apple.finder WarnOnEmptyTrash -bool false
# Show the ~/Library folder
#chflags nohidden ~/Library && xattr -d com.apple.FinderInfo ~/Library
# Copy email addresses as `foo@example.com` instead of `Foo Bar <foo@example.com>` in Mail.app
defaults write com.apple.mail AddressesIncludeNameOnPasteboard -bool false
# Only use UTF-8 in Terminal.app
defaults write com.apple.terminal StringEncodings -array 4
# Enable Secure Keyboard Entry in Terminal.app
# See: https://security.stackexchange.com/a/47786/8918
defaults write com.apple.terminal SecureKeyboardEntry -bool true
# Prevent Time Machine from prompting to use new hard drives as backup volume
defaults write com.apple.TimeMachine DoNotOfferNewDisksForBackup -bool true
# Disable local Time Machine backups
# hash tmutil &> /dev/null && sudo tmutil disablelocal
# kill affected apps
for app in "Main" \
"Photos" \
"Finder" \
"SystemUIServer"; do
killall "${app}" &> /dev/null
done
echo "Done. Some changes require a restart to take effect."

83
tmux/.tmux.conf Normal file
View File

@@ -0,0 +1,83 @@
# Some tweaks to the status line
set -g status-right "%H:%M"
set -g window-status-current-style "underscore"
# If running inside tmux ($TMUX is set), then change the status line to red
%if #{TMUX}
set -g status-bg red
%endif
# Enable RGB colour if running in xterm(1)
set-option -sa terminal-overrides ",xterm*:Tc"
# Change the default $TERM to tmux-256color
set -g default-terminal "xterm-256color"
# Change windows to start with an index of 1 instead of 0
set -g base-index 1
# Change panes to start with an index of 1 instead of 0
setw -g pane-base-index 1
# No bells at all
set -g bell-action none
# Keep windows around after they exit
set -g remain-on-exit on
# Set indexes to start at 1, instead of 0.
set -g base-index 1
# Change the prefix key to C-a
set -g prefix C-a
unbind C-b
bind C-a send-prefix
# Turn the mouse on, but without copy mode dragging
set -g mouse on
unbind -n MouseDrag1Pane
unbind -Tcopy-mode MouseDrag1Pane
# A key to toggle between smallest and largest sizes if a window is visible in
# multiple places
bind F set -w window-size
# Keys to toggle monitoring activity in a window and the synchronize-panes option
bind m set monitor-activity
bind y set synchronize-panes\; display 'synchronize-panes #{?synchronize-panes,on,off}'
# Better split pane
bind | splitw -h
bind - splitw -v
# Use Alt-arrow keys to navigate panes
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
bind -T prefix j select-pane -D
bind -T prefix k select-pane -U
bind -T prefix h select-pane -L
bind -T prefix l select-pane -R
# Use Shift-arrow keys to navigate windows.
bind -n S-Left previous-window
bind -n S-Right next-window
# reload new changes
bind-key R source-file ~/.tmux.conf\; \display-message "source-file done"
# Create a single default session - because a session is created here, tmux
# should be started with "tmux attach" rather than "tmux new"
#new -d -s0 -nirssi 'exec irssi'
#set -t0:0 monitor-activity on
#set -t0:0 aggressive-resize on
#neww -d -ntodo 'exec emacs ~/TODO'
#setw -t0:1 aggressive-resize on
#neww -d -nmutt 'exec mutt'
#setw -t0:2 aggressive-resize on
#neww -d
#neww -d
#neww -d

File diff suppressed because it is too large Load Diff

View File

@@ -1,43 +0,0 @@
" Settings:
set tabstop=4 softtabstop=4
set shiftwidth=4
set expandtab
set smartindent
set exrc
set relativenumber
set nohlsearch
set hidden
set nu
set nowrap
set noswapfile
set nobackup
set undodir=~/.vim/undodir
set undofile
set incsearch
set termguicolors
set scrolloff=8
set noshowmode
set signcolumn=yes
set colorcolumn=80
set noerrorbells
set number
syntax enable
set background=dark
let mapleader = " "
fun! TrimWhiteSpace()
let l:save = winsaveview()
keeppatterns %s/\s\+$//e
call winrestview(l:save)
endfun
augroup MICHAEL
autocmd!
autocmd BufWritePre * :call TrimWhiteSpace()
autocmd Filetype yaml setlocal ts=2 sts=2 sw=2 expandtab
augroup END

View File

@@ -1,60 +0,0 @@
" Settings:
set tabstop=4 softtabstop=4
set shiftwidth=4
set expandtab
set smartindent
set exrc
set relativenumber
set nohlsearch
set hidden
set nu
set nowrap
set noswapfile
set nobackup
set undodir=~/.vim/undodir
set undofile
set incsearch
set termguicolors
set scrolloff=8
set noshowmode
set signcolumn=yes
set colorcolumn=80
set noerrorbells
set number
syntax enable
set background=dark
let mapleader = " "
" Install vim-plug if not found
if empty(glob('~/.vim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
endif
" Run PlugInstall if there are missing plugins
autocmd VimEnter * if len(filter(values(g:plugs), '!isdirectory(v:val.dir)'))
\| PlugInstall --sync | source $MYVIMRC
\| endif
call plug#begin('~/.vim/plugged')
" Plug 'morhetz/gruvbox'
call plug#end()
highlight Normal guibg=none
fun! TrimWhiteSpace()
let l:save = winsaveview()
keeppatterns %s/\s\+$//e
call winrestview(l:save)
endfun
augroup MICHAEL
autocmd!
autocmd BufWritePre * :call TrimWhiteSpace()
autocmd Filetype yaml setlocal ts=2 sts=2 sw=2 expandtab
augroup END

99
vim/vimrc Normal file
View File

@@ -0,0 +1,99 @@
" ----------------------- settings ----------------------------------
set autoindent
set autowrite " automatically write files when changing
set background=dark
set backspace=indent,eol,start
set belloff=all
set colorcolumn=80
set expandtab " replace tabs with spaces automatically
set exrc
set foldmethod=manual
set hidden
set history=100 " command history
set icon
set incsearch
set nobackup
set nocompatible
set nofixendofline
set nohlsearch
set noswapfile
"set nowrap
set number
set relativenumber
set ruler " turns on col and row in lower right
" used with `set ruler`
set ruf=%30(%=%#LineNr#%.50F\ [%{strlen(&ft)?&ft:'none'}]\ %l:%c\ %p%%%)
set scrolloff=8
set shiftwidth=2
set showmode " show command and insert mode
set signcolumn=no
set smartindent
set smarttab
set softtabstop=2
set tabstop=2
set termguicolors
set textwidth=72 " Used with line wrapping
set ttyfast " faster scrolling
set undodir=~/.vim/undodir
set undofile
set viminfo='20,<1000,s1000 " prevents truncated yanks, deletes, etc.
set wildmenu
set wrap
syntax enable
filetype plugin on " sense the filesystem
let mapleader = " "
" ----------------------- plugins ----------------------------------
" Install vim-plug if not found
if empty(glob('~/.vim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
endif
" Run PlugInstall if there are missing plugins
autocmd VimEnter * if len(filter(values(g:plugs), '!isdirectory(v:val.dir)'))
\| PlugInstall --sync | source $MYVIMRC
\| endif
call plug#begin('~/.vim/plugged')
Plug 'junegunn/fzf'
Plug 'vim-pandoc/vim-pandoc'
Plug 'rwxrob/vim-pandoc-syntax-simple'
Plug 'morhetz/gruvbox'
call plug#end()
colorscheme gruvbox
" highlight Normal guibg=none
" ----------------------- utilities ----------------------------------
" fuzzy finder
let g:fzf_layout = { 'window': { 'width': 0.9, 'height': 0.6 } }
" opens fuzzy finder under the current directory
nmap <leader>ff :call fzf#run(fzf#wrap({ 'source': 'find "$PWD" -type f' }))<CR>
" opens fuzzy finder for files under a git version control
nmap <leader>fg :call fzf#run(fzf#wrap({ 'source': 'git ls-files' }))<CR>
fun! TrimWhiteSpace()
let l:save = winsaveview()
keeppatterns %s/\s\+$//e
call winrestview(l:save)
endfun
augroup MICHAEL
autocmd!
autocmd BufWritePre * :call TrimWhiteSpace()
autocmd Filetype yaml setlocal ts=2 sts=2 sw=2 expandtab
autocmd Filetype markdown setlocal tw=79 fo+=t
autocmd Filetype pandoc setlocal tw=79 fo+=t
" format json when writing a buffer.
autocmd BufWritePre *.json :silent %!jq
augroup END

View File

@@ -1,37 +0,0 @@
setopt appendhistory
setopt sharehistory
setopt incappendhistory
autoload -Uz compinit
zstyle ':completion:*' menu select
zmodload zsh/complist
# compinit
_comp_options+=(globdots) # Include hidden files.
autoload -U up-line-or-beginning-search
autoload -U down-line-or-beginning-search
zle -N up-line-or-beginning-search
zle -N down-line-or-beginning-search
# Colors
autoload -Uz colors && colors
# Load Useful Functions
source "$ZDOTDIR/zsh-functions"
zsh_add_file "zsh-aliases"
zsh_add_file "zsh-exports"
# Plugins
zsh_add_plugin "zsh-users/zsh-autosuggestions"
zsh_add_plugin "zsh-users/zsh-syntax-highlighting"
zsh_add_plugin "sindresorhus/pure"
# Prompt
fpath+="$ZDOTDIR/plugins/pure"
autoload -U promptinit; promptinit
prompt pure
cat < "$ZDOTDIR/banner"

View File

@@ -1,10 +0,0 @@
_ _
_ __ ___ | |__ ___ _ _ ___ | |__
| '_ ` _ \ _____ | '_ \ / _ \ | | | |/ __|| '_ \
| | | | | ||_____|| | | || (_) || |_| |\__ \| | | |
|_| |_| |_| |_| |_| \___/ \__,_||___/|_| |_|

View File

@@ -1,24 +0,0 @@
# configure aliases
#alias zshconfig="$ZDOTDIR"
alias zdots() { nvim "$ZDOTDIR" }
alias dots() { nvim ~/.dotfiles }
alias reload() { source "$ZDOTDIR/.zshrc" }
alias banner() { clear && cat < "$ZDOTDIR/banner" }
alias mkcd() { mkdir $1 && cd $1 }
alias l() { ls -lah "$@" }
# editor
alias vim() { nvim "$@" }
# git
alias g() { git "$@" }
alias ga() { git add . }
alias gcb() { git checkout -b "$@" }
alias gco() { git checkout "$@" }
alias gma() { git add . && git commit -m "$1" }
alias gs() { git status }
# move back to old cwd
alias bk() { cd "$OLDPWD" }

View File

@@ -1,27 +0,0 @@
#!/bin/sh
HISTSIZE=200
HISTFILE=$ZDOTDIR/history
# shell
export SHELL="$(which zsh)"
# Allow useful scripts in ~/.bin to be in the search path.
export PATH=~/.bin:$PATH
# Add homebrew to the path
if [ -d /opt/homebrew ]; then
export PATH=/opt/homebrew/bin:$PATH
export PATH=/opt/homebrew/sbin:$PATH
fi
# zsh-completions installed by homebrew
if type brew &>/dev/null; then
FPATH=$(brew --prefix)/share/zsh-completions:$FPATH
autoload -Uz compinit
compinit
fi
export EDITOR="nvim"

View File

@@ -1 +0,0 @@
export ZDOTDIR="$HOME/.config/zsh"

2
zsh/config/.zshenv Normal file
View File

@@ -0,0 +1,2 @@
# Point to where the zsh config is.
export ZDOTDIR="$HOME/.config/zsh"

209
zsh/config/.zshrc Normal file
View File

@@ -0,0 +1,209 @@
#!/usr/bin/env zsh
# _
# _______| |__ _ __ ___
# |_ / __| '_ \| '__/ __|
# / /\__ \ | | | | | (__
# /___|___/_| |_|_| \___|
#
#
#------------------------------ utilites ------------------------------
_source_if() { test -r "$1" && source "$1" || return 0 }
#------------------------------ exports ------------------------------
export ZDOTDIR="$HOME/.config/zsh"
export SHELL="$(which zsh)"
export GITUSER="m-housh"
export BUCKET="/Volumes/Bucket"
export ARCHIVE="/Volumes/Archive"
export REPOS="$BUCKET/Repos"
export GHREPOS="$REPOS/github.com/$GITUSER"
export HHEREPOS="$BUCKET/Repos/github.com/hhe-dev"
export LOCAL_REPOS="$REPOS/local"
export HCP_NOTES="$HHEREPOS/hcp-notes"
export ZETDIR="$GHREPOS/zets"
export HXZET="$BUCKET/Repos/github.com/hvac-hx/hx-zets"
export HAAS="$BUCKET/Repos/github.com/haas"
export HAASZET="$HAAS/zets"
export DOCUMENTS="$HOME/Documents"
export DOWNLOADS="$HOME/Downloads"
export PDFS="$HOME/Library/Mobile Documents/com~apple~Preview/Documents"
export SCREENSHOTS="$BUCKET/Pictures/Screenshots"
export DOTFILES="$HOME/.dotfiles"
export DESKTOP="$HOME/Desktop"
export SCRIPTS="$HOME/.local/scripts"
export WORK="$HOME/Library/Mobile Documents/com~apple~CloudDocs/Work"
export TERM=xterm-256color
export EDITOR=vi
export VISUAL=vi
export EDITOR_PREFIX=vi
export GIT_DISCOVERY_ACROSS_FILESYSTEM=1
export VIMINIT='source $MYVIMRC'
export MYVIMRC="$HOME/.vim/vimrc"
export MYZSHRC="$ZDOTDIR/.zshrc"
export PROPOSALS="$HOME/Library/Mobile Documents/com~apple~CloudDocs/Work/Proposals"
autoload -U up-line-or-beginning-search
autoload -U down-line-or-beginning-search
zle -N up-line-or-beginning-search
zle -N down-line-or-beginning-search
# Colors
autoload -Uz colors && colors
#------------------------------ pager ------------------------------
export LESS_TERMCAP_mb="" # magenta
export LESS_TERMCAP_md="" # yellow
export LESS_TERMCAP_me=""
export LESS_TERMCAP_se=""
export LESS_TERMCAP_so="" # blue
export LESS_TERMCAP_ue=""
export LESS_TERMCAP_so="" # underline
#------------------------------ path ------------------------------
path_append() {
declare arg
for arg in "$@"; do
test -d "$arg" || continue
PATH=${PATH//":$arg:"/:}
PATH=${PATH/#"$arg:"/}
PATH=${PATH/%":$arg"/}
export PATH="${PATH:+"$PATH:"}$arg"
done
} && export path_append
path_prepend() {
declare arg
for arg in "$@"; do
test -d "$arg" || continue
PATH=${PATH//:"$arg:"/:}
PATH=${PATH/#"$arg:"/}
PATH=${PATH/%":$arg"/}
export PATH="$arg${PATH:+":$PATH"}"
done
} && export path_prepend
fpath_prepend() {
declare arg
for arg in "$@"; do
test -d "$arg" || continue
FPATH=${FPATH//:"$arg:"/:}
FPATH=${FPATH/#"$arg:"/}
FPATH=${FPATH/%":$arg"/}
export FPATH="$arg${FPATH:+":$FPATH"}"
done
} && export fpath_prepend
# last arg will be first in path
path_prepend \
"/usr/local/bin" \
"/opt/homebrew/bin" \
"/opt/homebrew/sbin" \
"$HOME/.local/bin" \
"$SCRIPTS"
fpath_prepend \
"$(brew --prefix)/share/zsh/site-functions" \
"$(brew --prefix)/share/zsh-completions" \
"$ZDOTDIR/completions" \
"$HOME/.local/completions"
#------------------------------ history ------------------------------
setopt appendhistory # append to history
setopt sharehistory # share history across multiple sessions
setopt incappendhistory # adds commands as typed, not at shell exit
setopt hist_expire_dups_first # expire duplicates first
setopt hist_ignore_dups # do not store duplicates
setopt hist_find_no_dups # ignore duplicates when searching
setopt hist_reduce_blanks # do not store blank lines.
export HISTSIZE=5000
export HISTFILESIZE=10000
export HISTFILE=$ZDOTDIR/history
#set -o vi
#------------------------------ cdpath ------------------------------
setopt autocd
export CDPATH=".:$GHREPOS:$REPOS/github.com:$DOTFILES:$LOCAL_REPOS:$HOME"
#------------------------------ options ------------------------------
# (see `man zshoptions`)
setopt chaselinks
setopt extended_glob
setopt glob_dots
setopt glob_star_short
setopt clobber
setopt interactive_comments
setopt aliases
setopt auto_pushd # Push the current directory on the stack.
setopt pushd_ignore_dups # Ignore duplicates in stack
setopt pushd_silent # Do not print stack after pushd or popd.
bindkey -v # Enable vi mode
export KEYTIMEOUT=1 # Switch between vim mode quicker.
# Load Useful Functions
_source_if "${ZDOTDIR}/zsh-functions"
# Plugins
zsh_add_plugin "zsh-users/zsh-autosuggestions"
zsh_add_plugin "zsh-users/zsh-syntax-highlighting"
#------------------------------ completions ------------------------------
# case insensitive path-completion
zstyle ':completion:*' matcher-list 'm:{[:lower:][:upper:]}={[:upper:][:lower:]}' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]} l:|=* r:|=*' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]} l:|=* r:|=*' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]} l:|=* r:|=*'
# partial completion suggestions
zstyle ':completion:*' list-suffixeszstyle ':completion:*' expand prefix suffix
zstyle ':completion:*' menu select
autoload -Uz compinit; compinit # zstyle(s) should be added before this.
zmodload zsh/complist
_comp_options+=(globdots) # Include hidden files.
#------------------------------ prompt ------------------------------
# Prompt / managed by brew. (`brew install pure`)
autoload -Uz promptinit; promptinit
prompt pure
#------------------------------ aliases ------------------------------
alias bk='cd "${OLDPWD}"'
alias cdots='cd "${DOTFILES}"'
alias cl='printf "\e[H\e[2J"'
alias clear='printf "\e[H\e[2J"'
alias czets='cd "${ZETDIR}"'
alias dv='dirs -v'
alias g='git'
alias ga='git add'
alias gcb='git checkout -b'
alias gco='git checkout'
alias gcm='git commit -a -m'
#alias gma() { git add . && git commit -m "$1" }
alias gp='git push'
alias gs='git status'
alias l='ls -lah --color=auto'
alias reload='exec zsh -l'
alias temp='cd $(mktemp -d)'
alias vi='vim'
alias nvim='unset VIMINIT && unset MYVIMRC && nvim'
#------------------------------ functions ------------------------------
mkcd() {
local dir="$1"
mkdir -p "$dir" && cd "$dir"
} && export mkcd
#------------------------------ local configs ------------------------------
_source_if "$ZDOTDIR/.zshrc-local"
# [ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
test -d "$HOME/.tea" && source <("$HOME/.tea/tea.xyz/v*/bin/tea" --magic=zsh --silent)

65
zsh/config/zsh-aliases Normal file
View File

@@ -0,0 +1,65 @@
#!/bin/zsh
# configure aliases
# _ _
# ( ) (_ ) _
# ____ ___ | |__ ______ _ _ | | (_) _ _ ___ __ ___
# (_ ,)/',__)| _ `\(______) /'_` ) | | | | /'_` )/',__) /'__`\/',__)
# /'/_ \__, \| | | | ( (_| | | | | |( (_| |\__, \( ___/\__, \
# (____)(____/(_) (_) `\__,_)(___)(_)`\__,_)(____/`\____)(____/
# clear the terminal
alias cl() {
if [[ "$TMUX_PANE" ]]; then
tmux send-keys -R\; clear-history
else
clear
fi
}
# move into the ~/.dotfiles directory
alias cdots() { cd "${HOME}/.dotfiles" }
# move into zsh config files
alias zdots="vi ${ZDOTDIR}"
# open dotfiles in nvim editor
alias dots="vi $DOTFILES"
# print the banner
#alias banner() { clear && cat < "$ZDOTDIR/banner" }
# create a directory and move into it.
#alias mkcd() { mkdir $1 && cd $1 }
# list files and directories, including hidden files
#alias l() { ls -lah --color "$@" }
# editor
alias vim() { nvim "$@" }
alias vi() { nvim "$@" }
# git
alias g() { git "$@" }
alias ga() { git add . }
alias gcb() { git checkout -b "$@" }
alias gco() { git checkout "$@" }
alias gl() { git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit }
alias gma() { git add . && git commit -m "$1" }
alias gp() { git push }
alias gs() { git status }
# move back to old cwd
alias bk="cd $OLDPWD"
# My mac-mini specific aliases
# if [ $(hostname -s) = "Michaels-Mac-mini" ]; then
# alias projects() { cd "/Volumes/M1 Mac-Mini External Drive/Projects" }
# fi
# change file to be executable
#alias chmox() { chmod +x "$@" }
# tmux
#alias ta() { tmux -f ~/.config/tmux/tmux.config attach "$@" }

View File

@@ -1,3 +1,4 @@
#!/bin/zsh
# Function to source files if they exist # Function to source files if they exist
function zsh_add_file() { function zsh_add_file() {
[ -f "$ZDOTDIR/$1" ] && source "$ZDOTDIR/$1" [ -f "$ZDOTDIR/$1" ] && source "$ZDOTDIR/$1"