<commit_before>#!/usr/bin/env zsh

OSX_MENU_EXTRAS="/System/Library/CoreServices/Menu\ Extras"

# hide the useless icons
if ls $HOME/Library/Preferences/ByHost/ | grep com.apple.systemuiserver &> /dev/null
then
  for domain in $HOME/Library/Preferences/ByHost/com.apple.systemuiserver.*
  do
    defaults write "${domain}" dontAutoLoad -array \
      "$OSX_MENU_EXTRAS/Displays.menu" \
      "$OSX_MENU_EXTRAS/TimeMachine.menu" \
      "$OSX_MENU_EXTRAS/User.menu" \
      "$OSX_MENU_EXTRAS/Clock.menu"
  done
fi

# define icons you want in menu bar
defaults write com.apple.systemuiserver menuExtras -array \
  "$OSX_MENU_EXTRAS/TextInput.menu" \
  "$OSX_MENU_EXTRAS/Volume.menu" \
  "$OSX_MENU_EXTRAS/AirPort.menu" \
  "$OSX_MENU_EXTRAS/Bluetooth.menu" \
  "$OSX_MENU_EXTRAS/Battery.menu"

MENUMETERS_PATH="/opt/homebrew-cask/Caskroom/menumeters"
if ls $MENUMETERS_PATH &> /dev/null
then
  defaults write com.apple.systemuiserver menuExtras -array-add \
    "$MENUMETERS_PATH/latest/MenuMeters Installer.app/Contents/Resources/MenuMeters.prefPane/Contents/Resources/MenuMeterMem.menu" \
    "$MENUMETERS_PATH/latest/MenuMeters Installer.app/Contents/Resources/MenuMeters.prefPane/Contents/Resources/MenuMeterCPU.menu" \
    "$MENUMETERS_PATH/latest/MenuMeters Installer.app/Contents/Resources/MenuMeters.prefPane/Contents/Resources/MenuCracker.menu"
fi
<commit_msg>Added: OS X clock in menubar<commit_after>#!/usr/bin/env zsh

OSX_MENU_EXTRAS="/System/Library/CoreServices/Menu\ Extras"

# hide the useless icons
if ls $HOME/Library/Preferences/ByHost/ | grep com.apple.systemuiserver &> /dev/null
then
  for domain in $HOME/Library/Preferences/ByHost/com.apple.systemuiserver.*
  do
    defaults write "${domain}" dontAutoLoad -array \
      "$OSX_MENU_EXTRAS/Displays.menu" \
      "$OSX_MENU_EXTRAS/TimeMachine.menu" \
      "$OSX_MENU_EXTRAS/User.menu"
  done
fi

# define icons you want in menu bar
defaults write com.apple.systemuiserver menuExtras -array \
  "$OSX_MENU_EXTRAS/TextInput.menu" \
  "$OSX_MENU_EXTRAS/Volume.menu" \
  "$OSX_MENU_EXTRAS/AirPort.menu" \
  "$OSX_MENU_EXTRAS/Bluetooth.menu" \
  "$OSX_MENU_EXTRAS/Battery.menu"

MENUMETERS_PATH="/opt/homebrew-cask/Caskroom/menumeters"
if ls $MENUMETERS_PATH &> /dev/null
then
  defaults write com.apple.systemuiserver menuExtras -array-add \
    "$MENUMETERS_PATH/latest/MenuMeters Installer.app/Contents/Resources/MenuMeters.prefPane/Contents/Resources/MenuMeterMem.menu" \
    "$MENUMETERS_PATH/latest/MenuMeters Installer.app/Contents/Resources/MenuMeters.prefPane/Contents/Resources/MenuMeterCPU.menu" \
    "$MENUMETERS_PATH/latest/MenuMeters Installer.app/Contents/Resources/MenuMeters.prefPane/Contents/Resources/MenuCracker.menu"
fi

# add clock after everything
defaults write com.apple.systemuiserver menuExtras -array-add \
  "$OSX_MENU_EXTRAS/Clock.menu"

{'fraction_non_alphanumeric': 0.11772999647514981, 'fraction_numerical': 0.0, 'mean_word_length': 4.575638506876228, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '340090', 'n_tokens_mistral': 1108, 'n_tokens_neox': 1077, 'n_words': 146}