Compare commits

...
Sign in to create a new pull request.

81 commits

Author SHA1 Message Date
0cca706243
feat: update to self-hosted git forge 2025-06-12 14:11:59 -05:00
c2d9017d1c
Add cursor open and reset my leader key
Leader being set to space was seemingly not working. Set it back to the
default since I don't really use leader that often
2025-04-15 12:33:36 -05:00
60458b51c9
Same with Zellij, evidently 2025-03-06 10:01:29 -06:00
d9b34f9645
Remove screen from being stowed
I axed my screen configs a while back, never updated the installer
2025-03-06 10:00:47 -06:00
3b008fcb76
Trashing the stuff I don't use anymore 2024-11-24 11:52:47 -06:00
7154e64e43
Add Karabiner-Elements and Zellij configs
Tossed karabiner inside of the macos directory. Starting to wonder if I
outta break that directory up, or if I outta double down and consolidate
around which system the files apply to.
2024-11-14 18:27:33 -06:00
0276c4820b
Option as Alt for macOS so I can Zellij good 2024-11-13 23:11:07 -06:00
3a34bc148d
Update syntax to the new format 2024-11-12 14:52:24 -06:00
102b0cfce1
Add env.term
Trying to debug something, unsure if this actually helped, but don't see
any good reason to omit it either.
2024-11-07 17:59:33 -06:00
f4f190ee64
Disable app hotkeys, remap window snapping 2024-11-07 17:59:32 -06:00
fc7f761135
Just flip flopping on key mappings 2024-11-07 12:36:51 -06:00
cb91fb43fa
Disable the single tap overview in GNOME 2024-11-07 12:29:40 -06:00
453519ba35
Bring back SUPER+1-9 app jumping
Figured out how to get things a bit more consistent over on macOS, so
these guys can make their dramatic return.

Definitely was a rough couple of days without them.
2024-11-07 12:21:44 -06:00
e5f9540990
Clear app switching hotkeys in GNOME 2024-11-04 17:01:56 -06:00
4c30bbfc20
Move away from OS-specific NVM stuff 2024-10-26 15:46:33 -05:00
ca3cfcc01c
Add antigen, and remove old Zsh plugin loading
Trying to reduce the amount of OS-specific stuff going on.
2024-10-24 19:06:14 -05:00
922ada9668
Porting over some stuff to fish
Detouring to get my Zsh wired up with a package / plugin manager.
2024-10-23 22:49:55 -05:00
4a06eafcbc
Unifying my browser experience across systems 2024-10-21 18:09:29 -05:00
b3e3f4fc1b
Scaffolding for when I start FiSHing 2024-10-17 15:35:07 -05:00
948f55b41a
Cleaned up the README a bit more 2024-10-17 15:22:40 -05:00
6d69343703
Include extension on install script, update README 2024-10-17 15:17:18 -05:00
9e03f541fa
Get FZF working in Neovim + Lazy 2024-10-17 12:51:41 -05:00
a3072e86e3
Migrate to lazy.nvim 2024-10-17 12:15:59 -05:00
4567232315
Completely separate vim and nvim files 2024-10-17 11:25:48 -05:00
6333126118
No reason to keep these around 2024-10-16 16:13:58 -05:00
dfa1a569ea
Fix typo in .env file 2024-10-16 11:31:47 -05:00
b53f430f59
Boomeranging back to Neovim
Been playing with new color schemes as I've switched to Alacritty. Ran
into a scenario where there was a color scheme for Neovim and not Vim.
New color scheme is solid, so my previous color scheme issues are now
null and void.

Instead of juggling around with a shared configuration, I've committed
to a separate configuration for Vim and Neovim.
2024-10-16 11:24:23 -05:00
82bbb89260
Adjust font size a bit
Need to figure out how I can set this based on which rig I'm on.
2024-10-15 10:34:18 -05:00
e142777fdf
Add alactitty to the installer 2024-10-15 10:29:13 -05:00
4db3639f60
Invite Alacritty to the party 2024-10-14 22:57:13 -05:00
ce13923d34
Add a new git merge alias 2024-06-26 11:25:46 -05:00
db9d9628e5
Set a shared vim undo directory
And be sure to create it during installation
2024-06-25 20:46:37 -05:00
f55283485b
Go back to shorthand because macOS 2024-06-25 20:38:58 -05:00
7db4ff12a3
Alias top to htop 2024-06-25 10:05:51 -05:00
3b1a3404d6
Expand comments, make arguments verbose, consolidate
On this kick of making sure my dotfiles are an easy to follow living
document, so I'm removing any shorthand, writing better comments, and
added bonus, I consolidated some of the redundant OS checks.
2024-06-24 13:06:09 -05:00
5efa8e898e
Drop Tmux config
Only added this crap because NeoVim was giving me crap. Tmux with it's
stock config hasn't done me wrong... that I know of.
2024-06-24 10:46:38 -05:00
34dba2da21
Expand the short hand, do some additional clean up
Also added a line to always show the status line, similar to the one
thing I liked about NeoVim
2024-06-24 10:40:12 -05:00
7f4c250187
Add plugin to make it easier to jump out to GitHub 2024-06-24 10:13:23 -05:00
983e0d4396
Dropping some more NeoVim references 2024-06-24 10:13:06 -05:00
8c545c1d44
Remove NeoVim aliases
Long live Vim!

Seriously, really irked about the color scheme debacle and how I'm over
here jumping through hoops to get stuff that was working perfectly, back
to working order.
2024-06-24 09:53:27 -05:00
2fcbc384a4
Fix typo on Arch
I use Arch, BTW ;)
2024-06-19 09:36:25 -05:00
2c46da9c83
Drop this line I don't even remember why I added
Seems this is quite frowned upon. Couldn't tell ya why the heck I even
added this.
2024-06-18 21:29:49 -05:00
79f6b58d1e
Clean up and add some stuff to appease NeoVim 2024-06-18 21:29:23 -05:00
d5dee9f714
Did some clean up, mostly just removing crap
Had a TODO in there. I implemented it. It ended up being exactly the
same number of lines. No reason to try to smart kid the code for the
same amount of code that's less readable.
2024-06-18 21:13:25 -05:00
519fa2ab98
Conditionally set the runtime path 2024-06-18 20:54:23 -05:00
87fbd01e21
Move finder hotkey, cleaned up stuff 2024-06-18 20:43:21 -05:00
eb31316b2e
Update license 2024-06-18 19:00:22 -05:00
19c802aa52
Add tmux config and bring back Neovim
Tmux config seems like it probably solved things. Wondering if I outta
put a line in there to automatically source the tmux config. Still can't
believe I've went this long without needing to muck with the tmux config
at all. I wonder how life will be different now, hopefully better.
2024-06-18 18:56:18 -05:00
112a2e95e6
Drop Vim aliases to NeoVim
Something screwy going on with 0.10.0 and whatever they did with the new
colorscheme stuff. You can't mess with a person's setup like that.

Going to slink back over to using mainline Vim for a bit.
2024-06-17 11:48:25 -05:00
e2be791528
Added vimproc plugin
Even though it's required when on older vim versions, and I'm on neovim,
opening TypeScript files with FZF was borked. This fixes it.
Productivity ensues.
2024-03-28 11:02:50 -05:00
d4ae18d2e3
Add SSH_AUTH_SOCK to fix recent GNOME change
Need to see how this works over on ol' macOS, got a feeling it'll break
something over there and will need to be walled off
2024-03-04 11:29:34 -06:00
51ecf01feb
Couple of changes I had laying around 2023-10-01 12:26:44 -05:00
c8ab9f6894
Update my favorite apps 2023-10-01 12:26:44 -05:00
68955cea7c
I missed you Arch Linux 2023-07-07 18:51:29 -05:00
dce619ff59
Arch doesn't live here anymore 2022-12-28 15:11:15 -06:00
2ede8c65a6
Add automatic node.js switching 2022-12-28 15:09:43 -06:00
a0a290a98a
Who let that tab in here? 2022-12-06 17:02:03 -06:00
ccf3ea1161
Somehow ended up with apt on macOS, which borked the alias 2022-10-24 22:23:21 -05:00
d248894481
Fix FZF on Debian
May just start to source these directly especially since that's the only
thing that I do that's reliant on the runtime path.
2022-09-06 11:53:52 -05:00
678395dcdb
Lowercase uuidgen output on macOS 2022-08-28 17:02:04 -05:00
880860d4c1
Commit to nvm and tweak for Debian 2022-08-15 14:46:13 -05:00
2f370a1113
Fix [bat]cat alias on Debian 2022-08-15 14:26:27 -05:00
ef02a3dfe2
Updated some things for my Debian homecoming 2022-08-15 14:17:03 -05:00
ce562d7eda
Added Copilot 2022-06-21 15:05:28 -05:00
bfba3fdf9d
Maybe in another life
Just wasn't for me
2022-06-21 13:32:42 -05:00
fd43150339
More tweaking on macOS 2022-06-19 16:11:42 -05:00
186278be5a
Add homebrew path for fzf 2022-06-07 21:01:07 -05:00
2abaf751f5
Replace Caps Lock with Hyper 2022-06-06 17:24:16 -05:00
bfd4b0d6bf
Force ssh:// over git://
This stemmed from an issue where an older version of npm wasn't properly
resolving git:// repos as well as github-style dependency names.

