Set wallpaper using walldrive and a csv file
Recommended using with Google drive
- pywal (python)
- sxiv
- curl
- awk
- mktemp
- Make a new spreadsheet
- Go to
Tools
--->Script editor
- paste the below code in the editor
// this script just append the essential column needed for the script to run
// remember to excute this script on a empty sheet or you will lose data on that perticular sheet
function myFunction() {
var ss=SpreadsheetApp.getActiveSpreadsheet();
var file, data, sheet = ss.getActiveSheet();
sheet.clear()
var folder = DriveApp.getFolderById("<folder id here>");
var files=folder.getFiles();
while (files.hasNext()) {
file = files.next();
data = [
file.getName(),
file.getDownloadUrl(),
'https://lh3.googleusercontent.com/d/'+ file.getId() +'=w320?authuser=0',
file.getSize()
];
sheet.appendRow(data);
}
}
// excute this script
- Download the
csv
file - clone the repo and cd into the repo
- run the script as
walldrive -r 10 -f 7 -s ./Example/wallpaper.csv
(this is an example)- -r (range) number of pics you want to display
- -f (from) what should be starting pic number
- -s (source) source file this must be a
csv
file
- The script will only download and apply photo as as wallpaper which is marked first.
- A
csv
file is already in the example folder for testing