feat(darwin): update modules
Don't regenerate yabai workspaces Add more `nix-darwin` options Add `pinentry-touchid` and `xquartz`
This commit is contained in:
parent
319817b5c0
commit
ae6e5af098
3 changed files with 76 additions and 28 deletions
|
@ -44,11 +44,13 @@ in
|
||||||
"homebrew/services"
|
"homebrew/services"
|
||||||
"cmacrae/formulae"
|
"cmacrae/formulae"
|
||||||
"FelixKratz/formulae"
|
"FelixKratz/formulae"
|
||||||
|
"jorgelbg/tap"
|
||||||
];
|
];
|
||||||
brews = [
|
brews = [
|
||||||
"libusb"
|
"libusb"
|
||||||
"sketchybar"
|
"sketchybar"
|
||||||
"switchaudio-osx"
|
"switchaudio-osx"
|
||||||
|
"pinentry-touchid"
|
||||||
];
|
];
|
||||||
casks = [
|
casks = [
|
||||||
"android-platform-tools"
|
"android-platform-tools"
|
||||||
|
@ -60,6 +62,7 @@ in
|
||||||
"sf-symbols"
|
"sf-symbols"
|
||||||
# "slack"
|
# "slack"
|
||||||
"spotify"
|
"spotify"
|
||||||
|
"xquartz"
|
||||||
];
|
];
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
# brew "xorpse/formulae/brew", args: ["HEAD"]
|
# brew "xorpse/formulae/brew", args: ["HEAD"]
|
||||||
|
|
|
@ -16,7 +16,9 @@ in
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
||||||
|
services.activate-system.enable = true;
|
||||||
services.nix-daemon.enable = true;
|
services.nix-daemon.enable = true;
|
||||||
|
programs.nix-index.enable = true;
|
||||||
|
|
||||||
environment.shells = [ pkgs.zsh ];
|
environment.shells = [ pkgs.zsh ];
|
||||||
|
|
||||||
|
@ -87,6 +89,12 @@ in
|
||||||
NSAutomaticWindowAnimationsEnabled = false;
|
NSAutomaticWindowAnimationsEnabled = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
CustomUserPreferences = {
|
||||||
|
"NSGlobalDomain" = {
|
||||||
|
"AppleSpacesSwitchOnActivate"= 0;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
dock = {
|
dock = {
|
||||||
|
|
||||||
# Automatically show and hide the dock
|
# Automatically show and hide the dock
|
||||||
|
@ -115,9 +123,18 @@ in
|
||||||
# Finder search in current folder by default
|
# Finder search in current folder by default
|
||||||
FXDefaultSearchScope = "SCcf";
|
FXDefaultSearchScope = "SCcf";
|
||||||
|
|
||||||
|
# Show all extensions
|
||||||
|
AppleShowAllExtensions = true;
|
||||||
|
|
||||||
# Disable warning when changing file extension
|
# Disable warning when changing file extension
|
||||||
FXEnableExtensionChangeWarning = false;
|
FXEnableExtensionChangeWarning = false;
|
||||||
|
|
||||||
|
# Show full paths
|
||||||
|
ShowPathbar = true;
|
||||||
|
|
||||||
|
# Show POSIX paths in title
|
||||||
|
_FXShowPosixPathInTitle = true;
|
||||||
|
|
||||||
# Allow quitting of Finder application
|
# Allow quitting of Finder application
|
||||||
QuitMenuItem = true;
|
QuitMenuItem = true;
|
||||||
};
|
};
|
||||||
|
@ -181,6 +198,31 @@ in
|
||||||
defaults write com.apple.dock springboard-hide-duration -float 0
|
defaults write com.apple.dock springboard-hide-duration -float 0
|
||||||
defaults write com.apple.dock springboard-page-duration -float 0
|
defaults write com.apple.dock springboard-page-duration -float 0
|
||||||
|
|
||||||
|
echo "Disable Hot Corners"
|
||||||
|
## wvous-**-corner
|
||||||
|
## 0 - Nothing
|
||||||
|
## 1 - Disabled
|
||||||
|
## 2 - Mission Control
|
||||||
|
## 3 - Notifications
|
||||||
|
## 4 - Show the desktop
|
||||||
|
## 5 - Start screen saver
|
||||||
|
##
|
||||||
|
## wvous-**-modifier
|
||||||
|
## 0 - _
|
||||||
|
## 131072 - Shift+_
|
||||||
|
## 1048576 - Command+_
|
||||||
|
## 524288 - Option+_
|
||||||
|
## 262144 - Control+_
|
||||||
|
##
|
||||||
|
# Top Left
|
||||||
|
defaults write com.apple.dock wvous-tl-corner -int 0
|
||||||
|
# Top Right
|
||||||
|
defaults write com.apple.dock wvous-tr-corner -int 0
|
||||||
|
# Bottom Left
|
||||||
|
defaults write com.apple.dock wvous-bl-corner -int 0
|
||||||
|
# Bottom Right
|
||||||
|
defaults write com.apple.dock wvous-br-corner -int 0
|
||||||
|
|
||||||
echo "Disable Finder animations"
|
echo "Disable Finder animations"
|
||||||
defaults write com.apple.finder DisableAllAnimations -bool true
|
defaults write com.apple.finder DisableAllAnimations -bool true
|
||||||
|
|
||||||
|
@ -188,6 +230,9 @@ in
|
||||||
defaults write com.apple.Mail DisableSendAnimations -bool true
|
defaults write com.apple.Mail DisableSendAnimations -bool true
|
||||||
defaults write com.apple.Mail DisableReplyAnimations -bool true
|
defaults write com.apple.Mail DisableReplyAnimations -bool true
|
||||||
|
|
||||||
|
# echo "Disable \"Save in Keychain\" for pinentry-mac"
|
||||||
|
# defaults write org.gpgtools.common DisableKeychain -bool yes
|
||||||
|
|
||||||
echo "Define dock icon function"
|
echo "Define dock icon function"
|
||||||
__dock_item() {
|
__dock_item() {
|
||||||
echo "${
|
echo "${
|
||||||
|
@ -206,7 +251,7 @@ in
|
||||||
_CFURLString
|
_CFURLString
|
||||||
</key>
|
</key>
|
||||||
<string>
|
<string>
|
||||||
$\{1}
|
''${1}
|
||||||
</string>
|
</string>
|
||||||
<key>
|
<key>
|
||||||
_CFURLStringType
|
_CFURLStringType
|
||||||
|
|
|
@ -13,33 +13,33 @@ yabai -m signal --add event=window_destroyed action="sketchybar --trigger window
|
||||||
yabai -m signal --add event=window_destroyed action="yabai -m query --windows --window &> /dev/null || yabai -m window --focus mouse"
|
yabai -m signal --add event=window_destroyed action="yabai -m query --windows --window &> /dev/null || yabai -m window --focus mouse"
|
||||||
yabai -m signal --add event=application_terminated action="yabai -m query --windows --window &> /dev/null || yabai -m window --focus mouse"
|
yabai -m signal --add event=application_terminated action="yabai -m query --windows --window &> /dev/null || yabai -m window --focus mouse"
|
||||||
|
|
||||||
{
|
# {
|
||||||
DESIRED_SPACES_PER_DISPLAY=4
|
# DESIRED_SPACES_PER_DISPLAY=4
|
||||||
CURRENT_SPACES="$(yabai -m query --displays | jq -r '.[].spaces | @sh')"
|
# CURRENT_SPACES="$(yabai -m query --displays | jq -r '.[].spaces | @sh')"
|
||||||
|
#
|
||||||
DELTA=0
|
# DELTA=0
|
||||||
while read -r line
|
# while read -r line
|
||||||
do
|
# do
|
||||||
LAST_SPACE="$(echo "${line##* }")"
|
# LAST_SPACE="$(echo "${line##* }")"
|
||||||
LAST_SPACE=$((${LAST_SPACE}+${DELTA}))
|
# LAST_SPACE=$((${LAST_SPACE}+${DELTA}))
|
||||||
EXISTING_SPACE_COUNT="$(echo "${line}" | wc -w)"
|
# EXISTING_SPACE_COUNT="$(echo "${line}" | wc -w)"
|
||||||
MISSING_SPACES=$((${DESIRED_SPACES_PER_DISPLAY} - ${EXISTING_SPACE_COUNT}))
|
# MISSING_SPACES=$((${DESIRED_SPACES_PER_DISPLAY} - ${EXISTING_SPACE_COUNT}))
|
||||||
if [ "${MISSING_SPACES}" -gt 0 ]; then
|
# if [ "${MISSING_SPACES}" -gt 0 ]; then
|
||||||
for i in $(seq 1 ${MISSING_SPACES}); do
|
# for i in $(seq 1 ${MISSING_SPACES}); do
|
||||||
yabai -m space --create "${LAST_SPACE}"
|
# yabai -m space --create "${LAST_SPACE}"
|
||||||
LAST_SPACE=$((${LAST_SPACE}+1))
|
# LAST_SPACE=$((${LAST_SPACE}+1))
|
||||||
done
|
# done
|
||||||
elif [ "${MISSING_SPACES}" -lt 0 ]; then
|
# elif [ "${MISSING_SPACES}" -lt 0 ]; then
|
||||||
for i in $(seq 1 $((-${MISSING_SPACES}))); do
|
# for i in $(seq 1 $((-${MISSING_SPACES}))); do
|
||||||
yabai -m space --destroy "${LAST_SPACE}"
|
# yabai -m space --destroy "${LAST_SPACE}"
|
||||||
LAST_SPACE=$((${LAST_SPACE}-1))
|
# LAST_SPACE=$((${LAST_SPACE}-1))
|
||||||
done
|
# done
|
||||||
fi
|
# fi
|
||||||
DELTA=$((${DELTA}+${MISSING_SPACES}))
|
# DELTA=$((${DELTA}+${MISSING_SPACES}))
|
||||||
done <<< "${CURRENT_SPACES}"
|
# done <<< "${CURRENT_SPACES}"
|
||||||
|
#
|
||||||
sketchybar --trigger space_change --trigger windows_on_spaces
|
# sketchybar --trigger space_change --trigger windows_on_spaces
|
||||||
}
|
# }
|
||||||
|
|
||||||
yabai -m config "external_bar" "all:49:0" \
|
yabai -m config "external_bar" "all:49:0" \
|
||||||
"window_border" "on" \
|
"window_border" "on" \
|
||||||
|
|
Loading…
Reference in a new issue