Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main'
Browse files Browse the repository at this point in the history
# Conflicts:
#	.github/workflows/dotfiles-installation.yml
#	config/git/config
#	config/hammerspoon/apps.lua
#	install/Caskfile
  • Loading branch information
ivosabev committed Dec 11, 2024
2 parents 1713ee6 + 5dd4e9a commit 212e5d4
Show file tree
Hide file tree
Showing 18 changed files with 94 additions and 164 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dotfiles-installation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-14]
os: [macos-13, macos-14, macos-15]

steps:
- name: Clean up installed software
Expand Down
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ brew-packages: brew

cask-apps: brew
brew bundle --file=$(DOTFILES_DIR)/install/Caskfile || true
defaults write org.hammerspoon.Hammerspoon MJConfigFile "~/.config/hammerspoon/init.lua"

vscode-extensions: cask-apps
for EXT in $$(cat install/Codefile); do code --install-extension $$EXT; done
Expand Down
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ It mainly targets macOS systems (should install on e.g. Ubuntu as well for many

- Minimal efforts to install everything, using a [Makefile](./Makefile)
- Mostly based around Homebrew, Caskroom and Node.js, latest Bash + GNU Utils
- Great [Window management](./config/hammerspoon/README.md) (using Hammerspoon)
- Fast and colored prompt
- Updated macOS defaults
- Well-organized and easy to customize
Expand All @@ -23,7 +22,6 @@ It mainly targets macOS systems (should install on e.g. Ubuntu as well for many
- [homebrew-cask](https://github.com/Homebrew/homebrew-cask) (packages: [Caskfile](./install/Caskfile))
- [Node.js + npm LTS](https://nodejs.org/en/download/) (packages: [npmfile](./install/npmfile))
- Latest Git, Bash, Python, GNU coreutils, curl, Ruby
- [Hammerspoon](https://www.hammerspoon.org) (config: [keybindings & window management](./config/hammerspoon))
- `$EDITOR` is [GNU nano](https://www.nano-editor.org) (`$VISUAL` is `code` and Git `core.editor` is `code --wait`)

## Installation
Expand Down Expand Up @@ -79,9 +77,7 @@ dot dock
dot macos
```

3. Start Hammerspoon once and set "Launch Hammerspoon at login".

4. Populate this file with tokens (example: `export GITHUB_TOKEN=abc`):
3. Populate this file with tokens (example: `export GITHUB_TOKEN=abc`):

```sh
touch ~/.dotfiles/system/.exports
Expand Down
44 changes: 18 additions & 26 deletions config/git/config
Original file line number Diff line number Diff line change
Expand Up @@ -50,62 +50,54 @@
co = checkout
contrib = shortlog --summary --numbered
d = diff
ds = -c delta.side-by-side=true diff
home = browse
cr = clone --recursive
df = diff --word-diff
diffstat = "!f() { if [ $# -eq 0 ]; then git show --shortstat HEAD | tail -1; else git show --shortstat $1 | tail -1; fi; }; f"
ds = -c delta.side-by-side=true diff
fc = "log --max-parents=0 --pretty=format:'%ad' --date=format:'%Y-%m-%d' -n 1"
fc = "log --max-parents=0 --pretty=format:'%ad' --date=format:'%Y-%m-%d' -n 1"
g = grep --break --heading --line-number
l = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
home = browse
l = log --graph --abbrev-commit --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'
ld = "!sh -c \"git log --since '${1:-1} days ago' --oneline --author $(git config user.email)\" -"
lg = log -p
ll = log --pretty=oneline --graph --abbrev-commit
ll = log --graph --abbrev-commit --pretty=oneline
lm = log --pretty=format:'* %s (%h)'
patch = !git --no-pager diff --no-color
p = push
patch = !git --no-pager diff --no-color
pf = push --force
pr = "!f() { git fetch -fu ${2:-origin} refs/pull/$1/head:pr/$1 && git checkout pr/$1; }; f"
show-ignored = "! git clean -ndX | perl -pe 's/Would remove/Ignored:/'"
rh = reset --hard HEAD
ra = rebase --abort
rc = rebase --continue
s = status
stl = ls-files -m -o --exclude-standard
sts = status -sb
unstage = reset --hard HEAD

l = log --graph --abbrev-commit --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'
ld = "!sh -c \"git log --since '${1:-1} days ago' --oneline --author $(git config user.email)\" -"
ll = log --graph --abbrev-commit --pretty=oneline
lm = log --pretty=format:'* %s (%h)'

patch = !git --no-pager diff --no-color
show-ignored = !git clean -ndX | perl -pe 's/Would remove //'
fc = "log --max-parents=0 --pretty=format:'%ad' --date=format:'%Y-%m-%d' -n 1"
show-ignored = !git clean -ndX | perl -pe 's/Would remove //'
sshort = "!f() { git show --shortstat \"${1:-HEAD}\" | awk \"/files? changed/ { gsub(/,/, \\\"\\\", \\$4); gsub(/,/, \\\"\\\", \\$6); print \\\"\\033[32m+\\\" \\$4 \\\" \\033[31m-\\\" \\$6 \\\"\\033[0m\\\" }\"; }; f"

[diff]
renames = copies
indentHeuristic = true
colorMoved = default
tool = vscode

[difftool]
prompt = false

[difftool "sourcetree"]
[difftool "vscode"]
cmd = code --wait --diff $LOCAL $REMOTE
path =

[merge]
tool = Kaleidoscope
conflictstyle = diff3
defaultToUpstream = true
tool = vscode

[mergetool]
prompt = false

[mergetool "sourcetree"]
[mergetool "vscode"]
cmd = code --wait $MERGED
trustExitCode = true

[delta]
navigate = true
light = false
navigate = true

[color]
ui = auto
41 changes: 0 additions & 41 deletions config/hammerspoon/README.md

This file was deleted.

19 changes: 0 additions & 19 deletions config/hammerspoon/apps.lua

This file was deleted.

36 changes: 0 additions & 36 deletions config/hammerspoon/grid.lua

This file was deleted.

8 changes: 0 additions & 8 deletions config/hammerspoon/init.lua

This file was deleted.

3 changes: 1 addition & 2 deletions config/mackup/.mackup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ quicklook
screen
scripts
sequel-pro
sourcetree
spotify-notifications
spotify
ssh
Expand All @@ -50,4 +49,4 @@ transmission
vlc
vscode
wget
xcode
xcode
50 changes: 50 additions & 0 deletions config/tmux/.tmux.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Enable 256 color support
set -g default-terminal "screen-256color"

# Add Ctrl-a as prefix key and allow sending Ctrl-a to applications
set-option -g prefix C-a
bind-key C-a send-prefix

# Remove delay when pressing escape key
set -s escape-time 0

# Increase scrollback buffer size
set -g history-limit 50000

# Update status bar every 5 seconds
set -g status-interval 5

# Bind prefix + : to open the command prompt
bind-key : command-prompt

# Aggressively resize windows
setw -g aggressive-resize on

# Remove right status bar content
set -g status-right ''

# Start window and pane numbering at 1
set -g base-index 1
setw -g pane-base-index 1

# Automatically renumber windows when one is closed
set -g renumber-windows on

# Add pane using \ or | for horizontal, - or _ for vertical split
bind '\' split-window -h
bind '|' split-window -h
bind - split-window -v
bind _ split-window -v

# Reload this config with 'prefix + r'
bind r source-file $HOME/.dotfiles/config/tmux/.tmux.conf \; display "Config reloaded"

# Navigate between panes using Shift + ←/→
bind -n S-right select-pane -t :.+
bind -n S-left select-pane -t :.-

# Clear screen and history with Ctrl-k
bind -n C-k send-keys -R Enter \; clear-history \;

# Switch to oldest session or match
bind d command-prompt -p "session abbr:" "run 'tmux switch -t $(tmux ls -F \"##{session_created}:##{session_name}\" | sort -n | grep \':%%\' | head -n 1 | cut -d \':\' -f 2)'"
1 change: 1 addition & 0 deletions install/Brewfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ brew "mackup"
brew "nano"
brew "stow"
brew "thefuck"
brew "tmux"
brew "topgrade"

# fs/network
Expand Down
19 changes: 8 additions & 11 deletions install/Caskfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
# cask "android-ndk"
# cask "android-studio"
# cask "banktivity"
# cask "flipper"
# cask "maccy"
# cask "macfuse"
# cask "osxfuse"
# cask "webpquicklook"
cask "android-ndk"
cask "android-platform-tools"
cask "android-sdk"
Expand All @@ -9,11 +16,10 @@ cask "docker"
cask "font-fira-code"
cask "font-hack"
cask "font-iosevka"
cask "fork"
cask "google-chrome"
cask "hammerspoon"
cask "handbrake"
cask "imageoptim"
cask "maccy"
cask "ngrok"
cask "notunes"
cask "obsidian"
Expand All @@ -22,10 +28,8 @@ cask "postman"
cask "qlmarkdown"
cask "raycast"
cask "sequel-ace"

cask "session-manager-plugin"
cask "slack"
cask "sourcetree"
cask "spotify"
cask "sublime-text"
cask "syntax-highlight"
Expand All @@ -35,10 +39,3 @@ cask "transmission"
cask "veracrypt"
cask "visual-studio-code"
cask "vlc"

# cask "android-ndk"
# cask "android-studio"
# cask "flipper"
# cask "macfuse"
# cask "osxfuse"
# cask "webpquicklook"
2 changes: 1 addition & 1 deletion runcom/.bash_profile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ PATH="$DOTFILES_DIR/bin:$PATH"

# Source the dotfiles (order matters)

for DOTFILE in "$DOTFILES_DIR"/system/.{function,function_*,n,path,env,exports,alias,grep,prompt,completion,fix,zoxide}; do
for DOTFILE in "$DOTFILES_DIR"/system/.{function,function_*,n,path,env,exports,alias,fzf,grep,prompt,completion,fix,zoxide}; do
. "$DOTFILE"
done

Expand Down
5 changes: 0 additions & 5 deletions system/.alias.macos
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@ alias afk="open /System/Library/CoreServices/ScreenSaverEngine.app"

alias logoff="/System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend"

# Show/hide desktop icons

alias desktopshow="defaults write com.apple.finder CreateDesktop -bool true && killfinder"
alias desktophide="defaults write com.apple.finder CreateDesktop -bool false && killfinder"

# Recursively remove Apple meta files

alias cleanupds="find . -type f -name '*.DS_Store' -ls -delete"
Expand Down
6 changes: 6 additions & 0 deletions system/.completion
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ _dotfiles_completions() {

complete -o default -F _dotfiles_completions dot

# tmux

if is-executable brew; then
. "$BREW_PREFIX/etc/bash_completion.d/tmux"
fi

# npm (https://docs.npmjs.com/cli/completion)

if is-executable npm; then
Expand Down
2 changes: 1 addition & 1 deletion system/.env.macos
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export VISUAL_GIT="stree"
export VISUAL_GIT="fork"

# Some app locations

Expand Down
Loading

0 comments on commit 212e5d4

Please sign in to comment.