Alpha Chen 2 years ago
parent e9a944c8c6
commit 1b948cfe89
No known key found for this signature in database

@ -1,10 +1,4 @@
namespace :clean do namespace :clean do
desc "Remove .DS_Store files from Dropbox"
task :ds_store do
sh "find ~/Dropbox -name .DS_Store -print0 | xargs -0 rm -v"
end
task all: %i[ ds_store ]
end end
namespace :sync do namespace :sync do
@ -57,21 +51,6 @@ namespace :sync do
end end
end end
namespace :bitbar do
FILE = "onebusaway.30s.rb"
desc "Toggle OneBusAway BitBar plugin"
task :oba do
if File.exist?(File.expand_path("../bitbar/enabled/#{FILE}", __FILE__))
rm File.expand_path("../bitbar/enabled/#{FILE}", __FILE__)
else
ln_s File.expand_path("../bitbar/#{FILE}", __FILE__),
File.expand_path("../bitbar/enabled/#{FILE}", __FILE__)
end
sh "open bitbar://refreshPlugin?name=onebusaway.*"
end
end
namespace :pave do namespace :pave do
PATHS = %w[ PATHS = %w[
Downloads/ Downloads/
@ -105,16 +84,23 @@ namespace :pave do
end end
end end
namespace :brew do namespace :init do
desc "Fix homebrew permissions for multi-user" desc "Set up local neovim overrides"
task :multiuser do task "local-nvim", [:dir] do |t, args|
sh "sudo chmod -R g+w $(brew --prefix)/*" do dir = File.expand_path(args.fetch(:dir))
# we don't care if it fails
end
sh "sudo chgrp -R homebrew $(brew --prefix)/*" do File.write(File.join(dir, ".vimrc.local"), <<~VIMRC_LOCAL)
# we don't care if it fails lua << EOF
end package.path = "./.dev.local/?.fnl;" .. package.path
require("vimrc")
EOF
VIMRC_LOCAL
mkdir_p File.join(dir, ".dev.local")
File.write(File.join(dir, ".dev.local", "vimrc.fnl"), <<~VIMRC_FNL)
(local {: setup-lsp} (require :lsp))
;; (setup-lsp :ruby_ls)
VIMRC_FNL
end end
end end

Loading…
Cancel
Save