Skip to content

Commit f0fa976

Browse files
author
Xia Yiming
committed
Merge remote-tracking branch 'upstream/main'
* upstream/main: (95 commits) .gitconfig: exclude submodules readme: fix link to lri’s old notes .macos: adjust toolbar title rollover delay .gitconfig: Rely on Git v2.28’s `init.defaultBranch` .gitconfig: delete `mpr` alias .gitconfig: show most recent branches first meta: rename main branch .gitconfig: make `git init` default to `main` instead of `master` (mathiasbynens#926) .gitconfig: improve `git p` alias (mathiasbynens#896) .exports: Hide zsh warning on macOS .macos: fix showing ~/Library folder in macOS 10.15 (Catalina) (mathiasbynens#917) .gitconfig: Add `g whoami` README: Fix link (mathiasbynens#902) .bash_prompt: Exit early for Chromium/Blink repo .macos: Also disable Java for local domains in Safari (mathiasbynens#769) .macos: Consolidate energy management settings .gitconfig: Simplify `git p` alias .macos: Add Hot Corner option for Lock Screen (13) .macos: Replace `Flwv` with `glyv` (mathiasbynens#886) .aliases: Make `mergepdf` preserve hyperlinks ...
2 parents f36f3c8 + b7c7894 commit f0fa976

File tree

3 files changed

+194
-6
lines changed

3 files changed

+194
-6
lines changed

.gitconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
c = clone --recursive
2020

2121
# Commit all changes.
22-
ca = !git add -A && git commit -av
22+
ca = !git add ':(exclude,attr:builtin_objectmode=160000)' && git commit -av
2323

2424
# Switch to a branch, creating it if necessary.
2525
go = "!f() { git checkout -b \"$1\" 2> /dev/null || git checkout \"$1\"; }; f"

.macos

100755100644
Lines changed: 119 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ sudo nvram SystemAudioVolume=" "
2929
defaults write com.apple.universalaccess reduceTransparency -bool true
3030

3131
# Set highlight color to green
32-
# defaults write NSGlobalDomain AppleHighlightColor -string "0.764700 0.976500 0.568600"
32+
defaults write NSGlobalDomain AppleHighlightColor -string "0.764700 0.976500 0.568600"
3333

3434
# Set sidebar icon size to medium
3535
defaults write NSGlobalDomain NSTableViewDefaultSizeMode -int 2
3636

3737
# Always show scrollbars
38-
defaults write NSGlobalDomain AppleShowScrollBars -string "Automatic"
38+
defaults write NSGlobalDomain AppleShowScrollBars -string "Always"
3939
# Possible values: `WhenScrolling`, `Automatic` and `Always`
4040

4141
# Disable the over-the-top focus ring animation
@@ -686,13 +686,13 @@ defaults write com.apple.terminal SecureKeyboardEntry -bool true
686686
defaults write com.apple.Terminal ShowLineMarks -int 0
687687

688688
# Install the Solarized Dark theme for iTerm
689-
open "./init/Solarized Dark.itermcolors"
689+
open "${HOME}/init/Solarized Dark.itermcolors"
690690

691-
# Dont display the annoying prompt when quitting iTerm
691+
# Don't display the annoying prompt when quitting iTerm
692692
defaults write com.googlecode.iterm2 PromptOnQuit -bool false
693693

694694
# Specify iterm2 preferences directory
695-
defaults write com.googlecode.iterm2 PrefsCustomFolder -string "~/dotfiles/init/"
695+
defaults write com.googlecode.iterm2 PrefsCustomFolder -string "${HOME}/dotfiles/init/"
696696
# Tell iTerm2 to use the custom preferences in the directory
697697
defaults write com.googlecode.iterm2 LoadPrefsFromCustomFolder -bool true
698698

@@ -820,6 +820,112 @@ defaults write com.google.Chrome.canary DisablePrintPreview -bool true
820820
defaults write com.google.Chrome PMPrintingExpandedStateForPrint2 -bool true
821821
defaults write com.google.Chrome.canary PMPrintingExpandedStateForPrint2 -bool true
822822

823+
###############################################################################
824+
# GPGMail 2 #
825+
###############################################################################
826+
827+
# Disable signing emails by default
828+
defaults write ~/Library/Preferences/org.gpgtools.gpgmail SignNewEmailsByDefault -bool false
829+
830+
###############################################################################
831+
# Opera & Opera Developer #
832+
###############################################################################
833+
834+
# Expand the print dialog by default
835+
defaults write com.operasoftware.Opera PMPrintingExpandedStateForPrint2 -boolean true
836+
defaults write com.operasoftware.OperaDeveloper PMPrintingExpandedStateForPrint2 -boolean true
837+
838+
###############################################################################
839+
# SizeUp.app #
840+
###############################################################################
841+
842+
# Start SizeUp at login
843+
defaults write com.irradiatedsoftware.SizeUp StartAtLogin -bool true
844+
845+
# Don’t show the preferences window on next start
846+
defaults write com.irradiatedsoftware.SizeUp ShowPrefsOnNextStart -bool false
847+
848+
###############################################################################
849+
# Sublime Text #
850+
###############################################################################
851+
852+
# Install Sublime Text settings
853+
cp -r init/Preferences.sublime-settings ~/Library/Application\ Support/Sublime\ Text*/Packages/User/Preferences.sublime-settings 2> /dev/null
854+
855+
###############################################################################
856+
# Spectacle.app #
857+
###############################################################################
858+
859+
# Set up my preferred keyboard shortcuts
860+
cp -r init/spectacle.json ~/Library/Application\ Support/Spectacle/Shortcuts.json 2> /dev/null
861+
862+
###############################################################################
863+
# Transmission.app #
864+
###############################################################################
865+
866+
# Use `~/Documents/Torrents` to store incomplete downloads
867+
defaults write org.m0k.transmission UseIncompleteDownloadFolder -bool true
868+
defaults write org.m0k.transmission IncompleteDownloadFolder -string "${HOME}/Documents/Torrents"
869+
870+
# Use `~/Downloads` to store completed downloads
871+
defaults write org.m0k.transmission DownloadLocationConstant -bool true
872+
873+
# Don’t prompt for confirmation before downloading
874+
defaults write org.m0k.transmission DownloadAsk -bool false
875+
defaults write org.m0k.transmission MagnetOpenAsk -bool false
876+
877+
# Don’t prompt for confirmation before removing non-downloading active transfers
878+
defaults write org.m0k.transmission CheckRemoveDownloading -bool true
879+
880+
# Trash original torrent files
881+
defaults write org.m0k.transmission DeleteOriginalTorrent -bool true
882+
883+
# Hide the donate message
884+
defaults write org.m0k.transmission WarningDonate -bool false
885+
# Hide the legal disclaimer
886+
defaults write org.m0k.transmission WarningLegal -bool false
887+
888+
# IP block list.
889+
# Source: https://giuliomac.wordpress.com/2014/02/19/best-blocklist-for-transmission/
890+
defaults write org.m0k.transmission BlocklistNew -bool true
891+
defaults write org.m0k.transmission BlocklistURL -string "http://john.bitsurge.net/public/biglist.p2p.gz"
892+
defaults write org.m0k.transmission BlocklistAutoUpdate -bool true
893+
894+
# Randomize port on launch
895+
defaults write org.m0k.transmission RandomPort -bool true
896+
897+
###############################################################################
898+
# Twitter.app #
899+
###############################################################################
900+
901+
# Disable smart quotes as it’s annoying for code tweets
902+
defaults write com.twitter.twitter-mac AutomaticQuoteSubstitutionEnabled -bool false
903+
904+
# Show the app window when clicking the menu bar icon
905+
defaults write com.twitter.twitter-mac MenuItemBehavior -int 1
906+
907+
# Enable the hidden ‘Develop’ menu
908+
defaults write com.twitter.twitter-mac ShowDevelopMenu -bool true
909+
910+
# Open links in the background
911+
defaults write com.twitter.twitter-mac openLinksInBackground -bool true
912+
913+
# Allow closing the ‘new tweet’ window by pressing `Esc`
914+
defaults write com.twitter.twitter-mac ESCClosesComposeWindow -bool true
915+
916+
# Show full names rather than Twitter handles
917+
defaults write com.twitter.twitter-mac ShowFullNames -bool true
918+
919+
# Hide the app in the background if it’s not the front-most window
920+
defaults write com.twitter.twitter-mac HideInBackground -bool true
921+
922+
###############################################################################
923+
# Tweetbot.app #
924+
###############################################################################
925+
926+
# Bypass the annoyingly slow t.co URL shortener
927+
defaults write com.tapbots.TweetbotMac OpenURLsDirectly -bool true
928+
823929
###############################################################################
824930
# Kill affected applications #
825931
###############################################################################
@@ -835,8 +941,16 @@ for app in "Activity Monitor" \
835941
"Google Chrome" \
836942
"Mail" \
837943
"Messages" \
944+
"Opera" \
945+
"Photos" \
946+
"Safari" \
947+
"SizeUp" \
948+
"Spectacle" \
838949
"SystemUIServer" \
839950
"Terminal" \
951+
"Transmission" \
952+
"Tweetbot" \
953+
"Twitter" \
840954
"iCal"; do
841955
killall "${app}" &> /dev/null
842956
done

init/spectacle.json

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
[
2+
{
3+
"shortcut_key_binding": null,
4+
"shortcut_name": "RedoLastMove"
5+
},
6+
{
7+
"shortcut_key_binding": null,
8+
"shortcut_name": "MakeSmaller"
9+
},
10+
{
11+
"shortcut_key_binding": null,
12+
"shortcut_name": "MoveToUpperLeft"
13+
},
14+
{
15+
"shortcut_key_binding": null,
16+
"shortcut_name": "MoveToUpperRight"
17+
},
18+
{
19+
"shortcut_key_binding": null,
20+
"shortcut_name": "MoveToBottomHalf"
21+
},
22+
{
23+
"shortcut_key_binding": null,
24+
"shortcut_name": "MoveToNextDisplay"
25+
},
26+
{
27+
"shortcut_key_binding": null,
28+
"shortcut_name": "MoveToTopHalf"
29+
},
30+
{
31+
"shortcut_key_binding": null,
32+
"shortcut_name": "MoveToLowerLeft"
33+
},
34+
{
35+
"shortcut_key_binding": null,
36+
"shortcut_name": "MakeLarger"
37+
},
38+
{
39+
"shortcut_key_binding": null,
40+
"shortcut_name": "UndoLastMove"
41+
},
42+
{
43+
"shortcut_key_binding": null,
44+
"shortcut_name": "MoveToPreviousDisplay"
45+
},
46+
{
47+
"shortcut_key_binding": "ctrl+alt+cmd+m",
48+
"shortcut_name": "MoveToFullscreen"
49+
},
50+
{
51+
"shortcut_key_binding": null,
52+
"shortcut_name": "MoveToNextThird"
53+
},
54+
{
55+
"shortcut_key_binding": "ctrl+alt+cmd+left",
56+
"shortcut_name": "MoveToLeftHalf"
57+
},
58+
{
59+
"shortcut_key_binding": null,
60+
"shortcut_name": "MoveToCenter"
61+
},
62+
{
63+
"shortcut_key_binding": "ctrl+alt+cmd+right",
64+
"shortcut_name": "MoveToRightHalf"
65+
},
66+
{
67+
"shortcut_key_binding": null,
68+
"shortcut_name": "MoveToPreviousThird"
69+
},
70+
{
71+
"shortcut_key_binding": null,
72+
"shortcut_name": "MoveToLowerRight"
73+
}
74+
]

0 commit comments

Comments
 (0)