Skip to content

Commit

Permalink
Fix setting desktop picture.
Browse files Browse the repository at this point in the history
  • Loading branch information
reitermarkus committed Nov 19, 2024
1 parent 0188fa1 commit 938f95e
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions lib/tasks/dock.rake
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,10 @@ namespace :dock do
}
end

command 'sqlite3', File.expand_path('~/Library/Application Support/Dock/desktoppicture.db'), <<~SQL
DELETE FROM data;
DELETE FROM preferences;
VACUUM;
INSERT INTO data VALUES('#{desktop_pictures_dir}/current');
INSERT INTO preferences VALUES(1, 1, 1);
INSERT INTO preferences VALUES(1, 1, 2);
INSERT INTO preferences VALUES(1, 1, 3);
INSERT INTO preferences VALUES(1, 1, 4);
SQL

capture(
'/usr/bin/osascript', '-e',
"tell application \"System Events\" to tell every desktop to set picture to POSIX file \"#{desktop_pictures_dir}/current\""

Check failure on line 44 in lib/tasks/dock.rake

View workflow job for this annotation

GitHub Actions / rubocop

[Style/TrailingCommaInArguments] Style/TrailingCommaInArguments: Put a comma after the last parameter of a multiline method call.

Check failure on line 44 in lib/tasks/dock.rake

View workflow job for this annotation

GitHub Actions / rubocop

[Layout/LineLength] Layout/LineLength: Line is too long. [129/120]
)
killall 'cfprefsd'
end

Expand Down

0 comments on commit 938f95e

Please sign in to comment.