Skip to content

Commit 85eac32

Browse files
committed
move to css based blurring and add some terminal improvements
1 parent 0a8a544 commit 85eac32

15 files changed

Lines changed: 327 additions & 314 deletions

File tree

:path/ls.osl

Lines changed: 48 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,79 @@
11
local targetPath = terminal.pwd
2-
string first = args[1].toStr()
2+
local flags = args.filter(v -> v.startsWith("-"))
3+
local paths = args.filter(v -> !v.startsWith("-"))
34

4-
if !first.startsWith("-") (
5-
targetPath = terminal.resolvePath(args[1])
5+
if paths.len > 0 (
6+
targetPath = terminal.resolvePath(paths[1])
67
)
7-
if !targetPath.endsWith(".folder") (
8-
targetPath ++= ".folder"
8+
9+
local folderPath = targetPath
10+
if folderPath.endsWith(".folder") (
11+
folderPath = folderPath.trim(1, -8)
912
)
1013

11-
file "exists" targetPath
14+
file "exists" folderPath ++ ".folder"
1215
if !exists (
13-
terminal.writeLine("ls: cannot access '" ++ args[1] ++ "': No such file or directory")
16+
local requested = paths.len > 0 ? paths[1] folderPath
17+
terminal.writeLine("ls: cannot access '" ++ requested ++ "': No such file or directory")
1418
return
1519
)
1620

17-
local getAll = args.contains("-a")
21+
local getAll = flags.contains("-a")
22+
local entries = listFiles(folderPath)
23+
array files = []
1824

19-
local files = open(targetPath)
20-
.map(f -> open(f, ["name", "type"]).join(""))
21-
.filter(v -> getAll or v[1] != ":")
25+
for i entries.len (
26+
local name = entries[i]
27+
if getAll or name[1] != ":" (
28+
void files.append(name)
29+
)
30+
)
2231

23-
local maxLen = files
24-
.map(v -> (v.endsWith(".folder") ? (v.len - 8) v.len) + 4)
25-
.max()
32+
if files.len == 0 (
33+
return
34+
)
35+
36+
local maxLen = 0
37+
for i files.len (
38+
local name = files[i]
39+
if name.endsWith(".folder") (
40+
name = name.trim(1, -8) ++ "/"
41+
)
42+
if name.len > maxLen (
43+
maxLen = name.len
44+
)
45+
)
46+
maxLen += 4
2647

2748
local cols = floor((window.width - 30) / 10 / (maxLen + 2))
2849
if cols < 1 (
2950
cols = 1
3051
)
3152

3253
array line = []
33-
local i = 0
34-
void files.map(v -> (
35-
local ov = v
54+
local column = 0
55+
for i files.len (
56+
local name = files[i]
3657
local color = txtc
3758

38-
if ov.endsWith(".folder") (
39-
ov = ov.trim(1, -8) ++ "/"
59+
if name.endsWith(".folder") (
60+
name = name.trim(1, -8) ++ "/"
4061
color = global_accent
4162
)
42-
if ov[1] == ":" (
63+
if name[1] == ":" (
4364
color = "#aaa"
4465
)
4566

46-
local padded = ov.padEnd(" ", maxLen)
47-
void line.append(color, padded)
67+
void line.append(color, name.padEnd(" ", maxLen))
68+
column += 1
4869

49-
i ++
50-
if i % cols == 0 (
70+
if column == cols (
5171
terminal.writeLine(line)
5272
line = []
73+
column = 0
5374
)
54-
))
75+
)
5576

56-
if i % cols != 0 (
77+
if line.len > 0 (
5778
terminal.writeLine(line)
58-
)
79+
)

:path/osl-tracker.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -155,12 +155,12 @@
155155
"ls.osl": {
156156
"name": "ls.osl",
157157
"firstAdded": "2025-07-20T23:43:22.368Z",
158-
"lastModified": "2026-03-20T18:30:04.165Z",
159-
"changeCount": 13,
160-
"size": 1102,
161-
"hash": "2fa91461f0903023a8ea65240dba461a",
158+
"lastModified": "2026-07-09T11:54:09.000Z",
159+
"changeCount": 15,
160+
"size": 1481,
161+
"hash": "42304b70bf977e138d2f497756136253",
162162
"status": "active",
163-
"lastModifiedUnix": 1774031404165
163+
"lastModifiedUnix": 1783598049000
164164
},
165165
"me.osl": {
166166
"name": "me.osl",
@@ -793,4 +793,4 @@
793793
"totalChanges": 306,
794794
"averageChangesPerScript": 3.92
795795
}
796-
}
796+
}

Modules/glass.osl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ def "frame" "this.left, this.top, this.right, this.bottom, this.contentheight, t
22
frame this.left this.top this.right this.bottom this.contentheight this.id
33
effect "transparency" 50
44
goto frame.x * -1 frame.y * -1
5-
5+
66
image "wallpaper_blur" background_width background_height
77
effect "clear"
88
)

OSL Programs/apps/Dock/Dock.osl

Lines changed: 9 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,6 @@ state = {
3535
}
3636

3737
desktop @= () -> (
38-
local dom = "window.origin.domRender".eval() == true
39-
redraw_all = dom or (cur_frame % 120) == 0 or round(y) != round(dock_y_target)
40-
if redraw_all (
41-
window.callRender()
42-
)
4338
for bg segment_classes.len (
4439
local cur @= segment_classes[bg]
4540
if cur.enabled == false (
@@ -49,14 +44,14 @@ desktop @= () -> (
4944
dock_width += w + 30
5045
cur.width = w
5146
change_x w / 2
52-
square w height 20 0 1
53-
run[bg] = dom or cur.conditions() == true or mouse_touching or bg_redrawn or dock_changed_w or redraw_all
54-
if run[bg] (
55-
square w height 20
56-
)
47+
style {
48+
bgBlur: "5px",
49+
bg: current_colour.trim(1, 7) ++ "99"
50+
}
51+
square w height 20
5752
change_x w / 2 + 30
5853
)
59-
54+
6055
for i segment_classes.len (
6156
local cur @= segment_classes[i]
6257
if cur.enabled == false (
@@ -66,19 +61,8 @@ desktop @= () -> (
6661
c dock_colour
6762
local w2 = w / 2 + 10
6863
local h2 = height / 2 + 10
69-
goto x + (w / 2) y
70-
if run[i] (
71-
frame x_position + w2 y_position + h2 x_position - w2 y_position - h2 (
72-
effect "transparency" 70
73-
goto -frame.x -frame.y
74-
75-
image "wallpaper_blur" background_width background_height
76-
effect "clear"
77-
)
78-
goto x y
79-
void cur.main()
80-
run[i] = false
81-
)
64+
goto x y
65+
void cur.main()
8266
x += w + 30
8367
)
8468
)
@@ -231,8 +215,6 @@ file_loc = user_folder ++ "/Dock"
231215
network "update" "hostOS" system_os
232216
network "update" "timezone" timezone
233217

234-
run = (1 to segment_classes.len).fill(false)
235-
236218
cur_frame = 0
237219

238220
previous_wallpaper = background_url
@@ -313,4 +295,4 @@ if open_path != null and !mouse_down (
313295
window.create(open_path)
314296
)
315297
open_path = null
316-
)
298+
)

OSL Programs/apps/System/.Install_system.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"path": "Origin/(A) System/Docks",
55
"name": "Dock.osl",
66
"icon": "c #111 w 10 square 0 0 5 5",
7-
"version": "6.2"
7+
"version": 6.4
88
},
99
{
1010
"url": "https://origin.mistium.com/OSL%20Programs/apps/System/Time_Info.osl",
@@ -137,7 +137,7 @@
137137
"path": "Origin/(A) System/System Apps",
138138
"name": "Terminal.osl",
139139
"icon": "c #1c452a w 10 square 0 0 5 5 c #111 w 8 square 0 0 5 5 dot 0 0 c #1b8f44 w 1.5 line 0 -4 4 -4 line -4 3 -1 0 cont -4 -3",
140-
"version": "7.0"
140+
"version": 7.3
141141
},
142142
{
143143
"url": "https://origin.mistium.com/OSL%20Programs/apps/System/Quick_Settings.osl",

OSL Programs/apps/System/Contacts.osl

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ if typeof(pinned_friends) != "array" (
106106
def organiseFriends() (
107107
array friends @= user["sys.friends"]
108108
.filter(v -> !pinned_friends.contains(v))
109-
109+
110110
return pinned_friends ++ friends
111111
)
112112

@@ -139,7 +139,9 @@ if page != "Profile" (
139139
online @= network.online ?? []
140140
)
141141

142-
glass:frame window.left window.top window.left + 305 window.bottom; frame "clear"
142+
window.setGlass(100, "15px")
143+
goto 210 0
144+
square window.width - 200 window.height + 10 10 : c#window_colour
143145

144146
loc 2 2 10 -20
145147
text page 10 : c#txtc
@@ -219,7 +221,7 @@ if page != "Profile" (
219221
)
220222
)
221223
icon "close" 0.6 : c#txtc
222-
224+
223225
square 25 25 10 0 1 : chx#-40
224226
if mouse_touching (
225227
cursor "pointer"
@@ -286,7 +288,7 @@ frame window.left + (page == "Profile" ? 0 305) window.top - 50 window.right win
286288
loc 9999 2 0 -65
287289
square w 30 12 : c#prim
288290
input w - 10 30 "username" "Enter Username" txtc
289-
291+
290292
loc 9999 2 0 -120
291293
square w 30 12 : c#prim hover_c#seco
292294
if onclick (
@@ -305,9 +307,9 @@ frame window.left + (page == "Profile" ? 0 305) window.top - 50 window.right win
305307
loaded = false
306308
user_data[selected_user] = ("https://api.rotur.dev/profile?include_posts=0&name=" ++ selected_user).getAsync()
307309
)
308-
310+
309311
local cur = user_data[selected_user]
310-
312+
311313
string banner_url = "https://avatars.rotur.dev/.banners/" ++ selected_user
312314
if !banner_url.imageinfo("loaded") (
313315
image banner_url 0
@@ -323,7 +325,7 @@ frame window.left + (page == "Profile" ? 0 305) window.top - 50 window.right win
323325
page_len += 120
324326
)
325327
image "https://avatars.rotur.dev/" ++ selected_user ++ "?radius=30px" 100
326-
328+
327329
text selected_user 10 : c#txtc chx#60 chy#-20
328330
change_x 40
329331
if loaded (

OSL Programs/apps/System/OMail.osl

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,7 @@ goto window.right - (w / 2) - 20 y
7878
square w h 25 : c#seco
7979
square w h 20 : c#prim
8080

81-
glass:frame window.left window.top window.right window.bottom
82-
frame "clear"
81+
window.setGlass(100, "15px")
8382

8483
loc 2 2 100 -70
8584
for i filters.len (
@@ -124,7 +123,7 @@ frame x - 130 window.top - 60 x + 130 window.bottom + 15 cur_mail.len * 85 "cach
124123
)
125124
local r_from = cur.from
126125
local r_to = cur.recipient
127-
126+
128127
all_mail[cur.index].external = r_to == username ? r_from r_to
129128
set_x frame.left + 27 : chy#15
130129

@@ -157,7 +156,7 @@ frame l window.top - 60 x + (w / 2) window.bottom + 15 0 "cache@contents" (
157156
change_x -25
158157
input frame.width - 80 25 "recipient" "Type the username of the person to send this too"
159158
inputs.recipient = inputs.recipient.trim(0,20)
160-
159+
161160
goto frame.right - 25 frame.top - 28
162161
icon "send" 0.8 : c#txtc
163162
if mouse_touching (
@@ -172,12 +171,12 @@ frame l window.top - 60 x + (w / 2) window.bottom + 15 0 "cache@contents" (
172171
say "Sending"
173172
)
174173
)
175-
174+
176175
goto 0 frame.top - 72
177176
square frame.width - 20 22 10 : c#prim
178177
input frame.width - 30 25 "title" "Type the title of the omail here"
179178
inputs.title = inputs.title.trim(0,50)
180-
179+
181180
goto 0 -43
182181
c prim
183182
textbox frame.width - 20 frame.height - 120 "send_body" 10 {
@@ -191,13 +190,13 @@ frame l window.top - 60 x + (w / 2) window.bottom + 15 0 "cache@contents" (
191190
image "https://avatars.rotur.dev/" ++ cur.external ++ "?radius=30" 40 40
192191
)
193192
text cur.external 10 : c#txtc chx#30
194-
193+
195194
local msg = cur.from == username ? "Sent" "Recieved"
196195
loc -2 2 -20 - (msg.len * 10) -20
197196
text msg 10
198-
197+
199198
inputs.body = cur.body.wrapText(frame.width / 10 - 3).split("\n")
200-
199+
201200
goto 0 -10
202201
c prim
203202
textbox frame.width frame.height - 100 "body" 10 {
@@ -244,4 +243,4 @@ if onclick (
244243
current_rmail = 0
245244
)
246245

247-
import "win-buttons"
246+
import "win-buttons"

0 commit comments

Comments
 (0)