Reno is the second iteration of the AWMTK-powered AwesomeWM config.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
1.2 KiB

  1. task default: [:install]
  2. ConfigPath = (ENV["XDG_DATA_HOME"] or ENV["HOME"]+'/.config')
  3. desc "Copy files to .config"
  4. file "copy-config" => ["rc.lua"] do
  5. sh "mkdir -p #{ConfigPath}/awesome"
  6. ["libs","modules","themes","widgets","rc.lua","desktop.conf"].each { |x|
  7. cp_r "./#{x}" "#{ConfigPath}/awesome"
  8. }
  9. end
  10. desc "Compile and install luapam"
  11. file "build-luapam" => "#{ConfigPath}/libs/pam.so" do
  12. sh "sh ./extra/install_luapam.sh"
  13. end
  14. desc "Install config"
  15. task install: ["copy-config","build-luapam"]
  16. desc "Build documentation"
  17. task :doc do
  18. sh "ldoc ./.ldoc.lua"
  19. end
  20. desc "Install extras"
  21. task "install-extra" do
  22. if Process.euid != 0
  23. raise Exception, "You need to be root to install extras"
  24. end
  25. cp "./extra/udev/backlight.rules" "/etc/udev/rules.d"
  26. mkdir "#{ConfigPath}/autostart"
  27. begin
  28. cp "/usr/share/applications/picom.desktop" "#{ConfigPath}/autostart/"
  29. rescue
  30. puts "picom not installed - ignoring"
  31. else
  32. cp "./extra/picom.conf" "#{ConfigPath}"
  33. end
  34. puts "Done! Reload awesome to complete installation"
  35. end
  36. desc "Uninstall from .config"
  37. task :clean do
  38. rm_rf "#{ConfigPath}/awesome"
  39. end
  40. desc "Wipe configuration and reinstall from scratch"
  41. task reinstall: [:clean,:install]