Skip to content

Commit ba00759

Browse files
authored
chore(v5): rename PiOSK to XiOSK (#149)
* rename system services * refactor(scripts): rename PiOSK to XiOSK * refactor(dashboard): rename PiOSK to XiOSK in dashboard files * refactor(workflow): rename binary and package in the build and release workflow * refactor(services): rename paths in services to XiOSK * rename: update root level files- readme, gitignore
1 parent 8bc675e commit ba00759

File tree

18 files changed

+113
-113
lines changed

18 files changed

+113
-113
lines changed

.github/workflows/build-release.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build and Release PiOSK Package
1+
name: Build and Release XiOSK Package
22

33
on:
44
push:
@@ -35,7 +35,7 @@ jobs:
3535
--allow-run \
3636
--allow-env \
3737
--target ${{ matrix.arch }}-unknown-linux-gnu \
38-
--output piosk \
38+
--output xiosk \
3939
dashboard/index.ts
4040
4141
- name: Assemble Release Package
@@ -47,17 +47,17 @@ jobs:
4747
cp -r dashboard/ scripts/ services/ config.json.sample staging/
4848
4949
# 3. Move the compiled binary into the 'dashboard' subdirectory inside staging.
50-
mv piosk staging/dashboard/
50+
mv xiosk staging/dashboard/
5151
5252
# 4. Create the final tarball from the contents of the staging directory.
5353
# The -C flag ensures the paths inside the tarball are clean (no leading 'staging/').
54-
tar -czf piosk-linux-${{ matrix.arch }}.tar.gz -C staging .
54+
tar -czf xiosk-linux-${{ matrix.arch }}.tar.gz -C staging .
5555
5656
- name: Upload Package as Artifact
5757
uses: actions/upload-artifact@v4
5858
with:
59-
name: piosk-package-${{ matrix.arch }}
60-
path: piosk-linux-${{ matrix.arch }}.tar.gz
59+
name: xiosk-package-${{ matrix.arch }}
60+
path: xiosk-linux-${{ matrix.arch }}.tar.gz
6161
if-no-files-found: error # Fail if the package wasn't created
6262

6363
release:

.gitignore

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ node_modules/
33
package-lock.json
44

55
# Deno compiled binaries
6-
piosk
7-
piosk.exe
8-
piosk-*
6+
xiosk
7+
xiosk.exe
8+
xiosk-*
99

1010
# Test files
1111
test.sh

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
![PiOSK Banner](www/src/assets/banner.png)
2-
**PiOSK - One-shot set up Raspberry Pi in kiosk mode as a webpage shuffler, with a web interface for management.**
1+
![XiOSK Banner](www/src/assets/banner.png)
2+
**XiOSK - One-shot set up Raspberry Pi in kiosk mode as a webpage shuffler, with a web interface for management.**
33

44
### Links
5-
- [Docs](https://code.debs.io/piosk/docs/)
6-
- [GitHub](https://github.com/debloper/piosk/)
7-
- [Discussion](https://github.com/debloper/piosk/discussions)
5+
- [Docs](https://code.debs.io/xiosk/docs/)
6+
- [GitHub](https://github.com/debloper/xiosk/)
7+
- [Discussion](https://github.com/debloper/xiosk/discussions)
88

99
### Installation
1010
```bash
11-
curl -sSL https://raw.githubusercontent.com/debloper/piosk/v4.0.1/scripts/setup.sh | sudo bash -
11+
curl -sSL https://raw.githubusercontent.com/debloper/xiosk/v4.0.1/scripts/setup.sh | sudo bash -
1212
```
13-
> **Note:** For a detailed installation guide, refer to the official PiOSK [documentation](https://code.debs.io/piosk/docs/).
13+
> **Note:** For a detailed installation guide, refer to the official XiOSK [documentation](https://code.debs.io/xiosk/docs/).
1414
1515
### Developer
1616
```bash
17-
git clone https://github.com/debloper/piosk.git
18-
cd piosk
17+
git clone https://github.com/debloper/xiosk.git
18+
cd xiosk
1919
```
2020

dashboard/deno.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"exports": "./index.ts",
44
"tasks": {
55
"start": "deno run --allow-net --allow-read --allow-write --allow-run --allow-env index.ts",
6-
"compile": "deno compile --allow-net --allow-read --allow-write --allow-run --allow-env --output piosk index.ts"
6+
"compile": "deno compile --allow-net --allow-read --allow-write --allow-run --allow-env --output xiosk index.ts"
77
},
88
"compilerOptions": {
99
"strict": true,

dashboard/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66

77
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
88
<link rel="stylesheet" href="style.css">
9-
<title>PiOSK</title>
9+
<title>XiOSK</title>
1010
</head>
1111
<body>
1212
<nav id="navs" class="navbar bg-body-tertiary py-3">
1313
<div class="container-md">
1414
<div class="row w-100 align-items-center gy-2 mx-0">
1515
<div class="col-12 col-md-auto text-center text-md-start px-0">
16-
<h1 class="my-0">Pi<span class="bg-danger mx-1 px-1 rounded">OSK</span></h1>
16+
<h1 class="my-0">Χi<span class="bg-danger mx-1 px-1 rounded">OSK</span></h1>
1717
</div>
1818
<div class="col-12 col-md px-md-4">
1919
<div class="input-group">
@@ -34,7 +34,7 @@ <h1 class="my-0">Pi<span class="bg-danger mx-1 px-1 rounded">OSK</span></h1>
3434
</div>
3535

3636
<footer id="colophon" class="container-md text-center fs-4 my-5">
37-
<kbd><a class="text-decoration-none" href="https://github.com/debloper/piosk" target="_blank">{}</a></kbd>
37+
<kbd><a class="text-decoration-none" href="https://github.com/debloper/xiosk" target="_blank">{}</a></kbd>
3838
w/
3939
<kbd><a class="text-decoration-none" href="https://youtube.com/@BreakerSpace" target="_blank"><3</a></kbd>
4040
by

dashboard/index.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ async function writeConfig(configData: string): Promise<void> {
1717
}
1818

1919
async function getServiceStatus(): Promise<boolean> {
20-
if(Deno.env.get("PIOSK_TEST_MODE") === "true") return true;
20+
if(Deno.env.get("XIOSK_TEST_MODE") === "true") return true;
2121

2222
try {
2323
const command = new Deno.Command("systemctl", {
24-
args: ["is-active", "piosk-runner.service"]
24+
args: ["is-active", "xiosk-runner.service"]
2525
});
2626

2727
const { code } = await command.output();
@@ -33,9 +33,9 @@ async function getServiceStatus(): Promise<boolean> {
3333
}
3434

3535
async function invokeService(action: "start" | "stop" | "restart"): Promise<void> {
36-
const services = ["piosk-runner.service", "piosk-switcher.service"];
36+
const services = ["xiosk-runner.service", "xiosk-switcher.service"];
3737

38-
if (Deno.env.get("PIOSK_TEST_MODE") === "true") {
38+
if (Deno.env.get("XIOSK_TEST_MODE") === "true") {
3939
console.log(`Test mode: Would ${action.toUpperCase()} services: ${services.join(", ")}`);
4040
return;
4141
}
@@ -168,7 +168,7 @@ async function handler(req: Request): Promise<Response> {
168168
}
169169

170170
const port = parseInt(Deno.env.get("PORT") || "80");
171-
console.log(`PiOSK Deno server starting on port ${port}...`);
171+
console.log(`XiOSK Deno server starting on port ${port}...`);
172172

173173
Deno.serve({ port }, handler);
174174

dashboard/script.js

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
let piosk = {
1+
let xiosk = {
22
addNewUrl() {
33
let newUrl = $('#new-url').val();
44
if (!newUrl) return;
55

66
// Call appendUrl with just the URL, so it uses default settings (10s, 10 cycles)
7-
piosk.appendUrl(newUrl);
7+
xiosk.appendUrl(newUrl);
88
$('#new-url').val('');
99
},
1010

@@ -30,7 +30,7 @@ let piosk = {
3030
if (data && data.urls) {
3131
$.each(data.urls, (index, item) => {
3232
// Pass all the data (url, duration, cycles) to the updated function
33-
piosk.appendUrl(item.url, item.duration, item.cycles);
33+
xiosk.appendUrl(item.url, item.duration, item.cycles);
3434
});
3535
}
3636
},
@@ -68,7 +68,7 @@ let piosk = {
6868
checkStatus() {
6969
$.getJSON('/services/status')
7070
.done((data) => {
71-
piosk.updatePowerBtn(data.running);
71+
xiosk.updatePowerBtn(data.running);
7272
})
7373
.fail(() => {
7474
if (!$('#toggle-kiosk').prop('disabled')) {
@@ -93,14 +93,14 @@ let piosk = {
9393

9494
$(document).ready(() => {
9595
$.getJSON('/config')
96-
.done(piosk.renderPage)
97-
.fail(piosk.showStatus);
96+
.done(xiosk.renderPage)
97+
.fail(xiosk.showStatus);
9898

99-
piosk.checkStatus();
100-
setInterval(piosk.checkStatus, 5000);
99+
xiosk.checkStatus();
100+
setInterval(xiosk.checkStatus, 5000);
101101

102-
$('#add-url').on('click', piosk.addNewUrl);
103-
$('#new-url').on('keyup', (e) => { if (e.key === 'Enter') piosk.addNewUrl(); });
102+
$('#add-url').on('click', xiosk.addNewUrl);
103+
$('#new-url').on('keyup', (e) => { if (e.key === 'Enter') xiosk.addNewUrl(); });
104104

105105
$('#urls').on('click', 'button.btn-close', (e) => {
106106
$(e.target).closest('li.list-group-item').remove();
@@ -109,7 +109,7 @@ $(document).ready(() => {
109109
// MODIFIED: The #execute handler now saves all settings correctly
110110
$('#execute').on('click', function(e) {
111111
const $btn = $(this);
112-
piosk.toggleLoading($btn, true, "Applying...");
112+
xiosk.toggleLoading($btn, true, "Applying...");
113113

114114
let config = {};
115115
config.urls = [];
@@ -132,11 +132,11 @@ $(document).ready(() => {
132132
data: JSON.stringify(config),
133133
contentType: "application/json; charset=utf-8",
134134
success: (data) => {
135-
piosk.showStatus({ status: 200, responseText: data });
135+
xiosk.showStatus({ status: 200, responseText: data });
136136
},
137-
error: piosk.showStatus,
137+
error: xiosk.showStatus,
138138
complete: () => {
139-
piosk.toggleLoading($btn, false);
139+
xiosk.toggleLoading($btn, false);
140140
}
141141
});
142142
});
@@ -148,17 +148,17 @@ $(document).ready(() => {
148148
if(action === 'stop' && !confirm("Stop the Kiosk display?")) return;
149149

150150
const loadText = action === 'start' ? "Starting..." : "Stopping...";
151-
piosk.toggleLoading($btn, true, loadText);
151+
xiosk.toggleLoading($btn, true, loadText);
152152

153153
$.ajax({
154154
url: '/services/' + action,
155155
type: 'POST',
156156
success: (data) => {
157-
piosk.showStatus({ status: 200, responseText: data });
157+
xiosk.showStatus({ status: 200, responseText: data });
158158
},
159-
error: piosk.showStatus,
159+
error: xiosk.showStatus,
160160
complete: () => {
161-
setTimeout(() => { piosk.toggleLoading($btn, false); }, 500);
161+
setTimeout(() => { xiosk.toggleLoading($btn, false); }, 500);
162162
}
163163
});
164164
});

scripts/runtime/runner.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export XDG_RUNTIME_DIR=/run/user/$(id -u)
88
sleep 5
99

1010
# check to ensure URLs are there to load
11-
URLS=$(jq -r '.urls | map(.url) | join(" ")' /opt/piosk/config.json)
11+
URLS=$(jq -r '.urls | map(.url) | join(" ")' /opt/xiosk/config.json)
1212
if [ -z "$URLS" ]; then
1313
echo "No URLs found in config.json. Exiting runner."
1414
exit 0

scripts/runtime/switcher.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

33
# Ensure the script runs from the correct directory, where config.json is located.
4-
cd /opt/piosk
4+
cd /opt/xiosk
55

66
export XDG_RUNTIME_DIR=/run/user/1000
77

@@ -34,7 +34,7 @@ CURRENT_TAB_INDEX=0
3434
echo "Switcher waiting for browser to initialize..."
3535
sleep 15
3636

37-
echo "PiOSK switcher started. Managing $URL_COUNT tabs."
37+
echo "XiOSK switcher started. Managing $URL_COUNT tabs."
3838

3939
# --- Main Loop ---
4040
while true; do

scripts/setup/backup.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ source "$SCRIPT_DIR/common.sh"
66

77
msg "$INFO" "Starting configuration backup..."
88

9-
readonly backup_dir="/opt/piosk-backups"
10-
readonly latest_file="$backup_dir/piosk-latest.config"
9+
readonly backup_dir="/opt/xiosk-backups"
10+
readonly latest_file="$backup_dir/xiosk-latest.config"
1111

12-
if [ ! -f "$PIOSK_CONFIG_FILE" ]; then
13-
msg "$WARNING" "Configuration file not found at '$PIOSK_CONFIG_FILE'. Nothing to back up."
12+
if [ ! -f "$XIOSK_CONFIG_FILE" ]; then
13+
msg "$WARNING" "Configuration file not found at '$XIOSK_CONFIG_FILE'. Nothing to back up."
1414
exit 0
1515
fi
1616

@@ -22,7 +22,7 @@ if [ -f "$latest_file" ]; then
2222
mv "$latest_file" "$backup_dir/$archived_filename"
2323
fi
2424

25-
cp "$PIOSK_CONFIG_FILE" "$latest_file"
25+
cp "$XIOSK_CONFIG_FILE" "$latest_file"
2626
msg "$SUCCESS" "Backup successful! Latest config saved to: $latest_file"
2727

2828
msg "$DEBUG" "Applying retention policy (keeping last 5)..."

0 commit comments

Comments
 (0)