[maid] Add Ergodox to maid cleanup and delete all of Downloads/

This commit is contained in:
Sebastian Schulze 2019-07-31 12:39:16 +02:00
parent 41dd4b33b5
commit 0e5b58db9f
Signed by: bascht
GPG Key ID: 5BCB1D3B4D38A35A
1 changed files with 12 additions and 4 deletions

View File

@ -9,6 +9,13 @@ Maid.rules do
)
end
rule 'Safe the Ergodox Layouts' do
move(
dir('~/Downloads/ergodox_ez*.hex'),
mkdir("~/Lager/Ergodox-Layouts/")
)
end
rule 'Move PDF Files to be buffered' do
move(
dir('~/Downloads/*.{PDF,pdf}'),
@ -45,15 +52,16 @@ Maid.rules do
end
rule 'Delete old and partial downloads' do
dir('~/Downloads/*.{deb,zip,nzb,bin,tgz,xz,gz,bz,jar,txz,dmg,exe,bz2,7z,rpm,part}').each do |path|
dir('~/Downloads/*.{deb,zip,nzb,bin,tgz,tar.gz,xz,gz,bz,jar,txz,dmg,exe,bz2,7z,rpm,part}').each do |path|
trash(path) if 3.days.since?(modified_at(path))
end
end
rule 'Delete extracted folders' do
dir('~/Downloads/*').each do |path|
rule 'Delete extracted folders and really old shit' do
dir('~/Downloads/.*').each do |path|
puts path
trash(path) if 5.days.since?(modified_at(path)) && File.directory?(path)
trash(path) if 2.weeks.since?(modified_at(path))
end
end
end