Don't think it'll cause any harm to carry this around between my rigs.
2022-06-06 13:45:01 -05:00
cf87564eb4
Moved to hyper key, disable menubar notifications 2022-06-04 23:13:04 -05:00
991426901a
Add additional key to the window snapping
Turns out I was overriding some macOS goodness. Also dropped the
tooltips from the slack notification since it fell apart with the
bullet.
2022-06-03 19:48:14 -05:00
d527bf3f02
Add in homebrew nvm path 2022-06-02 20:10:40 -05:00
fa85ede489
No more spoons 2022-06-02 18:39:35 -05:00
bace5c81ec
Nil not empty string 2022-06-01 21:50:31 -05:00
fb4711a5e8
Slack notification menubar, and other stuff 2022-06-01 21:21:03 -05:00
aa3272ae31
Simplify bindings, added some other stuff 2022-06-01 13:41:07 -05:00
00dad3db06
Window snapping 2022-05-31 21:59:46 -05:00
4c71424005
Add hushlogin file 2022-05-31 21:18:17 -05:00
56fa93eea7
Stub out macOS/hammerspon stuff 2022-05-31 21:14:57 -05:00
b4f0dc8181
Stub out macOS/hammerspon stuff 2022-05-31 21:04:32 -05:00
a66f5b0f2b
Doin' macOS stuff 2022-05-31 20:40:22 -05:00
28 changed files with 751 additions and 76 deletions

2
.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
.DS_Store
Spoons

View file

@ -1,7 +1,7 @@
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2010-2022 Josh Sherman <hello@joshtronic.com>
Copyright (C) 1981-2024 Josh Sherman <hello@joshtronic.com>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long

View file

