r/iOSsetups • Human Detected • 13d ago

Discussion Why didn’t anyone tell me about Scriptable before?

Post image

Amazing app that allows you to code widgets in JavaScript. I like it because unlike Widgy, you can make an unlimited amount without any subscriptio. I did not develop it, I am not an astroturfer. Try it out

1.5k Upvotes

106 comments sorted by

148

u/Pushin30 13d ago • Bravo

Github graph on phone homescreen is insane levels of larp

35

u/wa019c Human Detected 13d ago

Haha lol I use it to remind me I’m a lazy piece of shit

10

u/Electronic-Sun3344 12d ago

Lazy is good productivity is evil and soul sucking! Jkd maybe not...

2

u/chosenpluto 9d ago

its pretty much empty too lol

1

u/wa019c Human Detected 7d ago

I don’t have an active project going on lol I just make bug fixes 

2

u/rainnvelt 9d ago

I too had it for months. Never ever looked at it. Removed it.

106

u/wa019c Human Detected 13d ago

Note: The widget was coded with help of AI.

AI did:

  • background circley design
  • helping me fix the fuckass margins

I did:

  • everything else 

If this is not your type of thing then I’m sorry

74

u/trenniepennie 13d ago

Dude who cares, if its cool its cool🤷‍♂️ no need to be sorry

49

u/wa019c Human Detected 13d ago

Lol some people are still anti-ai in the big 26 and that’s okay

I’m not a huge fan of either side of the debate I just use it as a talking google search 

8

u/trenniepennie 13d ago

And thats fine too

I always say if u use it as a tool go ahead. But dont generate everything

7

u/unnuageorange 12d ago

I’ve seen a story, where Claude broke into a Tizen OS driven TV to turn off ads and such, all while using phone camera to see what’s actually happening on screen. Hella cool usage for AI

3

u/trenniepennie 12d ago

Exactly… im gonna do that too, maybe even see if it gets rid of youtube ads

1

u/ChallengeOriginal238 12d ago

Pls post if you find a way to disable yt ads on tv

1

u/wa019c Human Detected 12d ago

It’s very easy just search TizenTube Cobalt

1

u/trenniepennie 12d ago

I couldnt but i did find this for if u have a samsung tv

14

u/fantakillen 13d ago

Some people will see something and like it, but as soon as they they realize AI made it, they suddenly hate it and it's just AI slop.

5

u/trenniepennie 13d ago

Exactly…

4

u/brewditt 13d ago

Plenty of grumpy coders care…haven’t you seen this before?

9

u/Kooky-Click-7319 13d ago

So as long as it looks good. Ai is a mindset thing. It’s like saying I typed this in vs I wrote it by hand. It’s your ideas and execution mate. Good one and enjoy

1

u/[deleted] 12d ago

[removed] — view removed comment

1

u/AutoModerator 12d ago

Your comment has been removed because of this subreddit’s account requirements. You have not broken any rules, and your account is still active and in good standing. Please check your notifications for more information!

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/enola_gayy 10d ago

cool !.. which AI did you use? a subscription one?

2

u/wa019c Human Detected 10d ago

ChatGPT on the free plan, I just input my code and told it what was wrong

1

u/enola_gayy 10d ago

Thanks for the quick reply !

5

u/HobbyHorse69 13d ago

I’m somewhat anti-ai but appreciate the transparency and how you used it.

The most frustrating thing about slopcoders is that they did everything from a prompt and don’t know how to code, which results in something that doesn’t work and can’t be fixed.

-3

u/megasivatherium 13d ago

In the post you say you're not the developer

13

u/HobbyHorse69 13d ago

He isn’t the developer of Scriptable, he used Scriptable to code the widgets in the picture

15

u/Normal-Annual2495 13d ago

Yeah, I love scriptable
Have these 2 widgets that work as a charm

1

u/wa019c Human Detected 13d ago

Hah lol that looks sick!

4

u/Ghammer80 12d ago • Bravo

It’s super slick, I did a tie in with HA to expose the Mazda HA entities

…was jealous of all the Tesla widgets

1

u/wa019c Human Detected 12d ago

That is SICK

1

u/Fluid-Hunter556 11d ago

I was just reading through comments on this post and seen this, wasn’t originally going to mess with scriptable but now I’m going to do what you did with it for my Hyundai in HA too! Cheers!

1

u/Fluid-Hunter556 11d ago

I even made it so when my car is on/running, the headlights in the image turn on, when it’s off, it looks like this

1

u/Ghammer80 11d ago

Sick! How’d you add buttons I thought you couldn’t do that on scriptable?

1

u/Fluid-Hunter556 11d ago

Runs it through HA, unfortunately has to open the scriptable app. just keep the widget to “open app” and it opens scriptable then it can run the command through HA.

