Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial layer-indicator support #13

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require 'rake/clean'
require 'erb'

task :default => [:dtsi, :dot]
task :default => [:dtsi, :btt, :dot]

#-----------------------------------------------------------------------------
# ZMK configuration snippet (DTSI)
Expand Down Expand Up @@ -43,6 +43,24 @@ rule '.dtsi.min' => '.dtsi' do |t|
File.write(t.name, minified)
end

#-----------------------------------------------------------------------------
# Overlay indicator helpers
#-----------------------------------------------------------------------------

#MacOS BetterTouchTool
btt_zip_dir_files = FileList['layer-indicator/macos/BetterTouchTool/bttpreset-zipdir/**/*']
task :btt => %w[layer-indicator/macos/BetterTouchTool/bttpreset-zipdir/presetjson.bttpreset layer-indicator/macos/BetterTouchTool/Glove80-Engrammer-Keyboard-Overlay-Preset.bttpresetzip]

# Create preset file if erb has changed
file 'layer-indicator/macos/BetterTouchTool/bttpreset-zipdir/presetjson.bttpreset' => 'layer-indicator/macos/BetterTouchTool/presetjson.bttpreset.erb' do |t|
sh "erb #{t.prerequisites[0]} > #{t.name}"
end
#Create preset zip file if anything under the bttpreset-zipdir dir changes, which includes the preset file.
file 'layer-indicator/macos/BetterTouchTool/Glove80-Engrammer-Keyboard-Overlay-Preset.bttpresetzip' => btt_zip_dir_files do |t|
sh "cd layer-indicator/macos/BetterTouchTool/bttpreset-zipdir; zip -FSr '../#{File.basename(t.name)}' *"
end


#-----------------------------------------------------------------------------
# Graphviz DOT for diagrams
#-----------------------------------------------------------------------------
Expand Down
Loading