Skip to content

Commit

Permalink
Add Zed.
Browse files Browse the repository at this point in the history
  • Loading branch information
reitermarkus committed May 17, 2024
1 parent ac58794 commit 399f5ab
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 4 deletions.
2 changes: 2 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ task :linux => [
:git,
:gpg,
:vscode,
:zed,
]

task :windows => [
Expand Down Expand Up @@ -153,4 +154,5 @@ task :macos => [
:mouse_trackpad,
:userscripts,
:thangs,
:zed,
]
9 changes: 5 additions & 4 deletions lib/tasks/brew.rake
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ namespace :brew do
add_line_to_file bash_environment, "[[ \":$PATH:\" =~ :#{bin}: ]] || " \
"export PATH=#{bin}:\"$PATH\""
end
{
{
'MANPATH' => File.join(brew_prefix, 'share/man'),
'INFOPATH' => File.join(brew_prefix, 'share/info'),
}.transform_values(&:shellescape).each do |var, path|
Expand Down Expand Up @@ -310,6 +310,7 @@ namespace :brew do
'xld' => { flags: ["--appdir=#{converters_dir}"] },
'xnconvert' => { flags: ["--appdir=#{converters_dir}"] },
'xquartz' => {},
'zed' => {},
}.merge(wanted_fonts).freeze

desc 'Install Casks and Formulae'
Expand Down Expand Up @@ -426,15 +427,15 @@ namespace :brew do

if macos?
(converters_dir/'.localized').mkpath

File.write "#{converters_dir}/.localized/de.strings", <<~STRINGS
"Converters" = "Konvertierungswerkzeuge";
STRINGS

File.write "#{converters_dir}/.localized/en.strings", <<~STRINGS
"Converters" = "Conversion Tools";
STRINGS

# Ensure directories exist and have correct permissions.
[
'/Library/LaunchAgents',
Expand Down
17 changes: 17 additions & 0 deletions lib/tasks/zed.rake
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# frozen_string_literal: true

require 'json'

task :zed => [:'brew:casks_and_formulae'] do
zed_config = Pathname('~/.config/zed/settings.json').expand_path

zed_config.write JSON.pretty_generate({
'theme' => 'Solarized Dark',
'telemetry' => {
'metrics' => false
},
'buffer_font_size' => 13,
'buffer_font_family' => 'SauceCodePro Nerd Font Mono',
'seed_search_query_from_cursor' => 'never',
})
end

0 comments on commit 399f5ab

Please sign in to comment.