diff --git a/Dockerfile b/Dockerfile
index 4e89594..2295b2f 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -24,6 +24,8 @@ RUN \
librsvg2-common \
notification-daemon \
python3-xdg \
+ # dark theme
+ gnome-themes-extra \
# other
wget \
socat \
@@ -54,7 +56,6 @@ RUN \
mv /tmp/yq /usr/local/bin/yq && chmod +x /usr/local/bin/yq && \
echo "**** xfce tweaks ****" && \
rm -f /etc/xdg/autostart/xscreensaver.desktop && \
- sed -i 's|| \n yes\n \n|' /etc/xdg/openbox/rc.xml && \
# StartOS branding
echo "Starting Sparrow on Webtop for StartOS..." > /etc/s6-overlay/s6-rc.d/init-adduser/branding; sed -i '/run_branding() {/,/}/d' /docker-mods && \
# cleanup and remove some unneeded large binaries
@@ -112,7 +113,10 @@ ENV \
# base container starts docker by default, but we removed it, so set to false
START_DOCKER=false \
PULSE_RUNTIME_PATH=/defaults \
- NVIDIA_DRIVER_CAPABILITIES=all
+ NVIDIA_DRIVER_CAPABILITIES=all \
+ # set dark theme
+ GTK_THEME=Adwaita:dark \
+ GTK2_RC_FILES=/usr/share/themes/Adwaita-dark/gtk-2.0/gtkrc
# add local files
COPY /root /
diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64
index 6f71152..a1021c5 100644
--- a/Dockerfile.aarch64
+++ b/Dockerfile.aarch64
@@ -24,6 +24,8 @@ RUN \
librsvg2-common \
notification-daemon \
python3-xdg \
+ # dark theme
+ gnome-themes-extra \
# other
wget \
socat \
@@ -54,7 +56,6 @@ RUN \
mv /tmp/yq /usr/local/bin/yq && chmod +x /usr/local/bin/yq && \
echo "**** xfce tweaks ****" && \
rm -f /etc/xdg/autostart/xscreensaver.desktop && \
- sed -i 's|| \n yes\n \n|' /etc/xdg/openbox/rc.xml && \
# StartOS branding
echo "Starting Sparrow on Webtop for StartOS..." > /etc/s6-overlay/s6-rc.d/init-adduser/branding; sed -i '/run_branding() {/,/}/d' /docker-mods && \
# cleanup and remove some unneeded large binaries
@@ -112,7 +113,10 @@ ENV \
# base container starts docker by default, but we removed it, so set to false
START_DOCKER=false \
PULSE_RUNTIME_PATH=/defaults \
- NVIDIA_DRIVER_CAPABILITIES=all
+ NVIDIA_DRIVER_CAPABILITIES=all \
+ # set dark theme
+ GTK_THEME=Adwaita:dark \
+ GTK2_RC_FILES=/usr/share/themes/Adwaita-dark/gtk-2.0/gtkrc
# add local files
COPY /root /
diff --git a/docker_entrypoint.sh b/docker_entrypoint.sh
index 4597753..fc0e2e7 100755
--- a/docker_entrypoint.sh
+++ b/docker_entrypoint.sh
@@ -28,54 +28,71 @@ data:
masked: true
EOF
+# Copy default files
+if [ ! -f /config/.config/openbox/rc.xml ]; then
+ mkdir -p /config/.config/openbox
+ cp /defaults/rc.xml /config/.config/openbox/rc.xml
+ chown -R $PUID:$PGID /config/.config/openbox
+fi
+
if [ ! -f /config/.sparrow/config ]; then
echo "No Sparrow config file found, creating default"
mkdir -p /config/.sparrow
cp /defaults/.sparrow/config /config/.sparrow/config
- chown -R 1000:1000 /config/.sparrow
+ chown -R $PUID:$PGID /config/.sparrow
fi
-case "$(yq e '.server.type' /root/data/start9/config.yaml)" in
-"bitcoind")
- echo "Configuring Sparrow for Bitcoin Core"
- export BITCOIND_USER=$(yq e '.server.user' /root/data/start9/config.yaml)
- export BITCOIND_PASS=$(yq e '.server.password' /root/data/start9/config.yaml)
- yq e -i '
- .serverType = "BITCOIN_CORE" |
- .coreServer = "http://127.0.0.1:8332" |
- .coreAuthType = "USERPASS" |
- .coreAuth = strenv(BITCOIND_USER) + ":" + strenv(BITCOIND_PASS)' -o=json /config/.sparrow/config
- ;;
-"electrs")
- echo "Configuring Sparrow for Electrs"
- yq e -i '
- .serverType = "ELECTRUM_SERVER" |
- .coreServer = "tcp://127.0.0.1:50001"' -o=json /config/.sparrow/config
- ;;
-"public")
- echo "Configuring Sparrow for Public electrum server"
- yq e -i '.serverType = "PUBLIC_ELECTRUM_SERVER"' -o=json /config/.sparrow/config
- ;;
-*)
- echo "Custom server selected, not configuring Sparrow"
- ;;
-esac
+# Manage Sparrow settings?
+if [ $(yq e '.sparrow.managesettings' /root/data/start9/config.yaml) = "true" ]; then
+ # private bitcoin/electrum server
+ case "$(yq e '.sparrow.server.type' /root/data/start9/config.yaml)" in
+ "bitcoind")
+ echo "Configuring Sparrow for Bitcoin Core"
+ export BITCOIND_USER=$(yq e '.sparrow.server.user' /root/data/start9/config.yaml)
+ export BITCOIND_PASS=$(yq e '.sparrow.server.password' /root/data/start9/config.yaml)
+ yq e -i '
+ .serverType = "BITCOIN_CORE" |
+ .coreServer = "http://127.0.0.1:8332" |
+ .coreAuthType = "USERPASS" |
+ .coreAuth = strenv(BITCOIND_USER) + ":" + strenv(BITCOIND_PASS)' -o=json /config/.sparrow/config
+ ;;
+ "electrs")
+ echo "Configuring Sparrow for Electrs"
+ yq e -i '
+ .serverType = "ELECTRUM_SERVER" |
+ .coreServer = "tcp://127.0.0.1:50001"' -o=json /config/.sparrow/config
+ ;;
+ "public")
+ echo "Configuring Sparrow for Public electrum server"
+ yq e -i '.serverType = "PUBLIC_ELECTRUM_SERVER"' -o=json /config/.sparrow/config
+ ;;
+ *)
+ echo "Unknown server selected, not configuring Sparrow"
+ ;;
+ esac
+
+ # proxy
+ case "$(yq e '.sparrow.proxy.type' /root/data/start9/config.yaml)" in
+ "tor")
+ echo "Configuring Sparrow for Tor"
+ export EMBASSY_IP=$(ip -4 route list match 0/0 | awk '{print $3}')
+ yq e -i '
+ .useProxy = true |
+ .proxyServer = strenv(EMBASSY_IP) + ":9050"' -o=json /config/.sparrow/config
+ ;;
+ "none")
+ echo "Configuring Sparrow for 'no proxy'"
+ yq e -i '.useProxy = false' -o=json /config/.sparrow/config
+ ;;
+ *)
+ echo "Unknown proxy selected, not configuring Sparrow"
+ ;;
+ esac
+fi
-case "$(yq e '.proxy.type' /root/data/start9/config.yaml)" in
-"tor")
- echo "Configuring Sparrow for Tor"
- export EMBASSY_IP=$(ip -4 route list match 0/0 | awk '{print $3}')
- yq e -i '
- .useProxy = true |
- .proxyServer = strenv(EMBASSY_IP) + ":9050"' -o=json /config/.sparrow/config
- ;;
-"none")
- echo "Configuring Sparrow for 'no proxy'"
- yq e -i '.useProxy = false' -o=json /config/.sparrow/config
- ;;
-*)
- echo "Custom proxy selected, not configuring Sparrow"
- ;;
-esac
+# setup a proxy on localhost, Sparrow will not use Tor for local addresses
+# this means we can connect straight to bitcoind/electrs and use Tor for everything else (whirlpool)
+/usr/bin/socat tcp-l:8332,fork,reuseaddr,su=nobody,bind=127.0.0.1 tcp:bitcoind.embassy:8332 &
+/usr/bin/socat tcp-l:50001,fork,reuseaddr,su=nobody,bind=127.0.0.1 tcp:electrs.embassy:50001 &
exec /init
diff --git a/manifest.yaml b/manifest.yaml
index a22b10a..ef384c5 100644
--- a/manifest.yaml
+++ b/manifest.yaml
@@ -1,6 +1,6 @@
id: webtop-sparrow
title: "Sparrow"
-version: 1.8.2.5
+version: 1.8.2.1
release-notes: |
Sparrow 1.8.2 on Webtop for StartOS
license: GPLv3
@@ -27,7 +27,7 @@ main:
mounts:
main: /root/data
userdir: /config
- gpu-acceleration: false
+ gpu-acceleration: true
hardware-requirements:
arch:
- x86_64
diff --git a/root/defaults/autostart b/root/defaults/autostart
index 4dc6c52..e8085ca 100755
--- a/root/defaults/autostart
+++ b/root/defaults/autostart
@@ -1,5 +1,3 @@
-#!/bin/bash
-
# default file copies first run
if [ ! -f $HOME/.config/xfce4/xfconf/xfce-perchannel-xml/thunar.xml ]; then
mkdir -p $HOME/.config/xfce4/xfconf/xfce-perchannel-xml
@@ -9,9 +7,4 @@ fi
# open files and directories with thunar (file manager)
xdg-mime default thunar.desktop inode/directory
-# setup a proxy on localhost, Sparrow will not use Tor for local addresses
-# this means we can connect straight to bitcoind/electrs and use Tor for everything else (whirlpool)
-/usr/bin/socat tcp-l:8332,fork,reuseaddr,bind=127.0.0.1 tcp:bitcoind.embassy:8332 &
-/usr/bin/socat tcp-l:50001,fork,reuseaddr,bind=127.0.0.1 tcp:electrs.embassy:50001 &
-
/opt/sparrow/bin/Sparrow &
diff --git a/root/defaults/rc.xml b/root/defaults/rc.xml
new file mode 100644
index 0000000..f6c78f6
--- /dev/null
+++ b/root/defaults/rc.xml
@@ -0,0 +1,796 @@
+
+
+
+ 10
+ 20
+
+
+ yes
+
+ no
+
+ yes
+
+ no
+
+ 200
+
+ no
+
+
+
+ Smart
+
+ yes
+
+ Primary
+
+ 1
+
+
+
+ Nightmare
+ NLMC
+
+ yes
+ yes
+
+ sans
+ 9
+
+ Bold
+
+ Normal
+
+
+
+ sans
+ 9
+
+ Bold
+
+ Normal
+
+
+
+ sans
+ 11
+
+ Normal
+
+ Normal
+
+
+
+ sans
+ 11
+
+ Normal
+
+ Normal
+
+
+
+ sans
+ 11
+
+ Bold
+
+ Normal
+
+
+
+ sans
+ 11
+
+ Bold
+
+ Normal
+
+
+
+
+
+ 1
+ 1
+
+ Sparrow
+
+ 0
+
+
+ yes
+ Nonpixel
+
+ Center
+
+
+
+ 10
+
+ 10
+
+
+
+
+
+ 0
+ 0
+ 0
+ 0
+
+
+ TopLeft
+
+ 0
+ 0
+ no
+ Above
+
+ Vertical
+
+ no
+ 300
+
+ 300
+
+ Middle
+
+
+
+ C-g
+
+
+
+ left
+ no
+
+
+
+
+ right
+ no
+
+
+
+
+ up
+ no
+
+
+
+
+ down
+ no
+
+
+
+
+ left
+ no
+
+
+
+
+ right
+ no
+
+
+
+
+ up
+ no
+
+
+
+
+ down
+ no
+
+
+
+
+ 1
+
+
+
+
+ 2
+
+
+
+
+ 3
+
+
+
+
+ 4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ scrot -s
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ yes
+ yes
+
+
+
+
+
+
+
+
+
+
+ right
+
+
+
+
+ left
+
+
+
+
+ up
+
+
+
+
+ down
+
+
+
+
+
+
+ true
+ Konqueror
+
+ kfmclient openProfile filemanagement
+
+
+
+
+
+ scrot
+
+
+
+
+ 1
+
+ 500
+
+ 400
+
+ false
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ previous
+
+
+
+
+ next
+
+
+
+
+ previous
+
+
+
+
+ next
+
+
+
+
+ previous
+
+
+
+
+ next
+
+
+
+
+
+
+
+
+
+
+
+
+ no
+
+
+
+
+
+
+
+
+
+
+ yes
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ top
+
+
+
+
+
+
+ left
+
+
+
+
+
+
+ right
+
+
+
+
+
+
+ bottom
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ vertical
+
+
+
+
+ horizontal
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ previous
+
+
+
+
+ next
+
+
+
+
+ previous
+
+
+
+
+ next
+
+
+
+
+ previous
+
+
+
+
+ next
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ previous
+
+
+
+
+ next
+
+
+
+
+ previous
+
+
+
+
+ next
+
+
+
+
+
+
+
+
+ yes
+
+
+
+
+
\ No newline at end of file
diff --git a/scripts/procedures/getConfig.ts b/scripts/procedures/getConfig.ts
index 567cd9c..ebdc033 100644
--- a/scripts/procedures/getConfig.ts
+++ b/scripts/procedures/getConfig.ts
@@ -1,112 +1,122 @@
import { compat, types as T } from "../deps.ts";
export const getConfig: T.ExpectedExports.getConfig = compat.getConfig({
- "title": {
- "type": "string",
- "nullable": false,
- "name": "Webtop Title",
- "description":
+ title: {
+ type: "string",
+ nullable: false,
+ name: "Webtop Title",
+ description:
"This value will be displayed as the title of your browser tab.",
- "default": "Start9 Sparrow on Webtop",
- "pattern": '^[^\\n"]*$',
+ default: "Start9 Sparrow on Webtop",
+ pattern: '^[^\\n"]*$',
"pattern-description": "Must not contain newline or quote characters.",
- "masked": false,
- "copyable": true,
+ masked: false,
+ copyable: true,
},
- "username": {
- "type": "string",
- "nullable": false,
- "name": "Username",
- "description": "The username for logging into your Webtop.",
- "default": "webtop",
- "pattern": '^[^\\n"]*$',
+ username: {
+ type: "string",
+ nullable: false,
+ name: "Username",
+ description: "The username for logging into your Webtop.",
+ default: "webtop",
+ pattern: '^[^\\n"]*$',
"pattern-description": "Must not contain newline or quote characters.",
- "masked": false,
- "copyable": true,
+ masked: false,
+ copyable: true,
},
- "password": {
- "type": "string",
- "name": "Password",
- "description": "The password for logging into your Webtop.",
- "nullable": false,
- "masked": true,
- "default": {
+ password: {
+ type: "string",
+ name: "Password",
+ description: "The password for logging into your Webtop.",
+ nullable: false,
+ masked: true,
+ default: {
charset: "a-z,1-9",
len: 20,
},
- "pattern": '^[^\\n"]*$',
+ pattern: '^[^\\n"]*$',
"pattern-description": "Must not contain newline or quote characters.",
- "copyable": true,
+ copyable: true,
},
- "server": {
- "type": "union",
- "name": "Bitcoin/Electrum Server",
- "description":
- "
The Bitcoin Core or Electrum node to connect to:
- Public: Use a public Bitcoin node (not recommended!).
- Bitcoin Core: Use the Bitcoin Core service installed on your server.
- Electrs: Use the electrs service installed on your server.
- Custom: Do not change the current setting in Sparrow
",
- "tag": {
- "id": "type",
- "name": "Bitcoin Node Type",
- "variant-names": {
- "electrs": "Electrs (recommended)",
- "bitcoind": "Bitcoin Core",
- "public": "Public (not recommended)",
- "custom": "Custom",
+ sparrow: {
+ type: "object",
+ name: "Sparrow settings",
+ description: "Sparrow settings",
+ spec: {
+ managesettings: {
+ type: "boolean",
+ name: "Apply settings on startup",
+ description:
+ "Disable to manage your own server and proxy settings in Sparrow",
+ default: true,
},
- "description":
- "The Bitcoin Core or Electrum node to connect to:
- Public: Use a public Bitcoin node (not recommended!).
- Bitcoin Core: Use the Bitcoin Core service installed on your server.
- Electrs: Use the electrs service installed on your server.
- Custom: Do not change the current setting in Sparrow
",
- },
- "warning":
- "If using 'Public', please switch to using Bitcoin Core or electrs as soon as possible. Using a public node can expose your IP address and transactions done using this node.",
- "default": "electrs",
- "variants": {
- "electrs": {},
- "bitcoind": {
- "user": {
- "type": "pointer",
- "name": "RPC Username",
- "description": "The username for Bitcoin Core's RPC interface",
- "subtype": "package",
- "package-id": "bitcoind",
- "target": "config",
- "multi": false,
- "selector": "$.rpc.username",
+ server: {
+ type: "union",
+ name: "Bitcoin/Electrum Server",
+ description:
+ "The Bitcoin Core or Electrum node to connect to:
- Electrs: Use the electrs service installed on your server.
- Bitcoin Core: Use the Bitcoin Core service installed on your server.
- Public: Use a public Bitcoin node (not recommended!).
",
+ tag: {
+ id: "type",
+ name: "Bitcoin Node Type",
+ "variant-names": {
+ electrs: "Electrs (recommended)",
+ bitcoind: "Bitcoin Core",
+ public: "Public (not recommended)",
+ },
+ description:
+ "The Bitcoin Core or Electrum node to connect to:
- Electrs: Use the electrs service installed on your server.
- Bitcoin Core: Use the Bitcoin Core service installed on your server.
- Public: Use a public Bitcoin node (not recommended!).
",
},
- "password": {
- "type": "pointer",
- "name": "RPC Password",
- "description": "The password for Bitcoin Core's RPC interface",
- "subtype": "package",
- "package-id": "bitcoind",
- "target": "config",
- "multi": false,
- "selector": "$.rpc.password",
+ warning:
+ "If using 'Public', please switch to using Bitcoin Core or electrs as soon as possible. Using a public node can expose your IP address and transactions done using this node.",
+ default: "electrs",
+ variants: {
+ electrs: {},
+ bitcoind: {
+ user: {
+ type: "pointer",
+ name: "RPC Username",
+ description: "The username for Bitcoin Core's RPC interface",
+ subtype: "package",
+ "package-id": "bitcoind",
+ target: "config",
+ multi: false,
+ selector: "$.rpc.username",
+ },
+ password: {
+ type: "pointer",
+ name: "RPC Password",
+ description: "The password for Bitcoin Core's RPC interface",
+ subtype: "package",
+ "package-id": "bitcoind",
+ target: "config",
+ multi: false,
+ selector: "$.rpc.password",
+ },
+ },
+ public: {},
},
},
- "public": {},
- "custom": {},
- },
- },
- "proxy": {
- "name": "Use a proxy",
- "description":
- "Use a proxy for external connections (like whirlpool)
- Tor: Use the Tor Proxy of StartOS (recommended)
- None: do not use a proxy (not recommended)
- Custom: Do not change the current setting in Sparrow
",
- "type": "union",
- "tag": {
- "id": "type",
- "name": "Proxy Type",
- "variant-names": {
- "tor": "Tor (recommended)",
- "none": "None (not recommended)",
- "custom": "Custom",
+ proxy: {
+ name: "Use a proxy",
+ description:
+ "Use a proxy for external connections (like whirlpool)
- Tor: Use the Tor Proxy of StartOS (recommended)
- None: do not use a proxy
",
+ type: "union",
+ tag: {
+ id: "type",
+ name: "Proxy Type",
+ "variant-names": {
+ tor: "Tor (recommended)",
+ none: "None (not recommended)",
+ },
+ description:
+ "Use a proxy for external connections (like whirlpool)
- Tor: Use the Tor Proxy of StartOS (recommended)
- None: do not use a proxy
",
+ },
+ default: "tor",
+ variants: {
+ tor: {},
+ none: {},
+ },
},
- "description":
- "Use a proxy for external connections (like whirlpool)
- Tor: Use the Tor Proxy of StartOS (recommended)
- None: do not use a proxy (not recommended)
- Custom: Do not change the current setting in Sparrow
",
- },
- "default": "tor",
- "variants": {
- "tor": {},
- "none": {},
- "custom": {},
},
},
});
diff --git a/scripts/procedures/migrations.ts b/scripts/procedures/migrations.ts
index e0a410d..d1f7e26 100644
--- a/scripts/procedures/migrations.ts
+++ b/scripts/procedures/migrations.ts
@@ -1,4 +1,4 @@
import { compat, types as T } from "../deps.ts";
export const migration: T.ExpectedExports.migration = compat.migrations
- .fromMapping({}, "1.8.2.5" );
+ .fromMapping({}, "1.8.2.1" );