1

u/Fluid-Hunter556 11d ago

I just simplified it

1

u/Fluid-Hunter556 11d ago

Remote started my car for this test

6

u/rogo725 13d ago

Is termius worth it?

2

u/Uncle-Osteus 13d ago

personally I prefer iSH

1

u/wa019c Human Detected 12d ago

This is a crazy choice but to each their own I guess

0

u/[deleted] 11d ago

[deleted] — view deleted comment

1

u/wa019c Human Detected 11d ago

Oh holy shit I should’ve known this sooner

Thanks

6

u/lukewhale 13d ago

Yes. Password manager for SSH essentially. It’s fantastic.

3

u/MXRCO007 12d ago

Paying for it? Hell no

2

u/Miserable-Sell904 12d ago

I use WebSSH.

https://webssh.net

It’s great.

1

u/ky7969 13d ago

It’s great, but I wouldn’t pay for it. I use Termix instead

1

u/ItzDarc 12d ago

there are like 5 called Termix by diff devs even. which one?

1

u/QuirkyImage 12d ago

I use ashell and use a ported openssh in it. I plan to get mosh working in it because blink is now bloated.

1

u/xenomxrph 13d ago

I wouldn’t say so

8

u/lusvd 13d ago

I recommend something like "Web Widget" as a far superior alternative.
It let's you render a webview, so you have 100% control over the UI without touching any pesky custom SDK/DSL.

4

u/Grexo 13d ago

Does it let you run JavaScript locally? Seems like that’s the big benefit of Scriptable. Needing to host a webpage for a simple status update widget seems not “far superior” when I can whip up a little local script.

0

u/wa019c Human Detected 13d ago

Nice will check it out

3

u/jrdnlc 13d ago

Can you share your script? Looks awesome!

1

u/TommyPT_ 12d ago

I second this

3

u/wa019c Human Detected 12d ago

You need Glances up and running


const HOST = "YOUR_IP";
const API = `http://${HOST}:API_PORT/api/API_ENDPOINT`;

const SERVICES = [
  { name: "SERVICE_1", url: `http://${HOST}:YOUR_PORT/` },
  { name: "SERVICE_2", url: `http://${HOST}:YOUR_PORT/` },
  { name: "SERVICE_3", url: "http://YOUR_SERVICE_3_HOST/" },
  { name: "SERVICE_4", url: "http://YOUR_SERVICE_4_HOST/" }
];

const C = {
  text: "#F2F6FC",
  muted: "#8FA7C4",
  blue: "#45A9FF",
  orange: "#FFAA55",
  green: "#55D69E",
  red: "#FF6868",
  track: "#203650",
  divider: "#29415D"
};

const W = new ListWidget();
W.setPadding(17, 20, 17, 20);
W.refreshAfterDate = new Date(Date.now() + 5 * 60 * 1000);

const draw = new DrawContext();
draw.size = new Size(340, 170);
draw.opaque = false;
draw.respectScreenScale = true;

function circle(x, y, r, hex, alpha) {
  draw.setFillColor(new Color(hex, alpha));
  draw.fillEllipse(new Rect(x-r, y-r, r*2, r*2));
}

circle(285, 10, 100, "#267FC4", 0.20);
circle(320, 45, 75, "#45A9FF", 0.09);
circle(35, 165, 100, "#E88942", 0.12);
circle(0, 170, 65, "#FFAA55", 0.08);

W.backgroundImage = draw.getImage();

function addText(parent, value, size, hex, weight = "regular") {
  const t = parent.addText(String(value));
  t.font =
    weight === "bold" ? Font.boldSystemFont(size) :
    weight === "medium" ? Font.mediumSystemFont(size) :
    Font.systemFont(size);
  t.textColor = new Color(hex);
  return t;
}

function gb(value) {
  return (Number(value || 0) / 1073741824).toFixed(1);
}

function uptime(value) {
  if (!value) return "—";
  const s = String(value);
  const days = s.match(/(\d+)\s*days?/i);
  const hours = s.match(/(\d+):/);
  return days ? `${days[1]}d ${hours ? hours[1] : "0"}h` : s;
}

let data = null;
let metricsError = false;

async function fetchMetrics() {
  const req = new Request(API);
  req.timeoutInterval = 10;
  return await req.loadJSON();
}

async function checkService(service) {
  try {
    const req = new Request(service.url);
    req.timeoutInterval = 7;
    await req.load();
    return req.response.statusCode >= 200 &&
      req.response.statusCode < 400;
  } catch (e) {
    return false;
  }
}

const serviceChecks = await Promise.all(
  SERVICES.map(s => checkService(s))
);

try {
  data = await fetchMetrics();
} catch (e) {
  metricsError = true;
}

