Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Task: Fastfetch 6
- A1: Termux [
- Configuration: ff.sh
- Working Directory ✕
- Stdin ✕
- Custom Log Level null
- Terminal Session ✕
- Wait For Result ✓
- Timeout (Seconds): 10
- Structure Output (JSON, etc): On ]
- A2: Variable Set [
- Name: %json
- To: %stdout
- Structure Output (JSON, etc): On ]
- A3: Variable Set [
- Name: %objects
- To: %json[=:=root=:=](#)
- Structure Output (JSON, etc): On ]
- A4: Variable Set [
- Name: %idx_d
- To: 0
- Structure Output (JSON, etc): On ]
- A5: For [
- Variable: %obj
- Items: %json[=:=root=:=]()
- Structure Output (JSON, etc): On ]
- A6: If [ %obj.error !Set ]
- <OS>
- A7: If [ %obj.type ~ OS ]
- A8: Variable Add [
- Name: %idx_d
- Value: 1
- Wrap Around: 0 ]
- A9: Array Push [
- Variable Array: %type
- Position: %idx_d
- Value: %obj.type ]
- A10: Array Push [
- Variable Array: %data
- Position: %idx_d
- Value: %obj.result.name %obj.result.codename %obj.result.version ]
- <Host>
- A11: Else
- If [ %obj.type ~ Host ]
- A12: Variable Add [
- Name: %idx_d
- Value: 1
- Wrap Around: 0 ]
- A13: Array Push [
- Variable Array: %type
- Position: %idx_d
- Value: %obj.type ]
- A14: Array Push [
- Variable Array: %data
- Position: %idx_d
- Value: %obj.result.name ]
- <BIOS>
- A15: Else
- If [ %obj.type ~ BIOS ]
- A16: Variable Add [
- Name: %idx_d
- Value: 1
- Wrap Around: 0 ]
- A17: Array Push [
- Variable Array: %type
- Position: %idx_d
- Value: %obj.type (%obj.result.type) ]
- A18: Array Push [
- Variable Array: %data
- Position: %idx_d
- Value: %obj.result.version ]
- <Board>
- A19: Else
- If [ %obj.type ~ Board ]
- A20: Variable Add [
- Name: %idx_d
- Value: 1
- Wrap Around: 0 ]
- A21: Array Push [
- Variable Array: %type
- Position: %idx_d
- Value: %obj.type ]
- A22: Array Push [
- Variable Array: %data
- Position: %idx_d
- Value: %obj.result.name ]
- <Kernel>
- A23: Else
- If [ %obj.type ~ Kernel ]
- A24: Variable Add [
- Name: %idx_d
- Value: 1
- Wrap Around: 0 ]
- A25: Array Push [
- Variable Array: %type
- Position: %idx_d
- Value: %obj.type ]
- A26: Array Push [
- Variable Array: %data
- Position: %idx_d
- Value: %obj.result.name %obj.result.release ]
- <InitSystem>
- A27: Else
- If [ %obj.type ~ InitSystem ]
- A28: Variable Add [
- Name: %idx_d
- Value: 1
- Wrap Around: 0 ]
- A29: Array Push [
- Variable Array: %type
- Position: %idx_d
- Value: %obj.type ]
- A30: Array Push [
- Variable Array: %data
- Position: %idx_d
- Value: %obj.result.name ]
- <Uptime>
- A31: Else
- If [ %obj.type ~ Uptime ]
- A32: Variable Add [
- Name: %idx_d
- Value: 1
- Wrap Around: 0 ]
- A33: Array Push [
- Variable Array: %type
- Position: %idx_d
- Value: %obj.type ]
- <Convert uptime to seconds>
- A34: Variable Set [
- Name: %sec
- To: %obj.result.uptime / 1000
- Do Maths: On
- Max Rounding Digits: 0
- Structure Output (JSON, etc): On ]
- <Display uptime seconds in <b>days:hours:minutes:seconds</b> format>
- A35: Perform Task [
- Name: Seconds to 00:00:00:00
- Priority: %priority
- Parameter 1 (%par1): %sec
- Return Value Variable: %ret
- Structure Output (JSON, etc): On ]
- A36: Array Push [
- Variable Array: %data
- Position: %idx_d
- Value: %ret ]
- <Loadavg>
- A37: Else
- If [ %obj.type ~ Loadavg ]
- A38: Variable Add [
- Name: %idx_d
- Value: 1
- Wrap Around: 0 ]
- A39: Array Push [
- Variable Array: %type
- Position: %idx_d
- Value: %obj.type ]
- A40: Variable Set [
- Name: %avg1
- To: %obj.result(1)
- Do Maths: On
- Max Rounding Digits: 2
- Structure Output (JSON, etc): On ]
- A41: Variable Set [
- Name: %avg2
- To: %obj.result(2)
- Do Maths: On
- Max Rounding Digits: 2
- Structure Output (JSON, etc): On ]
- A42: Variable Set [
- Name: %avg3
- To: %obj.result(3)
- Do Maths: On
- Max Rounding Digits: 2
- Structure Output (JSON, etc): On ]
- A43: Array Push [
- Variable Array: %data
- Position: %idx_d
- Value: %avg1 %avg2 %avg3 ]
- <Processes>
- A44: Else
- If [ %obj.type ~ Processes ]
- A45: Variable Add [
- Name: %idx_d
- Value: 1
- Wrap Around: 0 ]
- A46: Array Push [
- Variable Array: %type
- Position: %idx_d
- Value: %obj.type ]
- A47: Array Push [
- Variable Array: %data
- Position: %idx_d
- Value: %obj.result ]
- <Packages>
- A48: Else
- If [ %obj.type ~ Packages ]
- A49: Variable Add [
- Name: %idx_d
- Value: 1
- Wrap Around: 0 ]
- A50: Array Push [
- Variable Array: %type
- Position: %idx_d
- Value: %obj.type ]
- A51: Array Push [
- Variable Array: %data
- Position: %idx_d
- Value: %obj.result.dpkg ]
- <Shell>
- A52: Else
- If [ %obj.type ~ Shell ]
- A53: Variable Add [
- Name: %idx_d
- Value: 1
- Wrap Around: 0 ]
- A54: Array Push [
- Variable Array: %type
- Position: %idx_d
- Value: %obj.type ]
- A55: Array Push [
- Variable Array: %data
- Position: %idx_d
- Value: %obj.result.exeName %obj.result.version ]
- <WM>
- A56: Else
- If [ %obj.type ~ WM ]
- A57: Variable Add [
- Name: %idx_d
- Value: 1
- Wrap Around: 0 ]
- A58: Array Push [
- Variable Array: %type
- Position: %idx_d
- Value: %obj.type ]
- A59: Array Push [
- Variable Array: %data
- Position: %idx_d
- Value: %obj.result.processName ]
- <Terminal>
- A60: Else
- If [ %obj.type ~ Terminal ]
- A61: Variable Add [
- Name: %idx_d
- Value: 1
- Wrap Around: 0 ]
- A62: Array Push [
- Variable Array: %type
- Position: %idx_d
- Value: %obj.type ]
- A63: Array Push [
- Variable Array: %data
- Position: %idx_d
- Value: %obj.result.prettyName %obj.result.version ]
- <CPU>
- A64: Else
- If [ %obj.type ~ CPU ]
- A65: Variable Add [
- Name: %idx_d
- Value: 1
- Wrap Around: 0 ]
- A66: Array Push [
- Variable Array: %type
- Position: %idx_d
- Value: %obj.type ]
- A67: Array Push [
- Variable Array: %data
- Position: %idx_d
- Value: %obj.result.packages x %obj.result.cpu (%obj.result.cores.online) @ %obj.result.frequency.max ]
- <GPU>
- A68: Else
- If [ %obj.type ~ GPU ]
- A69: Variable Add [
- Name: %idx_d
- Value: 1
- Wrap Around: 0 ]
- A70: Array Push [
- Variable Array: %type
- Position: %idx_d
- Value: %obj.type ]
- A71: Array Push [
- Variable Array: %data
- Position: %idx_d
- Value: %obj.result.name [%obj.result.type] ]
- <Memory>
- A72: Else
- If [ %obj.type ~ Memory ]
- A73: Variable Add [
- Name: %idx_d
- Value: 1
- Wrap Around: 0 ]
- A74: Array Push [
- Variable Array: %type
- Position: %idx_d
- Value: %obj.type ]
- A75: Variable Convert [
- Name: %obj.result.used
- Function: Bytes to Gigabytes
- Store Result In: %used
- Mode: Default ]
- A76: Variable Convert [
- Name: %obj.result.total
- Function: Bytes to Gigabytes
- Store Result In: %total
- Mode: Default ]
- A77: Array Push [
- Variable Array: %data
- Position: %idx_d
- Value: %used GiB / %total GiB ]
- <Swap>
- A78: Else
- If [ %obj.type ~ Swap ]
- A79: Variable Add [
- Name: %idx_d
- Value: 1
- Wrap Around: 0 ]
- A80: Array Push [
- Variable Array: %type
- Position: %idx_d
- Value: %obj.type ]
- A81: Variable Convert [
- Name: %obj.result.used
- Function: Bytes to Gigabytes
- Store Result In: %used
- Mode: Default ]
- A82: Variable Convert [
- Name: %obj.result.total
- Function: Bytes to Gigabytes
- Store Result In: %total
- Mode: Default ]
- A83: Array Push [
- Variable Array: %data
- Position: %idx_d
- Value: %used GiB / %total GiB ]
- <Disk>
- A84: Else
- If [ %obj.type ~ Disk ]
- A85: Variable Set [
- Name: %disks
- To: %obj.result(#)
- Structure Output (JSON, etc): On ]
- A86: For [
- Variable: %disk
- Items: %obj.result()
- Structure Output (JSON, etc): On ]
- A87: Write File [
- File: Documents/ff.parse.txt
- Text: %disk.mountpoint %disk.bytes.free %disk.bytes.total
- Append: On
- Add Newline: On ]
- A88: If [ %disk.mountpoint eq / | %disk.mountpoint ~R /mnt/media_rw/* | %disk.mountpoint ~R /storage/emulated ]
- A89: Variable Convert [
- Name: %disk.bytes.used
- Function: Bytes to Gigabytes
- Store Result In: %used
- Mode: Default ]
- A90: Variable Convert [
- Name: %disk.bytes.total
- Function: Bytes to Gigabytes
- Store Result In: %total
- Mode: Default ]
- A91: Variable Add [
- Name: %idx_d
- Value: 1
- Wrap Around: 0 ]
- A92: Array Push [
- Variable Array: %type
- Position: %idx_d
- Value: %obj.type (%disk.mountpoint) ]
- A93: Array Push [
- Variable Array: %data
- Position: %idx_d
- Value: %used GiB / %total GiB ]
- A94: End If
- A95: End For
- <Battery>
- A96: Else
- If [ %obj.type ~ Battery ]
- A97: Variable Add [
- Name: %idx_d
- Value: 1
- Wrap Around: 0 ]
- A98: Array Push [
- Variable Array: %type
- Position: %idx_d
- Value: %obj.type ]
- A99: Array Push [
- Variable Array: %data
- Position: %idx_d
- Value: %obj.result.capacity% [%obj.result.status] ]
- <PublicIp>
- A100: Else
- If [ %obj.type ~ PublicIp ]
- A101: Variable Add [
- Name: %idx_d
- Value: 1
- Wrap Around: 0 ]
- A102: Array Push [
- Variable Array: %type
- Position: %idx_d
- Value: %obj.type ]
- A103: Array Push [
- Variable Array: %data
- Position: %idx_d
- Value: %obj.result.ip (%obj.result.location) ]
- <LocalIp>
- A104: Else
- If [ %obj.type ~ LocalIp ]
- A105: For [
- Variable: %ips
- Items: %obj.result()
- Structure Output (JSON, etc): On ]
- A106: Variable Add [
- Name: %idx_d
- Value: 1
- Wrap Around: 0 ]
- A107: Array Push [
- Variable Array: %type
- Position: %idx_d
- Value: %obj.type (%ips.name) ]
- A108: Array Push [
- Variable Array: %data
- Position: %idx_d
- Value: %ips.ipv4 ]
- A109: End For
- <DNS>
- A110: Else
- If [ %obj.type ~ DNS ]
- A111: Variable Add [
- Name: %idx_d
- Value: 1
- Wrap Around: 0 ]
- A112: Array Push [
- Variable Array: %type
- Position: %idx_d
- Value: %obj.type ]
- A113: Array Push [
- Variable Array: %data
- Position: %idx_d
- Value: %obj.result(1) %obj.result(2) ]
- <Wifi>
- A114: Else
- If [ %obj.type ~ Wifi ]
- A115: Variable Add [
- Name: %idx_d
- Value: 1
- Wrap Around: 0 ]
- A116: Array Push [
- Variable Array: %type
- Position: %idx_d
- Value: %obj.type ]
- A117: Variable Set [
- Name: %freq
- To: %obj.result.conn.frequency / 1000
- Do Maths: On
- Max Rounding Digits: 1
- Structure Output (JSON, etc): On ]
- A118: Array Push [
- Variable Array: %data
- Position: %idx_d
- Value: %obj.result.conn.ssid - %freq GHz ]
- <DateTime>
- A119: Else
- If [ %obj.type ~ DateTime ]
- A120: Variable Add [
- Name: %idx_d
- Value: 1
- Wrap Around: 0 ]
- A121: Array Push [
- Variable Array: %type
- Position: %idx_d
- Value: %obj.type ]
- A122: Array Push [
- Variable Array: %data
- Position: %idx_d
- Value: %obj.result ]
- <Locale>
- A123: Else
- If [ %obj.type ~ Locale ]
- A124: Variable Add [
- Name: %idx_d
- Value: 1
- Wrap Around: 0 ]
- A125: Array Push [
- Variable Array: %type
- Position: %idx_d
- Value: %obj.type ]
- A126: Array Push [
- Variable Array: %data
- Position: %idx_d
- Value: %obj.result ]
- <Vulkan>
- A127: Else
- If [ %obj.type ~ Vulkan ]
- A128: Variable Add [
- Name: %idx_d
- Value: 1
- Wrap Around: 0 ]
- A129: Array Push [
- Variable Array: %type
- Position: %idx_d
- Value: %obj.type ]
- A130: Variable Set [
- Name: %driver
- To: %obj.result.driver
- Structure Output (JSON, etc): On ]
- A131: Variable Split [
- Name: %driver
- Splitter: [ ]
- A132: Array Push [
- Variable Array: %data
- Position: %idx_d
- Value: %obj.result.apiVersion - %driver1 ]
- <OpenGL>
- A133: Else
- If [ %obj.type ~ OpenGL ]
- A134: Variable Add [
- Name: %idx_d
- Value: 1
- Wrap Around: 0 ]
- A135: Array Push [
- Variable Array: %type
- Position: %idx_d
- Value: %obj.type ]
- A136: Array Push [
- Variable Array: %data
- Position: %idx_d
- Value: %obj.result.slv ]
- <Camera>
- A137: Else
- If [ %obj.type ~ Camera ]
- A138: Variable Set [
- Name: %idx_c
- To: 0
- Structure Output (JSON, etc): On ]
- A139: For [
- Variable: %cam
- Items: %obj.result()
- Structure Output (JSON, etc): On ]
- A140: Variable Add [
- Name: %idx_d
- Value: 1
- Wrap Around: 0 ]
- A141: Variable Add [
- Name: %idx_c
- Value: 1
- Wrap Around: 0 ]
- A142: Array Push [
- Variable Array: %type
- Position: %idx_d
- Value: %obj.type %idx_c ]
- A143: Array Push [
- Variable Array: %data
- Position: %idx_d
- Value: %cam.name (%cam.width x %cam.height px) ]
- A144: End For
- <Weather>
- A145: Else
- If [ %obj.type ~ Weather ]
- A146: Variable Add [
- Name: %idx_d
- Value: 1
- Wrap Around: 0 ]
- A147: Array Push [
- Variable Array: %type
- Position: %idx_d
- Value: %obj.type ]
- A148: Array Push [
- Variable Array: %data
- Position: %idx_d
- Value: %obj.result ]
- <Version>
- A149: Else
- If [ %obj.type ~ Version ]
- A150: Variable Add [
- Name: %idx_d
- Value: 1
- Wrap Around: 0 ]
- A151: Array Push [
- Variable Array: %type
- Position: %idx_d
- Value: %obj.type ]
- A152: Array Push [
- Variable Array: %data
- Position: %idx_d
- Value: %obj.result.projectName %obj.result.version ]
- A153: End If
- A154: End If
- A155: End For
- A156: Multiple Variables Set [
- Names: %type_color,%data_color,%txt_bg_color,%bg_color
- Variable Names Splitter: ,
- Values: #FF10C610,#FFFFFFFF,#00000000,#88000000
- Values Splitter: ,
- Structure Output (JSON, etc): On ]
- A157: Variable Set [
- Name: %size
- To: 14
- Structure Output (JSON, etc): On ]
- A158: Variable Set [
- Name: %pad_top
- To: 15
- Structure Output (JSON, etc): On ]
- A159: Variable Set [
- Name: %pad_left
- To: 25
- Structure Output (JSON, etc): On ]
- A160: Variable Set [
- Name: %wjson_start
- To: {
- "scrolling": true,
- "children": [
- Structure Output (JSON, etc): On ]
- A161: Variable Set [
- Name: %wjson_a
- To:
- {
- "children": [
- {
- "color": "%type_color",
- "fontFamily": "Monospace",
- "text": "
- Structure Output (JSON, etc): On ]
- A162: Variable Set [
- Name: %wjson_b
- To: ",
- "textSize": "%size",
- "padding": {
- "start": "%pad_left"
- },
- "type": "Text"
- },
- {
- "color": "%data_color",
- "fontFamily": "Monospace",
- "text": ":
- Structure Output (JSON, etc): On ]
- A163: Variable Set [
- Name: %wjson_c
- To: ",
- "textSize": "%size",
- "type": "Text"
- }
- ],
- "horizontalAlignment": "Start",
- "backgroundColor": "%txt_bg_color",
- "type": "Row"
- }
- Structure Output (JSON, etc): On ]
- A164: Variable Set [
- Name: %wjson_end
- To:
- ],
- "horizontalAlignment": "Start",
- "verticalAlignment": "Center",
- "backgroundColor": "%bg_color",
- "fillMaxSize": true,
- "padding": {
- "top": "%pad_top"
- },
- "type": "Column",
- "useMaterialYouColors": false
- }
- Structure Output (JSON, etc): On ]
- A165: Variable Set [
- Name: %items
- To: %type(#)
- Structure Output (JSON, etc): On ]
- A166: Variable Set [
- Name: %widget_json
- To: %wjson_start
- Structure Output (JSON, etc): On ]
- A167: For [
- Variable: %idx
- Items: 1:%items
- Structure Output (JSON, etc): On ]
- A168: Variable Set [
- Name: %widget_json
- To: %wjson_a%type(%idx)%wjson_b%data(%idx)%wjson_c
- Append: On
- Structure Output (JSON, etc): On ]
- A169: Variable Set [
- Name: %widget_json
- To: ,
- Append: On
- Structure Output (JSON, etc): On ]
- If [ %idx < %items ]
- A170: End For
- A171: Variable Set [
- Name: %widget_json
- To: %wjson_end
- Append: On
- Structure Output (JSON, etc): On ]
- A172: Write File [
- File: Documents/fastfetchwidget.loop.json
- Text: %widget_json
- Add Newline: On ]
- A173: Widget v2 [
- Widget Name: Fastfetch
- Layout: Custom
- Custom Layout: %widget_json
- Material You Colors: On
- Ask To Add If Not Present: On ]
- A174: Flash [
- Text: Finished
- Continue Task Immediately: On
- Dismiss On Click: On ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement