Forum Archive

Add spacers to your home screen with Pythonista

0942v8653

I created a script that can make a spacer icon (an image that's just a cropped version of your wallpaper at the relevant location) to put on your home screen. It runs a Bottle server and opens a page in Safari where you can tap a position to use as the icon. Then you can tap the Share button and add the page to your home screen. It uses the zero-width joiner (&zwj) as an invisible space that Safari accepts as a bookmark name.

Here it is on Github: 0942v8653/pythonista-homescreen-spacer

Of course you can also make an icon to add a new spacer icon with my pythonista-homescreen-icon script.

pfcbenjamin

This is amazing, I was just trying to reverse engineer something using pythonista with safari, URLs, and base64 encoding. Now I can use this code to figure out how to do what I'm trying to do. Thank you!!

brumm

Great, thanks a lot. If somebody need the values for the iPad (retina display)...

size = 152
startpos = (163, 176)
diff = (352, 322)
cols, rows = 4, 5
...
    width:76px;
    height:76px;
...
<div style="background:url(http://localhost:8080/screen.png);background-size:768px 1024px;height:1024px">
0942v8653

I updated the script so that you only need to change those top four lines (the other numbers are calculated automatically). It should also support non-retina displays or iPhone 6+ if you can figure out those numbers at the top.

wradcliffe

I have to ask - what the heck is this for? I have no idea what problem this is solving but it seems important. Please excuse the clueless question.

brumm

Creation of invisible home screen schortcuts.

wradcliffe

I found this article describing the entire problem. http://david-smith.org/blog/2014/10/15/blank-icon-slots/