@ -1,12 +1,17 @@
# [joshtronic](https://joshtronic.com) does `dotfiles`
# The `dotfiles` of one Josh Sherman
These are my `dotfiles`. There are many like them, but these are mine. My
`dotfiles` are my best friend. They are my life. I must master them as I must
master my life. My `dotfiles`, without me, are useless. Without my `dotfiles`, I
am useless.
These are my `dotfiles`.
There are many like them, but these are mine.
My `dotfiles` are my best friend.
They are my life.
I must master them as I must master my life.
My `dotfiles`, without me, are useless.
Without my `dotfiles`, I am useless.
## Installation
```shell
bash -c "$(curl -fsSL https://raw.githubusercontent.com/joshtronic/dotfiles/main/install)"
sh -c "$(curl -fsSL https://git.sherver.org/joshtronic/dotfiles/raw/branch/main/install.sh)"
```
![BOOM](https://media.giphy.com/media/laUY2MuoktHPy/source.gif)

View file

@ -0,0 +1,20 @@
general.import = ['~/.config/alacritty/themes/solarized_osaka.toml']
[window]
option_as_alt = 'Both'
padding.x = 5
padding.y = 5
[font]
normal.family = 'Fira Code'
bold.family = 'Fira Code'
italic.family = 'Fira Code'
bold_italic.family = 'Fira Code'
size = 12.0
[colors]
cursor.text = '#d33682'
cursor.cursor = '#d33682'
[env]
term = "xterm-256color"

View file

@ -0,0 +1,29 @@
# Colors (Solarized Osaka)
# Source https://github.com/craftzdog/solarized-osaka.nvim
# Default colors
[colors.primary]
background = '#001a1d'
foreground = '#839496'
# Normal colors
[colors.normal]
black = '#073642'
red = '#dc322f'
green = '#859900'
yellow = '#b58900'
blue = '#268bd2'
magenta = '#d33682'
cyan = '#2aa198'
white = '#eee8d5'
# Bright colors
[colors.bright]
black = '#4c4c4c'
red = '#cb4b16'
green = '#586e75'
yellow = '#657b83'
blue = '#839496'
magenta = '#6c71c4'
cyan = '#93a1a1'
white = '#fdf6e3'

View file

@ -0,0 +1,22 @@
#!/usr/bin/env fish
# Speed up `brew install`
set -gx HOMEBREW_NO_AUTO_UPDATE 1
set -gx HOMEBREW_NO_INSTALL_CLEANUP 1
source $HOME/.env
source $HOME/.aliases
eval (dircolors $HOME/.dircolors)
# Load up and configure fzf, nvm, and zsh plugins
if test (uname) = "Darwin"
# macOs
elif type -q apt
# Debian
elif type -q pacman
# Arch
end

View file

@ -46,3 +46,6 @@
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
[url "ssh://git@"]
insteadOf = git://

View file

@ -16,14 +16,20 @@ done
DOTFILES=$HOME/.dotfiles
if [ ! -d "$DOTFILES" ]; then
git clone git@github.com:joshtronic/dotfiles.git "$DOTFILES"
git clone ssh://git@git.sherver.org:22381/joshtronic/dotfiles.git "$DOTFILES"
cd "$DOTFILES" || exit
else
cd "$DOTFILES" || exit
git pull origin main
fi
stow git screen vim zsh
stow alacritty git nvim vim zsh
if [[ `uname` == Darwin ]]; then
stow macos
fi
mkdir -p ~/.local/share/vim/undo/
cd "$HOME" || exit
rm -f "${HOME}/.zcompdump*"

View file

@ -0,0 +1,42 @@
{
"global": { "show_in_menu_bar": false },
"profiles": [
{
"complex_modifications": {
"rules": [
{
"manipulators": [
{
"description": "Change right_command to command+control+option+shift.",
"from": {
"key_code": "right_command",
"modifiers": { "optional": ["any"] }
},
"to": [
{
"key_code": "left_shift",
"modifiers": ["left_command", "left_control", "left_option"]
}
],
"to_if_alone": [{ "key_code": "f20" }],
"type": "basic"
}
]
}
]
},
"name": "Default profile",
"selected": true,
"simple_modifications": [
{
"from": { "key_code": "caps_lock" },
"to": [{ "key_code": "left_control" }]
}
],
"virtual_hid_keyboard": {
"country_code": 0,
"keyboard_type_v2": "ansi"
}
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

View file

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="100%" height="100%" viewBox="0 0 180 226" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;">
<g id="Group" transform="matrix(1,0,0,1,5.782,-41.586)">
<g transform="matrix(1,0,0,1,4,112)">
<path id="Shape" d="M145.932,115.67C150.717,115.687 155.312,113.799 158.701,110.422C162.091,107.045 163.996,102.457 163.996,97.672C163.998,79.399 163.998,51.162 163.998,32.839C163.998,28.065 162.102,23.487 158.726,20.111C155.35,16.735 150.772,14.839 145.998,14.839L131.16,14.839C128.951,14.839 127.16,13.048 127.16,10.839L127.16,1.409L10.13,1.409C10.13,1.409 10.388,121.948 10.425,139.622C10.428,140.985 11.125,142.254 12.275,142.987C17.487,146.005 34.196,151.737 69.279,151.737C105.104,151.737 121.118,144.063 125.703,140.598C126.614,139.842 127.141,138.72 127.141,137.536C127.16,133.711 127.16,124.848 127.16,119.612C127.16,118.537 127.593,117.507 128.361,116.755C129.129,116.002 130.168,115.591 131.243,115.613C135.644,115.675 140.917,115.684 145.932,115.67ZM127.16,35.864C127.16,34.538 127.687,33.266 128.624,32.328C129.562,31.391 130.834,30.864 132.16,30.864L144.898,30.864C146.224,30.864 147.496,31.391 148.434,32.328C149.371,33.266 149.898,34.538 149.898,35.864L149.898,94.049C149.898,95.375 149.371,96.647 148.434,97.585C147.496,98.522 146.224,99.049 144.898,99.049L132.16,99.049C130.834,99.049 129.562,98.522 128.624,97.585C127.687,96.647 127.16,95.375 127.16,94.049L127.16,35.864Z" style="fill:white;fill-rule:nonzero;stroke:black;stroke-width:4.79px;"/>
<path id="Path" d="M21.667,0.249L21.667,124.235C21.667,125.666 22.431,126.988 23.67,127.702C28.731,130.114 43.413,135.871 69.154,135.871C95.066,135.871 109.312,128.876 114.082,125.993C115.221,125.259 115.909,123.996 115.909,122.642C115.92,106.201 115.92,0.249 115.92,0.249L21.667,0.249Z" style="fill:rgb(251,176,64);"/>
<g id="Path1" serif:id="Path" transform="matrix(1,0,0,0.849312,0,21.0375)">
<path d="M35.521,0.249L35.521,113.065" style="fill:none;stroke:rgb(255,219,150);stroke-width:11.96px;stroke-linecap:round;stroke-linejoin:miter;"/>
</g>
</g>
<g id="Path2" serif:id="Path" transform="matrix(1,0,0,1,-5.782,-3.414)">
<path d="M43.739,73.505C46.212,68.507 51.367,65.417 57.313,65.065C64.48,64.641 68.48,69.262 68.48,68.852C68.48,57.84 77.408,48.914 88.421,48.914C99.435,48.914 108.357,57.84 108.357,68.852C108.357,68.965 112.598,63.885 119.322,64.069C127.246,64.286 133.677,70.496 133.677,78.424C133.677,82.527 129.441,89.152 129.441,89.152C131.639,87.912 134.17,87.195 136.873,87.195C140.511,87.195 143.851,88.478 146.463,90.616C149.943,93.393 152.173,97.67 152.171,102.467C152.171,110.133 146.48,116.468 139.092,117.479C137.419,117.716 135.778,118.142 134.201,118.749C129.81,120.404 125.32,121.776 120.784,122.908C120.558,125.144 119.892,127.25 118.875,129.139C117.035,132.591 116.21,136.494 116.495,140.396C116.493,140.632 116.502,141.868 116.502,142.106C116.502,147.062 112.486,150.078 107.526,150.078C102.573,150.078 98.555,146.063 98.555,141.106C98.555,139.106 97.378,136.718 95.445,135.519C94.997,135.248 94.564,134.957 94.145,134.646C91.588,132.783 89.578,130.212 88.399,127.222C62.849,128.068 39.538,123.582 27.787,120.413C24.766,119.557 21.706,118.846 18.616,118.283C15.6,117.685 12.894,116.209 10.786,114.132C7.882,111.371 6.073,107.47 6.073,103.147C6.073,94.902 12.654,88.195 20.854,87.998C14.382,82.58 21.649,69.35 32.391,68.85C37.957,68.591 43.739,73.505 43.739,73.505Z" style="fill:white;stroke:black;stroke-width:4.79px;stroke-linecap:round;"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

View file

@ -0,0 +1,79 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="100%"
height="100%"
viewBox="0 0 180 226"
version="1.1"
xml:space="preserve"
style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;"
id="svg13"
sodipodi:docname="brew-logo-white-alt.svg"
inkscape:version="1.1.2 (0a00cf5339, 2022-02-04, custom)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:serif="http://www.serif.com/"><defs
id="defs17" /><sodipodi:namedview
id="namedview15"
pagecolor="#505050"
bordercolor="#ffffff"
borderopacity="1"
inkscape:pageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="1"
showgrid="false"
inkscape:zoom="3.8628319"
inkscape:cx="89.959908"
inkscape:cy="113.12944"
inkscape:window-width="3840"
inkscape:window-height="1531"
inkscape:window-x="0"
inkscape:window-y="32"
inkscape:window-maximized="1"
inkscape:current-layer="Group" />
<g
id="Group"
transform="matrix(1,0,0,1,5.782,-41.586)"
style="fill:#ffffff">
<g
transform="matrix(1,0,0,1,4,112)"
id="g7"
style="fill:#ffffff">
<g
id="Shape"><path
id="path1885"
style="color:#000000;clip-rule:nonzero;fill-rule:nonzero;stroke-width:4.79px;stroke-linejoin:miter;-inkscape-stroke:none"
d="M 19.912109 71.822266 C 19.912109 71.822266 20.170031 192.36116 20.207031 210.03516 C 20.210031 211.39816 20.906641 212.66739 22.056641 213.40039 C 27.268641 216.41839 43.977547 222.15039 79.060547 222.15039 C 114.88555 222.15039 130.89938 214.47672 135.48438 211.01172 C 136.39538 210.25572 136.92383 209.13322 136.92383 207.94922 C 136.94283 204.12422 136.94141 195.26139 136.94141 190.02539 C 136.94141 188.95039 137.37458 187.92192 138.14258 187.16992 C 138.91058 186.41692 139.95039 186.00534 141.02539 186.02734 C 145.42639 186.08934 150.69984 186.09798 155.71484 186.08398 C 160.49984 186.10098 165.09342 184.21294 168.48242 180.83594 C 171.87242 177.45894 173.77734 172.87094 173.77734 168.08594 C 173.77934 149.81294 173.7793 121.57691 173.7793 103.25391 C 173.7793 98.479906 171.88381 93.901391 168.50781 90.525391 C 165.13181 87.149391 160.5533 85.253906 155.7793 85.253906 L 140.94141 85.253906 C 138.73241 85.253906 136.94141 83.462906 136.94141 81.253906 L 136.94141 71.822266 L 125.70117 71.822266 C 125.70117 73.794432 125.7023 176.77148 125.69141 193.05664 C 125.69141 194.41064 125.00228 195.67225 123.86328 196.40625 C 119.09328 199.28925 104.84755 206.28516 78.935547 206.28516 C 53.194547 206.28516 38.512172 200.52723 33.451172 198.11523 C 32.212172 197.40123 31.449219 196.07944 31.449219 194.64844 L 31.449219 71.822266 L 19.912109 71.822266 z M 141.94141 101.27734 L 154.67969 101.27734 C 156.00569 101.27734 157.2788 101.80519 158.2168 102.74219 C 159.1538 103.68019 159.67969 104.95134 159.67969 106.27734 L 159.67969 164.46289 C 159.67969 165.78889 159.1538 167.06005 158.2168 167.99805 C 157.2788 168.93505 156.00569 169.46289 154.67969 169.46289 L 141.94141 169.46289 C 140.61541 169.46289 139.34425 168.93505 138.40625 167.99805 C 137.46925 167.06005 136.94141 165.78889 136.94141 164.46289 L 136.94141 106.27734 C 136.94141 104.95134 137.46925 103.68019 138.40625 102.74219 C 139.34425 101.80519 140.61541 101.27734 141.94141 101.27734 z "
transform="translate(-9.782,-70.414)" /><path
style="color:#000000;clip-rule:nonzero;fill-rule:nonzero;stroke-linejoin:miter;-inkscape-stroke:none"
d="M 10.130859,-0.98632813 A 2.3952395,2.3952395 0 0 0 7.734375,1.4140625 c 0,0 0.257923,120.5394175 0.2949219,138.2128875 0.00479,2.17621 1.1223439,4.20825 2.9589841,5.37891 a 2.3952395,2.3952395 0 0 0 0.08594,0.0547 c 5.994891,3.47133 22.861243,9.07226 58.205078,9.07226 36.166983,0 52.499153,-7.56824 57.867183,-11.625 a 2.3952395,2.3952395 0 0 0 0.0859,-0.0664 c 1.45784,-1.2098 2.30274,-3.01158 2.30274,-4.90625 0.019,-3.84808 0.0195,-12.69183 0.0195,-17.92383 0,-0.43188 0.17401,-0.84254 0.48242,-1.14453 a 2.3952395,2.3952395 0 0 0 0,-0.002 c 0.30803,-0.30201 0.72287,-0.4659 1.15625,-0.45703 a 2.3952395,2.3952395 0 0 0 0.0156,0 c 4.41998,0.0623 9.69708,0.0706 14.71485,0.0566 5.42042,0.0193 10.62722,-2.11933 14.46679,-5.94531 3.84058,-3.82584 6,-9.02661 6,-14.447265 0.002,-18.273252 0.002,-46.50905 0.002,-64.832031 0,-5.408113 -2.1482,-10.597417 -5.97266,-14.421875 -3.82446,-3.824458 -9.01376,-5.97461 -14.42187,-5.97461 h -14.83789 c -0.91447,0 -1.60547,-0.689052 -1.60547,-1.603515 V 1.4082031 a 2.3952395,2.3952395 0 0 0 -2.39453,-2.39453123 z M 12.53125,3.8046875 h 112.23438 v 7.0351565 c 0,3.503532 2.89099,6.394531 6.39453,6.394531 h 14.83789 c 4.13987,0 8.10762,1.642777 11.03515,4.570312 2.92754,2.927536 4.57032,6.895279 4.57032,11.035157 0,18.322981 4e-5,46.559319 -0.002,64.832031 0,4.149335 -1.65237,8.124585 -4.59179,11.052735 -2.93842,2.92801 -6.91879,4.56552 -11.06836,4.55078 a 2.3952395,2.3952395 0 0 0 -0.0156,0 c -5.0021,0.014 -10.25827,0.005 -14.63281,-0.0566 -1.71571,-0.0351 -3.37965,0.62147 -4.60742,1.82422 -1.22759,1.20201 -1.91993,2.85024 -1.91992,4.56836 -1e-5,5.23599 -6.3e-4,14.10549 -0.0195,17.91211 a 2.3952395,2.3952395 0 0 0 0,0.0117 c 0,0.46259 -0.20962,0.8918 -0.55859,1.19336 -3.87156,2.8972 -19.54919,10.61328 -54.908203,10.61328 -34.70498,0 -51.23297,-5.81649 -55.728516,-8.39453 -0.451085,-0.29706 -0.729276,-0.78842 -0.730468,-1.33008 C 12.783954,122.24965 12.539914,7.8526281 12.53125,3.8046875 Z M 132.16016,28.46875 c -1.96057,0 -3.84226,0.779286 -5.22852,2.164062 a 2.3952395,2.3952395 0 0 0 -0.002,0.002 c -1.38478,1.386254 -2.16407,3.267945 -2.16406,5.228515 v 58.185547 c -1e-5,1.960571 0.77928,3.842261 2.16406,5.228516 a 2.3952395,2.3952395 0 0 0 0.002,0.002 c 1.38626,1.384773 3.26795,2.164063 5.22852,2.164063 h 12.73828 c 1.96057,0 3.84226,-0.77929 5.22851,-2.164063 a 2.3952395,2.3952395 0 0 0 0.002,-0.002 c 1.38477,-1.386255 2.16406,-3.267945 2.16406,-5.228516 V 35.863281 c 0,-1.96057 -0.77929,-3.842261 -2.16406,-5.228515 a 2.3952395,2.3952395 0 0 0 -0.002,-0.002 c -1.38625,-1.384776 -3.26794,-2.164062 -5.22851,-2.164062 z m 0,4.791016 h 12.73828 c 0.6908,0 1.35218,0.273328 1.84179,0.761718 0.48923,0.489744 0.76368,1.150371 0.76368,1.841797 v 58.185547 c 0,0.690543 -0.27368,1.352239 -0.76172,1.841797 -0.48975,0.489222 -1.15233,0.763672 -1.84375,0.763672 h -12.73828 c -0.69055,0 -1.35224,-0.273672 -1.8418,-0.761719 l -0.002,-0.002 c -0.48805,-0.489558 -0.76172,-1.151254 -0.76172,-1.841797 V 35.863281 c 0,-0.691426 0.27445,-1.352053 0.76367,-1.841797 0.48961,-0.48839 1.151,-0.761718 1.8418,-0.761718 z"
id="path1887" /></g>
<g
id="Path1"
serif:id="Path"
transform="matrix(1,0,0,0.849312,0,21.0375)"
style="fill:#ffffff">
<path
d="M35.521,0.249L35.521,113.065"
style="fill:#ffffff;stroke:#ffffff;stroke-width:11.96px;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:1"
id="path4" />
</g>
</g>
<g
id="Path2"
serif:id="Path"
transform="matrix(1,0,0,1,-5.782,-3.414)"
style="fill:#ffffff">
<g
id="path9"><path
style="color:#000000;clip-rule:nonzero;fill-rule:nonzero;stroke-width:4.79px;stroke-linecap:round;stroke-linejoin:miter;-inkscape-stroke:none"
d="m 43.739,73.505 c 2.473,-4.998 7.628,-8.088 13.574,-8.44 7.167,-0.424 11.167,4.197 11.167,3.787 0,-11.012 8.928,-19.938 19.941,-19.938 11.014,0 19.936,8.926 19.936,19.938 0,0.113 4.241,-4.967 10.965,-4.783 7.924,0.217 14.355,6.427 14.355,14.355 0,4.103 -4.236,10.728 -4.236,10.728 2.198,-1.24 4.729,-1.957 7.432,-1.957 3.638,0 6.978,1.283 9.59,3.421 3.48,2.777 5.71,7.054 5.708,11.851 0,7.666 -5.691,14.001 -13.079,15.012 -1.673,0.237 -3.314,0.663 -4.891,1.27 -4.391,1.655 -8.881,3.027 -13.417,4.159 -0.226,2.236 -0.892,4.342 -1.909,6.231 -1.84,3.452 -2.665,7.355 -2.38,11.257 -0.002,0.236 0.007,1.472 0.007,1.71 0,4.956 -4.016,7.972 -8.976,7.972 -4.953,0 -8.971,-4.015 -8.971,-8.972 0,-2 -1.177,-4.388 -3.11,-5.587 -0.448,-0.271 -0.881,-0.562 -1.3,-0.873 -2.557,-1.863 -4.567,-4.434 -5.746,-7.424 -25.55,0.846 -48.861,-3.64 -60.612,-6.809 -3.021,-0.856 -6.081,-1.567 -9.171,-2.13 -3.016,-0.598 -5.722,-2.074 -7.83,-4.151 -2.904,-2.761 -4.713,-6.662 -4.713,-10.985 0,-8.245 6.581,-14.952 14.781,-15.149 -6.472,-5.418 0.795,-18.648 11.537,-19.148 5.566,-0.259 11.348,4.655 11.348,4.655 z"
id="path1836" /><path
style="color:#000000;clip-rule:nonzero;fill-rule:nonzero;stroke-linecap:round;stroke-linejoin:miter;-inkscape-stroke:none"
d="m 88.421875,46.519531 c -10.905834,0 -19.989162,7.883987 -21.923828,18.240235 -2.175028,-1.169358 -5.330291,-2.322334 -9.326172,-2.085938 -5.723587,0.338833 -10.817617,3.089966 -14.013672,7.498047 -2.11332,-1.58771 -5.775127,-3.952335 -10.878906,-3.714844 -6.325989,0.294451 -11.461408,4.232679 -14.183594,8.919922 -1.361093,2.343622 -2.152152,4.918334 -2.074219,7.486328 0.03463,1.14097 0.338807,2.270792 0.771485,3.351563 -7.5244625,1.978269 -13.1152346,8.805096 -13.1152346,16.931636 0,4.9827 2.0928439,9.50903 5.4433594,12.70313 2.4318282,2.39083 5.5505412,4.09345 9.0292972,4.7832 a 2.3952395,2.3952395 0 0 0 0.03711,0.006 c 3.014489,0.54924 5.999723,1.24294 8.947266,2.07813 a 2.3952395,2.3952395 0 0 0 0.0293,0.008 c 11.739722,3.16596 34.576516,7.50998 59.859375,6.87109 1.37867,2.73888 3.248851,5.18926 5.705079,6.98047 0.475462,0.35237 0.967683,0.68436 1.476562,0.99219 l -0.02344,-0.0137 c 1.092584,0.67771 1.978515,2.49042 1.978515,3.55078 0,6.2512 5.117954,11.36719 11.365234,11.36719 2.96544,0 5.76993,-0.89648 7.89453,-2.69336 2.1246,-1.79689 3.47656,-4.54892 3.47656,-7.67383 0,-0.29838 -0.007,-1.5852 -0.006,-1.68945 a 2.3952395,2.3952395 0 0 0 -0.008,-0.19532 c -0.25187,-3.44846 0.47715,-6.89621 2.10157,-9.94726 l 0.004,-0.008 c 0.90542,-1.68357 1.47789,-3.55154 1.84766,-5.49023 4.11194,-1.07595 8.2055,-2.27621 12.20898,-3.78516 a 2.3952395,2.3952395 0 0 0 0.0156,-0.006 c 1.40407,-0.54045 2.86581,-0.92089 4.35547,-1.13282 l 0.0117,-0.002 c 8.54939,-1.17593 15.13769,-8.53455 15.13868,-17.38086 0.002,-5.537852 -2.58075,-10.506936 -6.60547,-13.720703 -3.02031,-2.465363 -6.89534,-3.947266 -11.08789,-3.947266 -0.91153,0 -1.7638,0.211766 -2.63868,0.347656 0.94126,-2.047471 1.8379,-4.318534 1.8379,-6.724609 0,-9.223168 -7.54711,-16.497789 -16.68555,-16.748047 -3.84838,-0.105309 -6.93921,1.255369 -9.10938,2.621094 C 108.16556,54.166057 99.168371,46.519531 88.421875,46.519531 Z m 0,4.789063 c 9.720015,0 17.541015,7.824609 17.541015,17.542968 0,4.42e-4 0.21472,0.995811 0.21484,0.996094 1.3e-4,2.84e-4 1.12475,1.156123 1.125,1.15625 2.6e-4,1.27e-4 1.23009,0.23831 1.23047,0.238281 3.9e-4,-2.8e-5 0.62449,-0.130676 0.625,-0.130859 0.001,-3.65e-4 0.39302,-0.178033 0.48243,-0.234375 0.0894,-0.05634 0.14198,-0.09514 0.18359,-0.126953 0.16644,-0.127258 0.18918,-0.15808 0.22851,-0.195313 0.0787,-0.07446 0.12227,-0.120963 0.1836,-0.18164 0.12265,-0.121355 0.28405,-0.278067 0.5,-0.47461 0.4319,-0.393085 1.07181,-0.927773 1.88476,-1.455078 1.62592,-1.054608 3.889,-2.055605 6.63477,-1.980468 6.70955,0.183742 12.02539,5.328121 12.02539,11.960937 0,1.227287 -0.8813,3.816187 -1.875,5.851563 -0.9937,2.035375 -1.98242,3.585937 -1.98242,3.585937 a 2.3952395,2.3952395 0 0 0 3.19336,3.376953 c 1.85683,-1.047529 3.97639,-1.648437 6.25586,-1.648437 3.0749,0 5.87123,1.077294 8.07226,2.878906 a 2.3952395,2.3952395 0 0 0 0.0234,0.01953 c 2.93279,2.340334 4.80833,5.924362 4.80664,9.978519 0,6.48067 -4.78765,11.78748 -11.00781,12.63867 a 2.3952395,2.3952395 0 0 0 -0.0117,0.002 c -1.85228,0.2624 -3.66979,0.73411 -5.41602,1.40625 -4.29062,1.61641 -8.68696,2.95984 -13.13671,4.07031 a 2.3952395,2.3952395 0 0 0 -1.80274,2.08399 c -0.19379,1.91732 -0.76309,3.71687 -1.63476,5.33594 a 2.3952395,2.3952395 0 0 0 -0.004,0.008 c -2.0527,3.85104 -2.97416,8.20597 -2.65625,12.55859 l -0.006,-0.19531 c -0.003,0.36774 0.008,1.55285 0.008,1.73047 0,1.83108 -0.6559,3.06551 -1.77929,4.01562 -1.1234,0.95012 -2.80818,1.5625 -4.80274,1.5625 -3.65871,0 -6.57617,-2.91534 -6.57617,-6.57812 0,-2.93964 -1.468777,-5.9008 -4.242189,-7.6211 a 2.3952395,2.3952395 0 0 0 -0.02148,-0.0137 c -0.383092,-0.23173 -0.754242,-0.48155 -1.113281,-0.74804 a 2.3952395,2.3952395 0 0 0 -0.01758,-0.0117 c -2.192197,-1.59721 -3.917621,-3.8055 -4.927734,-6.36719 a 2.3952395,2.3952395 0 0 0 -2.306641,-1.51562 C 63.1158,125.66269 39.978335,121.2187 28.439453,118.10938 l -0.0293,-0.008 c -3.08498,-0.87312 -6.209676,-1.59888 -9.365234,-2.17383 l 0.03711,0.006 c -2.546596,-0.50492 -4.833073,-1.75186 -6.615234,-3.50781 a 2.3952395,2.3952395 0 0 0 -0.03125,-0.0293 c -2.4475308,-2.327 -3.966797,-5.59514 -3.966797,-9.25 0,-6.97056 5.517434,-12.587511 12.443359,-12.753902 a 2.3952395,2.3952395 0 0 0 1.478516,-4.230469 c -1.080975,-0.904932 -1.536011,-1.991295 -1.580078,-3.443359 -0.04407,-1.452064 0.438329,-3.231923 1.427734,-4.935547 1.97881,-3.407248 5.847671,-6.335467 10.263672,-6.541016 4.083998,-0.190038 9.685547,4.087891 9.685547,4.087891 a 2.3952395,2.3952395 0 0 0 3.697266,-0.763672 c 2.060311,-4.163945 6.368207,-6.803366 11.570312,-7.111328 3.045232,-0.180156 5.35368,0.698417 6.96875,1.59375 0.807535,0.447667 1.423486,0.893789 1.873047,1.234375 0.224781,0.170293 0.385161,0.301003 0.625,0.46875 0.119919,0.08387 0.169151,0.182195 0.697266,0.373047 0.264057,0.09543 0.772784,0.383598 1.78125,-0.04297 0.504233,-0.213283 1.005853,-0.706708 1.228515,-1.162109 0.222662,-0.455401 0.246094,-0.818559 0.246094,-1.06836 0,-9.717489 7.827978,-17.542968 17.546875,-17.542968 z"
id="path1838" /></g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View file

@ -0,0 +1 @@
<svg enable-background="new 0 0 24 24" height="512" viewBox="0 0 24 24" width="512" xmlns="http://www.w3.org/2000/svg"><path d="m8.843 12.651c-1.392 0-2.521 1.129-2.521 2.521v6.306c0 1.392 1.129 2.521 2.521 2.521s2.521-1.129 2.521-2.521v-6.306c-.001-1.392-1.13-2.521-2.521-2.521z" fill="#e91e63"/><path d="m.019 15.172c0 1.393 1.13 2.523 2.523 2.523s2.523-1.13 2.523-2.523v-2.523h-2.521c-.001 0-.001 0-.002 0-1.393 0-2.523 1.13-2.523 2.523z" fill="#e91e63"/><path d="m8.846-.001c-.001 0-.002 0-.003 0-1.393 0-2.523 1.13-2.523 2.523s1.13 2.523 2.523 2.523h2.521v-2.523c0-.001 0-.003 0-.005-.001-1.391-1.128-2.518-2.518-2.518z" fill="#00bcd4"/><path d="m2.525 11.37h6.318c1.393 0 2.523-1.13 2.523-2.523s-1.13-2.523-2.523-2.523h-6.318c-1.393 0-2.523 1.13-2.523 2.523s1.13 2.523 2.523 2.523z" fill="#00bcd4"/><path d="m21.457 6.323c-1.391 0-2.518 1.127-2.518 2.518v.005 2.523h2.521c1.393 0 2.523-1.13 2.523-2.523s-1.13-2.523-2.523-2.523c-.001 0-.002 0-.003 0z" fill="#4caf50"/><path d="m12.641 2.522v6.325c0 1.392 1.129 2.521 2.521 2.521s2.521-1.129 2.521-2.521v-6.325c0-1.392-1.129-2.521-2.521-2.521-1.392 0-2.521 1.129-2.521 2.521z" fill="#4caf50"/><g fill="#ff9800"><path d="m17.682 21.476c0-1.392-1.129-2.521-2.521-2.521h-2.521v2.523c.001 1.391 1.129 2.519 2.521 2.519s2.521-1.129 2.521-2.521z"/><path d="m21.479 12.649h-6.318c-1.393 0-2.523 1.13-2.523 2.523s1.13 2.523 2.523 2.523h6.318c1.393 0 2.523-1.13 2.523-2.523s-1.13-2.523-2.523-2.523z"/></g></svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

View file

@ -0,0 +1,78 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
enable-background="new 0 0 24 24"
height="512"
viewBox="0 0 24 24"
width="512"
version="1.1"
id="svg20"
sodipodi:docname="slack-white.svg"
inkscape:version="1.1.2 (0a00cf5339, 2022-02-04, custom)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs24" />
<sodipodi:namedview
id="namedview22"
pagecolor="#505050"
bordercolor="#ffffff"
borderopacity="1"
inkscape:pageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="1"
showgrid="false"
inkscape:zoom="1.7050781"
inkscape:cx="256"
inkscape:cy="255.70676"
inkscape:window-width="3840"
inkscape:window-height="1531"
inkscape:window-x="0"
inkscape:window-y="32"
inkscape:window-maximized="1"
inkscape:current-layer="svg20" />
<path
d="m8.843 12.651c-1.392 0-2.521 1.129-2.521 2.521v6.306c0 1.392 1.129 2.521 2.521 2.521s2.521-1.129 2.521-2.521v-6.306c-.001-1.392-1.13-2.521-2.521-2.521z"
fill="#e91e63"
id="path2"
style="fill:#ffffff" />
<path
d="m.019 15.172c0 1.393 1.13 2.523 2.523 2.523s2.523-1.13 2.523-2.523v-2.523h-2.521c-.001 0-.001 0-.002 0-1.393 0-2.523 1.13-2.523 2.523z"
fill="#e91e63"
id="path4"
style="fill:#ffffff" />
<path
d="m8.846-.001c-.001 0-.002 0-.003 0-1.393 0-2.523 1.13-2.523 2.523s1.13 2.523 2.523 2.523h2.521v-2.523c0-.001 0-.003 0-.005-.001-1.391-1.128-2.518-2.518-2.518z"
fill="#00bcd4"
id="path6"
style="fill:#ffffff" />
<path
d="m2.525 11.37h6.318c1.393 0 2.523-1.13 2.523-2.523s-1.13-2.523-2.523-2.523h-6.318c-1.393 0-2.523 1.13-2.523 2.523s1.13 2.523 2.523 2.523z"
fill="#00bcd4"
id="path8"
style="fill:#ffffff" />
<path
d="m21.457 6.323c-1.391 0-2.518 1.127-2.518 2.518v.005 2.523h2.521c1.393 0 2.523-1.13 2.523-2.523s-1.13-2.523-2.523-2.523c-.001 0-.002 0-.003 0z"
fill="#4caf50"
id="path10"
style="fill:#ffffff" />
<path
d="m12.641 2.522v6.325c0 1.392 1.129 2.521 2.521 2.521s2.521-1.129 2.521-2.521v-6.325c0-1.392-1.129-2.521-2.521-2.521-1.392 0-2.521 1.129-2.521 2.521z"
fill="#4caf50"
id="path12"
style="fill:#ffffff" />
<g
fill="#ff9800"
id="g18"
style="fill:#ffffff">
<path
d="m17.682 21.476c0-1.392-1.129-2.521-2.521-2.521h-2.521v2.523c.001 1.391 1.129 2.519 2.521 2.519s2.521-1.129 2.521-2.521z"
id="path14"
style="fill:#ffffff" />
<path
d="m21.479 12.649h-6.318c-1.393 0-2.523 1.13-2.523 2.523s1.13 2.523 2.523 2.523h6.318c1.393 0 2.523-1.13 2.523-2.523s-1.13-2.523-2.523-2.523z"
id="path16"
style="fill:#ffffff" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.8 KiB

148
macos/.hammerspoon/init.lua Normal file
View file

@ -0,0 +1,148 @@
local hyper = { 'ctrl', 'alt', 'cmd', 'shift' }
--------------------------------------------------------------------------------
-- Application Hot Keys
--------------------------------------------------------------------------------
--[=====[
local applicationHotKeys = {
-- ['0'] = '',
['1'] = 'Alacritty',
['2'] = 'Firefox',
['3'] = 'Slack',
['4'] = 'Discord',
['5'] = 'Spotify',
['6'] = 'Finder',
-- ['7'] = '',
-- ['8'] = '',
-- ['9'] = '',
}
for key, application in pairs(applicationHotKeys) do
hs.hotkey.bind(hyper, key, function()
hs.application.launchOrFocus(application)
end)
end
--]=====]
--------------------------------------------------------------------------------
-- Window Snapping
--------------------------------------------------------------------------------
hs.window.animationDuration = 0
-- Left half
hs.hotkey.bind(hyper, 'h', function()
local win = hs.window.focusedWindow()
if not win then return end
win:moveToUnit(hs.layout.left50)
end)
-- Right half
hs.hotkey.bind(hyper, 'l', function()
local win = hs.window.focusedWindow()
if not win then return end
win:moveToUnit(hs.layout.right50)
end)
-- Maximize
hs.hotkey.bind(hyper, 'k', function()
local win = hs.window.focusedWindow()
if not win then return end
win:moveToUnit(hs.layout.maximized)
end)
-- Simulates a 'reset' of the window
hs.hotkey.bind(hyper, 'j', function()
local win = hs.window.focusedWindow()
local f = win:frame()
local screen = win:screen()
local max = screen:frame()
f.x = max.x
f.y = max.y
f.w = max.w / 2
f.h = max.h / 2
win:setFrame(f)
win:centerOnScreen(screen, true)
end)
--------------------------------------------------------------------------------
-- Homebrew Update Indicator
--------------------------------------------------------------------------------
--[=====[
local homebrewIconWhite = hs.image
.imageFromPath('~/.hammerspoon/images/homebrew-white.png')
:setSize(hs.geometry.size(16, 16))
local homebrewMenubar = hs.menubar.new()
homebrewMenubar:setIcon(homebrewIconWhite)
homebrewMenubar:setClickCallback(function()
hs.applescript.applescript([[
tell application "Terminal"
do script "brew upgrade"
activate
end tell
]])
end)
function updateHomebrewMenubar()
local outdated = hs.execute('/opt/homebrew/bin/brew outdated')
local _, numOutdated = outdated:gsub('\n', '\n')
if numOutdated > 0 then
homebrewMenubar:setTitle(string.format(' %s', numOutdated))
homebrewMenubar:setTooltip(outdated)
else
homebrewMenubar:setTitle(nil)
homebrewMenubar:setTooltip('Up to date')
end
end
updateHomebrewMenubar()
hs.timer.doEvery(3600, updateHomebrewMenubar)
--]=====]
--------------------------------------------------------------------------------
-- Slack Message Indicator
--------------------------------------------------------------------------------
--[=====[
local slackIconWhite = hs.image
.imageFromPath('~/.hammerspoon/images/slack-white.png')
:setSize(hs.geometry.size(16, 16))
local slackMenubar = hs.menubar.new()
slackMenubar:setIcon(slackIconWhite)
slackMenubar:setClickCallback(function()
slackMenubar:setTitle(nil)
hs.application.launchOrFocus('Slack')
end)
function updateSlackMenubar()
local dock = hs.axuielement.applicationElement('Dock')
local children = dock:attributeValue('AXChildren')
if children and children[1] and children[1]:attributeValue('AXRole') == 'AXList' then
local list = children[1]:attributeValue('AXChildren')
for _, v in pairs(list) do
if v:attributeValue('AXTitle') == 'Slack' then
local label = v:attributeValue('AXStatusLabel') or '0'
if label == '0' then
slackMenubar:setTitle(nil)
else
slackMenubar:setTitle(string.format(' %s', label))
end
end
end
end
end
updateSlackMenubar()
hs.timer.doEvery(60, updateSlackMenubar)
--]=====]

0
macos/.hushlogin Normal file
View file

View file

@ -0,0 +1,76 @@
-- Plugins
require('config.lazy');
-- Color scheme and syntax highlighting
vim.cmd('syntax on')
vim.cmd('colorscheme solarized-osaka')
vim.o.background = 'dark'
-- Ensures misspellings are highlighted
vim.cmd('highlight SpellBad ctermfg=white ctermbg=red')
-- Global settings
vim.o.autoindent = true
vim.o.colorcolumn = '80,100,120'
vim.o.expandtab = true
vim.o.hidden = true
vim.o.hlsearch = true
vim.o.ignorecase = true
vim.o.incsearch = true
vim.o.laststatus = 2
vim.o.number = true
vim.o.relativenumber = true
vim.o.shiftwidth = 2
vim.o.smartindent = true
vim.o.softtabstop = 2
vim.o.tabstop = 2
vim.o.undofile = true
-- Filetype-specific settings
vim.api.nvim_create_autocmd('FileType', {
pattern = 'gitcommit',
callback = function()
vim.opt_local.colorcolumn = '50,72'
vim.opt_local.textwidth = 72
end
})
vim.api.nvim_create_autocmd('FileType', {
pattern = {'gitcommit', 'markdown', 'text'},
callback = function()
vim.opt_local.smartindent = false
vim.opt_local.spell = true
end
})
vim.api.nvim_create_autocmd('FileType', {
pattern = {'markdown', 'text'},
callback = function()
vim.opt_local.textwidth = 80
vim.opt_local.wrapmargin = 2
end
})
vim.api.nvim_create_autocmd('FileType', {
pattern = {'php', 'python'},
callback = function()
vim.opt_local.shiftwidth = 4
vim.opt_local.softtabstop = 4
vim.opt_local.tabstop = 4
end
})
-- Strip trailing whitespace on save
vim.api.nvim_create_autocmd('BufWritePre', {
pattern = '*',
command = [[%s/\s\+$//e]]
})
-- Set runtime path for fzf based on the operating system
if vim.fn.has('macunix') == 1 then
vim.opt.rtp:append('/opt/homebrew/opt/fzf')
elseif vim.fn.executable('apt') == 1 then
vim.opt.rtp:append('/usr/share/doc/fzf/examples')
elseif vim.fn.executable('pacman') == 1 then
vim.opt.rtp:append('~/.fzf')
end

View file

@ -0,0 +1,16 @@
{
"ale": { "branch": "master", "commit": "2e5f135836a700dcc6b787f10097ebdeb8e22abb" },
"copilot.vim": { "branch": "release", "commit": "87038123804796ca7af20d1b71c3428d858a9124" },
"cursor_open.nvim": { "branch": "main", "commit": "9d8dfac0142233de872765e31378c647829576ee" },
"editorconfig-vim": { "branch": "master", "commit": "ba2ce027c5b0e523e658d24657ce3ae3306c9fe0" },
"fzf": { "branch": "master", "commit": "90a8800bb596cd98e103788096f2780ee97100b4" },
"fzf.vim": { "branch": "master", "commit": "ec75ffbfd50630bf2b8d444d89487e149bacf7f3" },
"lazy.nvim": { "branch": "main", "commit": "077102c5bfc578693f12377846d427f49bc50076" },
"solarized-osaka.nvim": { "branch": "main", "commit": "126d394c0c979a99206214a2b6b8c86e456c9c0f" },
"telescope.nvim": { "branch": "master", "commit": "a4ed82509cecc56df1c7138920a1aeaf246c0ac5" },
"tsuquyomi": { "branch": "master", "commit": "e1afca562d46907bf63270157c88b7ec8f66e46b" },
"typescript-vim": { "branch": "master", "commit": "8d169e16b5487771f6568125d4c63e6086e524d9" },
"vim-gh-line": { "branch": "master", "commit": "731751fdfa4f64a061dbc7088cb7b2f12e0828ad" },
"vim-polyglot": { "branch": "master", "commit": "bc8a81d3592dab86334f27d1d43c080ebf680d42" },
"vimproc.vim": { "branch": "master", "commit": "63a4ce0768c7af434ac53d37bdc1e7ff7fd2bece" }
}

View file

@ -0,0 +1,69 @@
-- Bootstrap lazy.nvim
local lazypath = vim.fn.stdpath('data') .. '/lazy/lazy.nvim'
if not (vim.uv or vim.loop).fs_stat(lazypath) then
local lazyrepo = 'https://github.com/folke/lazy.nvim.git'
local out = vim.fn.system({
'git', 'clone', '--filter=blob:none', '--branch=stable', lazyrepo, lazypath,
})
if vim.v.shell_error ~= 0 then
vim.api.nvim_echo({
{ 'Failed to clone lazy.nvim:\n', 'ErrorMsg' },
{ out, 'WarningMsg' },
{ '\nPress any key to exit...' },
}, true, {})
vim.fn.getchar()
os.exit(1)
end
end
vim.opt.rtp:prepend(lazypath)
-- Make sure to setup `mapleader` and `maplocalleader` before loading lazy.nvim
-- so that mappings are correct. This is also a good place to setup other
-- settings (vim.opt)
vim.g.mapleader = '\\'
vim.g.maplocalleader = '\\'
require('lazy').setup({
spec = {
-- Solarized Osaka
{ 'craftzdog/solarized-osaka.nvim' },
-- File exploration and navigation
{
'junegunn/fzf',
build = function() vim.cmd('FzfInstall') end,
event = 'VimEnter',
},
{ 'junegunn/fzf.vim' },
-- File exploration and navigation (new)
{ 'nvim-telescope/telescope.nvim' },
-- Languages and syntax
{ 'sheerun/vim-polyglot' },
-- Style guide and linting
{ 'dense-analysis/ale' },
{ 'editorconfig/editorconfig-vim' },
-- TypeScript
{ 'leafgarland/typescript-vim' },
{ 'Quramy/tsuquyomi' },
{
'Shougo/vimproc.vim',
build = 'make',
},
-- GitHub integration
{ 'github/copilot.vim' },
{ 'ruanyl/vim-gh-line' },
-- Cursor integration
{
'yuucu/cursor_open.nvim',
cmd = { 'CursorOpen' },
keys = {
{ '<leader>oc', ':CursorOpen<CR>', desc = '[O]pen in [C]ursor' },
{ '<leader>oC', ':CursorOpen!<CR>', desc = '[O]pen in [C]ursor (new window)' },
},
config = function()
require('cursor_open').setup()
end
},
},
install = { colorscheme = { 'solarized-osaka' } },
checker = { enabled = true },
})

View file

@ -1,3 +0,0 @@
startup_message off
defscrollback 1000000
hardstatus alwayslastline "%w %= %S"

View file

@ -1,3 +0,0 @@
set runtimepath^=~/.vim runtimepath+=~/.vim/after
let &packpath = &runtimepath
source ~/.vimrc

View file

@ -4,6 +4,7 @@ if empty(glob('~/.vim/autoload/plug.vim'))
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
endif
" A humble list of plugins
call plug#begin()
" Solarized, without the bullshit
Plug 'romainl/flattened'
@ -17,28 +18,51 @@ call plug#begin()
" TypeScript
Plug 'leafgarland/typescript-vim'
Plug 'Quramy/tsuquyomi'
Plug 'Shougo/vimproc.vim', {'do' : 'make'}
" GitHub integration
Plug 'github/copilot.vim'
Plug 'ruanyl/vim-gh-line'
call plug#end()
" Color scheme and syntax highlighting
syntax on
color flattened_dark
set background=dark
" Ensures misspellings are highlighted
hi SpellBad ctermfg=white ctermbg=red
set ai et si sts=2 sw=2 ts=2
set cc=80,100,120
set hid
set hls ic is
set nu rnu
highlight SpellBad ctermfg=white ctermbg=red
" Global settings
set autoindent
set colorcolumn=80,100,120
set expandtab
set hidden
set hlsearch
set ignorecase
set incsearch
set laststatus=2
set number
set relativenumber
set shiftwidth=2
set smartindent
set softtabstop=2
set tabstop=2
set undodir=~/.local/share/vim/undo/
set undofile
autocmd FileType php,python setl sts=4 sw=4 ts=4
autocmd FileType gitcommit,markdown,text setl nosi spell
autocmd FileType gitcommit setl cc=50,72 tw=72
autocmd FileType markdown,text setl tw=80 wm=2
" Filetype-specific settings
autocmd FileType gitcommit setl colorcolumn=50,72 textwidth=72
autocmd FileType gitcommit,markdown,text setl nosmartindent spell
autocmd FileType markdown,text setl textwidth=80 wrapmargin=2
autocmd FileType php,python setl shiftwidth=4 softtabstop=4 tabstop=4
" Strip trailing whitespace on save
autocmd BufWritePre * :%s/\s\+$//e
set rtp+=~/.fzf
" Set the runtime path for fzf based on OS
if has('mac')
set rtp+=/opt/homebrew/opt/fzf
elseif executable('apt')
set rtp+=/usr/share/doc/fzf/examples
elseif executable('pacman')
set rtp+=~/.fzf
endif

View file

@ -1,39 +1,60 @@
# Starts with a clean slate
unalias -a
# Safety first
# Prompt when doing something destructive
alias cp='cp -i'
alias mv='mv -i'
alias rm='rm -i'
# Colorize output, make ls human readable and classify...
# Colorize output, make ls human-readable and add classification indicators
if [[ `uname` == Darwin ]]; then
# macOS
alias dircolors='gdircolors'
alias ls='gls --color=auto -hF'
else
alias ls='ls --color=auto -hF'
alias ls='gls --color=auto --human-readable --classify'
# ...and standardize to macOS naming on Linux
# Force uuidgen to use lowercase letters like Linux
alias uuidgen='uuidgen | tr A-F a-f'
else
# Linux
alias ls='ls --color=auto --human-readable --classify'
# Use the same open command as macOS
alias open='xdg-open'
fi
# Run ls after cd
# Run ls immediately after cd
function cd { builtin cd "$@" && ls }
# Colorize cat with bat
alias cat='bat'
# Use bat instead of cat for syntax highlighting
if command -v apt-get &> /dev/null; then
# Debian
alias cat='batcat'
else
# Everybody else
alias cat='bat'
fi
# Disk utility aliases
alias df='df -h'
alias du='du -h'
# Make disk utility human-readable
alias df='df --human-readable'
alias du='du --human-readable'
# Colorize output and some exclusions
# Colorize grep output and add some exclusions
alias grep="grep --color=auto --exclude-dir={.git,artwork,node_modules,vendor}"
# Git functions
# Use HTTPie in place of the old libwww-perl commands
alias GET='http'
alias POST='http POST'
alias HEAD='http HEAD'
# Use htop instead of boring old top
alias top='htop'
# Get the git branch name for the current directory (used in the prompt)
git_current_branch() {
(command git symbolic-ref -q HEAD || command git name-rev --name-only --no-undefined --always HEAD) 2> /dev/null
}
# Get the default branch name for the current directory (usually master or main)
git_default_branch() {
(git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@') 2> /dev/null
}
@ -59,6 +80,7 @@ alias gl='git pull origin $(git_current_branch)'
alias glg='git log'
alias gm='git merge'
alias gmm='git merge $(git_default_branch)'
alias gmt='git merge --strategy-option=theirs'
alias gmv='git mv'
alias gp='git push origin $(git_current_branch)'
alias gpf='git push origin $(git_current_branch) --force'
@ -67,11 +89,6 @@ alias grbm='git rebase $(git_default_branch)'
alias grm='git rm'
alias gst='git status'
# HTTPie aliases
alias GET='http'
alias POST='http POST'
alias HEAD='http HEAD'
# Nvim takeover
# Use nvim in place of vim
alias vim='nvim'
alias vimdiff='nvim -d'

View file

@ -2,4 +2,4 @@ export CLICOLOR=1
export EDITOR=nvim
export KEYTIMEOUT=1
export QUOTING_STYLE=literal
export TERM=xterm-256color
export SSH_AUTH_SOCK=$XDG_RUNTIME_DIR/gcr/ssh

View file

@ -2,17 +2,39 @@
# Speed up `brew install`
export HOMEBREW_NO_AUTO_UPDATE=1
export HOMEBREW_NO_INSTALL_CLEANUP=1
source $HOME/.env
source $HOME/.aliases
eval `dircolors $HOME/.dircolors`
# TODO: May need to tweak this for macOS/brew installed stuff
source /usr/share/fzf/completion.zsh
source /usr/share/fzf/key-bindings.zsh
source /usr/share/zsh/plugins/zsh-history-substring-search/zsh-history-substring-search.zsh
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
# Load up and configure fzf, nvm, and zsh plugins
if [[ `uname` == Darwin ]]; then
# macOS
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
elif command -v apt &> /dev/null; then
# Debian
source /usr/share/doc/fzf/examples/completion.zsh
source /usr/share/doc/fzf/examples/key-bindings.zsh
elif command -v pacman &> /dev/null; then
# Arch
source /usr/share/fzf/completion.zsh
source /usr/share/fzf/key-bindings.zsh
fi
# Load up Antigen and Zsh plugins
if [[ ! -f "${HOME}/.antigen/antigen.zsh" ]]; then
git clone https://github.com/zsh-users/antigen.git "${HOME}/.antigen"
fi
source "${HOME}/.antigen/antigen.zsh"
antigen bundle zsh-users/zsh-history-substring-search
antigen bundle zsh-users/zsh-syntax-highlighting
antigen apply
bindkey '^[[A' history-substring-search-up
bindkey '^[[B' history-substring-search-down
HISTORY_SUBSTRING_SEARCH_ENSURE_UNIQUE=1
HISTFILE=$HOME/.zsh_history
HISTSIZE=1000000
@ -43,7 +65,6 @@ setopt interactivecomments
setopt share_history
bindkey -v
bindkey '^a' beginning-of-line
bindkey '^e' end-of-line
@ -65,25 +86,32 @@ PS1='
%F{blue}%~$(git_prompt)
%F{244}%# %F{reset}'
# Only autoload nvm on a specific machine, default to lazy loading
# TODO: Maybe drop the lazy loading entirely as I never use nvm outside of work?
if [[ $(hostname) == "x1carbon.josh" ]]; then
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] \
&& printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
else
# Run `nvm` init script on demand to avoid constant slow downs
function nvm {
if [ -z ${NVM_DIR+x} ]; then
export NVM_DIR="$HOME/.nvm"
if [ -s "$NVM_DIR/nvm.sh" ]; then
source "$NVM_DIR/nvm.sh"
elif [ -s "/usr/share/nvm/init-nvm.sh" ]; then
source /usr/share/nvm/init-nvm.sh
fi
nvm "$@"
fi
}
# Load up NVM
if [[ ! -f "${HOME}/.nvm/nvm.sh" ]]; then
PROFILE=/dev/null bash -c 'curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash'
fi
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
# Automatically use Node.js version specified in .nvmrc
autoload -U add-zsh-hook
load-nvmrc() {
local nvmrc_path="$(nvm_find_nvmrc)"
if [ -n "$nvmrc_path" ]; then
local nvmrc_node_version=$(nvm version "$(cat "${nvmrc_path}")")
if [ "$nvmrc_node_version" = "N/A" ]; then
nvm install
elif [ "$nvmrc_node_version" != "$(nvm version)" ]; then
nvm use
fi
elif [ -n "$(PWD=$OLDPWD nvm_find_nvmrc)" ] && [ "$(nvm version)" != "$(nvm version default)" ]; then
echo "Reverting to nvm default version"
nvm use default
fi
}
add-zsh-hook chpwd load-nvmrc
load-nvmrc