const header = W.addStack();
header.layoutHorizontally();
header.centerAlignContent();

const title = header.addStack();
title.layoutVertically();

addText(title, "SYSTEM STATUS", 10, C.muted, "bold");
title.addSpacer();
addText(title, "YOUR_HOSTNAME", 22, C.text, "medium");

header.addSpacer();

const status = header.addStack();
status.centerAlignContent();

const dot = status.addText("●");
dot.font = Font.systemFont(10);
dot.textColor = new Color(metricsError ? C.red : C.green);
status.addSpacer(3);

addText(status, metricsError ? "OFFLINE" : "ONLINE",
  10, metricsError ? C.red : C.green, "bold");

W.addSpacer(5);

function addMetric(parent, label, value, percent, accent) {
  const col = parent.addStack();
  col.layoutVertically();
  col.size = new Size(76, 0);

  addText(col, label, 9, C.muted, "bold");
  col.addSpacer(1);

  const val = addText(col, value, 24, accent, "medium");
  val.lineLimit = 1;
  val.minimumScaleFactor = 0.65;

  col.addSpacer(2);

  const track = col.addStack();
  track.size = new Size(70, 4);
  track.backgroundColor = new Color(C.track);
  track.cornerRadius = 2;

  const fill = track.addStack();
  fill.size = new Size(
    Math.max(1, 70 * Math.max(0, Math.min(100, percent)) / 100),
    4
  );
  fill.backgroundColor = new Color(accent);
  fill.cornerRadius = 2;

  track.addSpacer();
}

if (data) {
  const fs = (data.fs || []).find(x => x.mnt_point === "/")
    || data.fs?.[0] || {};

  const cpu = Number(data.cpu?.total || 0);

  const memTotal = Number(data.mem?.total || 0);
  const memUsed = Number(data.mem?.used || 0);
  const memFree = Number(data.mem?.available ?? (memTotal - memUsed));
  const memPercent = memTotal ? memUsed / memTotal * 100 : 0;

  const diskTotal = Number(fs.size || 0);
  const diskFree = Number(fs.free || 0);
  const diskPercent = diskTotal
    ? (diskTotal - diskFree) / diskTotal * 100
    : 0;

  const metrics = W.addStack();
  metrics.layoutHorizontally();

  addMetric(metrics, "CPU", `${Math.round(cpu)}%`, cpu, C.blue);
  metrics.addSpacer();

  addMetric(metrics, "RAM FREE", `${gb(memFree)} GB`,
    memPercent, C.orange);
  metrics.addSpacer();

  addMetric(metrics, "DISK FREE", `${gb(diskFree)} GB`,
    diskPercent, diskPercent >= 90 ? C.red : C.blue);

} else {
  addText(W, "Metrics unavailable", 14, C.red, "medium");
  W.addSpacer(1);
  addText(W, "Check network connection", 10, C.muted);
}

W.addSpacer(5);

const divider = W.addStack();
divider.size = new Size(0, 1);
divider.backgroundColor = new Color(C.divider);

W.addSpacer(4);

const serviceHeader = W.addStack();
serviceHeader.layoutHorizontally();
serviceHeader.centerAlignContent();

addText(serviceHeader, "SERVICES", 10, C.muted, "bold");
serviceHeader.addSpacer();

const online = serviceChecks.filter(Boolean).length;

addText(serviceHeader, `${online}/${SERVICES.length} ONLINE`,
  10, online === SERVICES.length ? C.green : C.orange, "bold");

W.addSpacer(3);

const serviceRow = W.addStack();
serviceRow.layoutHorizontally();
serviceRow.centerAlignContent();

for (let i = 0; i < SERVICES.length; i++) {
  const item = serviceRow.addStack();
  item.layoutHorizontally();
  item.centerAlignContent();

  const serviceDot = item.addText("●");
  serviceDot.font = Font.systemFont(10);
  serviceDot.textColor = new Color(serviceChecks[i] ? C.green : C.red);

  item.addSpacer(3);
  addText(item, SERVICES[i].name, 10, C.text, "medium");

  if (i < SERVICES.length - 1) serviceRow.addSpacer();
}

W.addSpacer();

const footer = W.addStack();
footer.layoutHorizontally();
footer.centerAlignContent();

addText(footer, "UPTIME", 10, C.muted, "bold");
footer.addSpacer();

addText(footer, data ? uptime(data.uptime) : "—",
  12, C.text, "medium");

Script.setWidget(W);

if (!config.runsInWidget) {
  await W.presentMedium();
}

Script.complete();

1

u/TommyPT_ 12d ago

Thank you. Never heard of glances tho. I have also lookup using home assistant to fetch this data using proxmox integration

60

u/branchCastle 13d ago

Dude what. You're telling me now?

2

u/bonyuri 11d ago

