<commit_before>include_recipe 'sprout-terminal::check_for_active'
term_opts = node['sprout']['terminal']

remote_file "#{Chef::Config[:file_cache_path]}/MenloRegular18pt.bin" do
  source term_opts['font_src']
  owner node['current_user']
  not_if { term_opts['default_profile'].nil? && term_opts['font_src'].nil? }
  only_if { term_opts['update_font'] }
end

execute "Updates font on the #{term_opts['default_profile']} profile to Menlo-Regular 18pt" do
  command "/usr/libexec/PlistBuddy -c 'import :Window\\ Settings:#{term_opts['default_profile']}:Font #{Chef::Config[:file_cache_path]}/MenloRegular18pt.bin' #{ENV['HOME']}/Library/Preferences/com.apple.Terminal.plist"
  user node['current_user']
  not_if { term_opts['default_profile'].nil? && term_opts['font_src'].nil? }
  only_if { term_opts['update_font'] }
end

execute "Turns on Anti-Aliasing for the #{term_opts['default_profile']} profile's font" do
  command "/usr/libexec/PlistBuddy -c 'set :Window\\ Settings:#{term_opts['default_profile']}:FontAntialias true' #{ENV['HOME']}/Library/Preferences/com.apple.Terminal.plist"
  user node['current_user']
  not_if { term_opts['default_profile'].nil? }
  only_if { term_opts['update_font'] }
end<commit_msg>Removes Menlo hard-coding from everywhere but the default attributes file.<commit_after>include_recipe 'sprout-terminal::check_for_active'
term_opts = node['sprout']['terminal']

remote_file "#{Chef::Config[:file_cache_path]}/customFont.bin" do
  source term_opts['font_src']
  owner node['current_user']
  not_if { term_opts['default_profile'].nil? && term_opts['font_src'].nil? }
  only_if { term_opts['update_font'] }
end

execute "Updates font on the #{term_opts['default_profile']} profile to #{term_opts['font_src']}" do
  command "/usr/libexec/PlistBuddy -c 'import :Window\\ Settings:#{term_opts['default_profile']}:Font #{Chef::Config[:file_cache_path]}/customFont.bin' #{ENV['HOME']}/Library/Preferences/com.apple.Terminal.plist"
  user node['current_user']
  not_if { term_opts['default_profile'].nil? && term_opts['font_src'].nil? }
  only_if { term_opts['update_font'] }
end

execute "Turns on Anti-Aliasing for the #{term_opts['default_profile']} profile's font" do
  command "/usr/libexec/PlistBuddy -c 'set :Window\\ Settings:#{term_opts['default_profile']}:FontAntialias true' #{ENV['HOME']}/Library/Preferences/com.apple.Terminal.plist"
  user node['current_user']
  not_if { term_opts['default_profile'].nil? }
  only_if { term_opts['update_font'] }
end
{'fraction_non_alphanumeric': 0.16392125351546805, 'fraction_numerical': 0.0024106066693451184, 'mean_word_length': 7.245033112582782, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3270119', 'n_tokens_mistral': 859, 'n_tokens_neox': 836, 'n_words': 145}