I have NO idea what widget to look at on his Home Screen…

3

u/siriston 13d ago

hello fellow iphone air user

1

u/wa019c Human Detected 13d ago

hi 

8

u/QuirkyImage 12d ago

It’s a shame they axed the macOS version of scriptable everything could have been portable.
prefer python there’s Pythonista 3 on Apple Store but it hasn’t been updated in ages.

6

u/fucklehead 12d ago

This guy devs!

5

u/pslgz_ 13d ago

cool stuff

11

u/Nill_Matic82 13d ago

Does the iPhone need to be jail broken?

15

u/Honest_Annual8802 13d ago

No. Scriptable is a regular app you get from the app store

4

u/daZK47 13d ago

How’d you get Stik working on 27

1

u/K3VZIE 12d ago

Thanks will try this out is it easy to use?

1

u/wa019c Human Detected 12d ago

Depends if you know JavaScript, though even if you do there is still a slight learning curve. Widgy is far easier to use but limited on the free plan

1

u/Fast-Money-3430 9d ago

Wait how did u get your pc status on ur phone? Also are u able to control it from your phone like power on/off view and control your screen or what can u do with that. This shi cool asf. Even tho it can be used to larp but imagine the aura gained  from it🤣

2

u/wa019c Human Detected 9d ago

Using Scriptable lol. And the other app on my home screen, Termius, allows me to remote into my server and run commands. If I want to control the screen (my server doesn’t have one but my pc does), I connect to my px with RealVNC Viewer.

3

u/iamrob15 13d ago

Swapped out ssh apps with Orca. Well worth a try!

2

u/Wimmi29 13d ago

Großartig… Danke 🤩 kannte ich auch bis jetzt nicht. Der Entwickler hat noch weitere großartige Apps 🙏👍🏼

2

u/Codex0607 13d ago

First of all, even the creator of Linux is using AI. So if it does help,.why not? Do you know, if there is something linke this for android?

2

u/mwagstaff 13d ago

I don't have anything of value to add here, other than to thank the author of Scriptable for a fantastic app.

Thank you so much!

2

u/Ok-Pace4929 13d ago

i never heard of that app

1

u/PiiiRKO 13d ago

Looks fantastic!

1

u/One_Advice_1182 13d ago

Looks
Fcking cool ngl.

Can you reccomend widget app, might be some customisation app ?

1

u/su5577 13d ago

How can I get this toov

1

u/Ok-Owl-5740 13d ago

Looks super useful

1

u/4everloveme 13d ago

你应该用一下Scripting

1

u/ImprovementTop4598 12d ago

Actually a beautiful home screen!

1

u/iamzices 12d ago

this is amazing!

1

u/This-Marzipan-9239 12d ago

It has no updates since two years ago

1

u/After_Working 11d ago

Now that is a nerdy homepage

1

u/Dandusm 7d ago

Tutorial

1

u/Voyager_Ten 13d ago

Out of curiosity, would you / anyone be interested in an app that could do something like this? Like host all of the the information and even allow controlling back to your scripts?

-3

u/SamuelLJenkins 13d ago

This whole thread feels like an ad.

4

u/wa019c Human Detected 13d ago

I find it sad that it’s hard to tell nowadays between astroturfing or a thread full of people who genuinely like the app. Scriptable has been around for a while though (first launched 2018), I am very very late to the party

4

u/clarkaj24 13d ago

Maybe but Scriptable is pretty well known. I see apps posted here and occasionally look them up. If they have very few reviews I assume it’s a promotion. Scriptable has over 4K reviews on the App Store. I’ve had it for awhile but have never really done anything with it.

0

u/Sure-Philosopher-873 13d ago

Because Mohammed must go to the mountain, not the other way around!

-4

u/Sagittaryuz 13d ago

Que legal mano!

Aqui eu preferi usar o scripting. Ele tem funções a mais que o scriptable

3

u/MarcoMeirelles 13d ago

Com todo respeito, que coisa mais horrorosa irmão

0

u/[deleted] 12d ago

[deleted] — view deleted comment

1

u/wa019c Human Detected 12d ago

Microbin self-hosted

2

u/[deleted] 12d ago

[removed] — view removed comment

2

u/wa019c Human Detected 12d ago

Fr it currently says connected even though I’m literally not

1

u/[deleted] 13d ago

[removed] — view removed comment

1

u/AutoModerator 13d ago

Your comment has been removed because of this subreddit’s account requirements. You have not broken any rules, and your account is still active and in good standing. Please check your notifications for more information!

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/[deleted] 12d ago

[removed] — view removed comment

1

u/AutoModerator 12d ago

Your comment has been removed because of this subreddit’s account requirements. You have not broken any rules, and your account is still active and in good standing. Please check your notifications for more information!

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.