Skip to content

Commit 04f277c

Browse files
authored
feat(dock): add trash and stabilize autohide (#53)
* feat(dock): add trash and stabilize autohide Add an optional trash icon to the dock, including live empty/full state, open and empty actions, drag-and-drop trashing, and a Nautilus fallback when the trash:// default handler is unavailable. Improve dock visibility behavior so intellihide, hot-area reveal, hover autohide, overview transitions, and repeated show requests cooperate without flickering, stealing input while hidden, or leaving the dock stuck after switching between fullscreen or maximized windows. Add Dock devtool controls for revealing, hiding, hot-area triggering, and toggling always-show mode per dock or per monitor, with shell coverage for the new controls. Harden tray icon handling by keeping the Background Apps quick settings toggle hidden when configured, including when the toggle is created later. Update release automation by replacing the GNOME backport workflow with a daily pre-release workflow, limiting release jobs to stable and rc tags, and isolating toolbox shell tests from host-scoped D-Bus services. Add unit and shell tests for trash launching, intellihide state selection, dock hot-area/autohide edge cases, dock trash behavior, devtool actions, and Background Apps quick settings hiding. Bump version-name to 51.0. * fix(dock): restrict trash launch to Nautilus Remove the trash:// default-handler path so the dock trash icon no longer opens alternate file managers selected by the system. Track dash hover state without touching the dash container after it is destroyed, avoiding shutdown warnings from pending autohide timers. Update trash launcher tests for the Nautilus-only contract and stop thedock shell test from requiring Nautilus in the test environment.
1 parent 1f29acb commit 04f277c

25 files changed

Lines changed: 2574 additions & 466 deletions

.github/workflows/gnome-backport.yml

Lines changed: 0 additions & 137 deletions
This file was deleted.

.github/workflows/pre-release.yml

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
name: Pre-release
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
permissions:
8+
contents: write
9+
10+
concurrency:
11+
group: pre-release-main
12+
cancel-in-progress: false
13+
14+
jobs:
15+
ci:
16+
uses: ./.github/workflows/ci.yml
17+
18+
pre-release:
19+
name: Create daily pre-release
20+
runs-on: ubuntu-latest
21+
needs: [ci]
22+
steps:
23+
- uses: actions/checkout@v4
24+
25+
- name: Read version metadata
26+
id: metadata
27+
run: |
28+
set -euo pipefail
29+
30+
VERSION_NAME="$(node -e 'const fs = require("fs"); const metadata = JSON.parse(fs.readFileSync("metadata.json", "utf8")); process.stdout.write(metadata["version-name"]);')"
31+
RELEASE_DATE="$(date -u +%Y%m%d)"
32+
RELEASE_NAME="${VERSION_NAME}-${RELEASE_DATE}"
33+
34+
echo "version_name=${VERSION_NAME}" >> "$GITHUB_OUTPUT"
35+
echo "release_name=${RELEASE_NAME}" >> "$GITHUB_OUTPUT"
36+
echo "tag_name=v${RELEASE_NAME}" >> "$GITHUB_OUTPUT"
37+
38+
- name: Download extension zip
39+
uses: actions/download-artifact@v4
40+
with:
41+
name: extension-zip
42+
path: dist/target/
43+
44+
- name: Configure Git
45+
run: |
46+
git config user.name "github-actions[bot]"
47+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
48+
49+
- name: Remove stale daily pre-releases
50+
env:
51+
GH_TOKEN: ${{ github.token }}
52+
CURRENT_TAG: ${{ steps.metadata.outputs.tag_name }}
53+
run: |
54+
set -euo pipefail
55+
56+
gh release list --limit 100 --json tagName,isPrerelease --jq '
57+
.[]
58+
| select(.isPrerelease == true)
59+
| .tagName
60+
' | while read -r tag; do
61+
if [ -z "$tag" ] || [ "$tag" = "$CURRENT_TAG" ]; then
62+
continue
63+
fi
64+
65+
if [[ "$tag" =~ ^v[0-9]+\.[0-9]+-[0-9]{8}$ ]]; then
66+
gh release delete "$tag" --yes --cleanup-tag
67+
fi
68+
done
69+
70+
git fetch --tags --force
71+
git tag -l 'v*.*-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]' | while read -r tag; do
72+
if [ -z "$tag" ] || [ "$tag" = "$CURRENT_TAG" ]; then
73+
continue
74+
fi
75+
76+
git push --delete origin "$tag" || true
77+
git tag --delete "$tag" || true
78+
done
79+
80+
- name: Move daily pre-release tag
81+
run: |
82+
set -euo pipefail
83+
git tag --force "${{ steps.metadata.outputs.tag_name }}" "$GITHUB_SHA"
84+
git push --force origin "refs/tags/${{ steps.metadata.outputs.tag_name }}"
85+
86+
- name: Create or update GitHub pre-release
87+
uses: softprops/action-gh-release@v2
88+
with:
89+
tag_name: ${{ steps.metadata.outputs.tag_name }}
90+
target_commitish: ${{ github.sha }}
91+
name: ${{ steps.metadata.outputs.release_name }}
92+
files: dist/target/aurora-shell@luminusos.github.io.shell-extension.zip
93+
generate_release_notes: true
94+
prerelease: true
95+
make_latest: false
96+
overwrite_files: true

.github/workflows/release.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@ permissions:
1010

1111
jobs:
1212
ci:
13+
if: ${{ !contains(github.ref_name, '-') || contains(github.ref_name, '-rc') }}
1314
uses: ./.github/workflows/ci.yml
1415

1516
release:
1617
name: Create GitHub Release
18+
if: ${{ !contains(github.ref_name, '-') || contains(github.ref_name, '-rc') }}
1719
runs-on: ubuntu-latest
1820
needs: [ci]
1921
steps:
@@ -28,7 +30,7 @@ jobs:
2830
- name: Detect pre-release
2931
id: check
3032
run: |
31-
if [[ "${{ github.ref_name }}" == *"-rc"* ]]; then
33+
if [[ "${{ github.ref_name }}" == *"-"* ]]; then
3234
echo "prerelease=true" >> $GITHUB_OUTPUT
3335
else
3436
echo "prerelease=false" >> $GITHUB_OUTPUT
@@ -43,6 +45,7 @@ jobs:
4345
prerelease: ${{ steps.check.outputs.prerelease }}
4446

4547
- name: Create maintenance branch
48+
if: steps.check.outputs.prerelease == 'false'
4649
run: |
4750
MAJOR=$(echo "${{ github.ref_name }}" | sed 's/^v//' | grep -oP '^\d+')
4851
BRANCH="release/v${MAJOR}.x"

data/schemas/org.gnome.shell.extensions.aurora-shell.gschema.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@
6161
<summary>Always show dock</summary>
6262
<description>Keep the dock permanently visible and reserve screen space so windows never overlap it</description>
6363
</key>
64+
<key name="dock-show-trash" type="b">
65+
<default>true</default>
66+
<summary>Show trash icon</summary>
67+
<description>Show a trash can icon in the dock; click to open the trash, right-click to empty it</description>
68+
</key>
6469
<key name="module-auto-theme-switcher" type="b">
6570
<default>false</default>
6671
<summary>Enable Auto Theme Switcher module</summary>

justfile

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ uninstall:
9595
@echo "Uninstalled."
9696

9797
logs:
98-
journalctl -b 0 /usr/bin/gnome-shell | grep "aurora"
98+
journalctl -b 0 -r -o cat /usr/bin/gnome-shell | grep -i "aurora"
9999

100100
clean:
101101
rm -rf dist
@@ -218,19 +218,16 @@ toolbox action *args:
218218
echo "Example: just toolbox test tests/shell/auroraBasic.js"
219219
exit 1
220220
fi
221-
toolbox --container {{ toolbox_name }} run env GSETTINGS_SCHEMA_DIR=/usr/share/glib-2.0/schemas \
222-
dbus-run-session gnome-shell-test-tool \
223-
--headless --extension "$EXT" "$SCRIPT"
221+
bash scripts/run-toolbox-shell-test.sh {{ toolbox_name }} "$EXT" "$SCRIPT"
224222
;;
225223
"test-all")
226224
just package
227225
EXT="dist/target/{{ uuid }}.shell-extension.zip"
228226
PASS=0; FAIL=0
229227
for script in tests/shell/aurora*.js; do
230228
echo "==> Running $script"
231-
if toolbox --container {{ toolbox_name }} run env GSETTINGS_SCHEMA_DIR=/usr/share/glib-2.0/schemas \
232-
dbus-run-session gnome-shell-test-tool \
233-
--headless --extension "$EXT" "$script"; then
229+
if bash scripts/run-toolbox-shell-test.sh \
230+
{{ toolbox_name }} "$EXT" "$script"; then
234231
echo " PASS: $script"
235232
PASS=$((PASS + 1))
236233
else

metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "Aurora Shell",
33
"description": "A customizable GNOME Shell extension that enhances the user experience with various modules and features. The optional Clipboard History module reads and stores clipboard text locally so it can be browsed and restored; no clipboard data is shared with third parties, and its open shortcut is unset by default.",
4-
"version-name": "50.6",
4+
"version-name": "51.0",
55
"uuid": "aurora-shell@luminusos.github.io",
66
"url": "https://github.com/luminusOS/aurora-shell",
77
"settings-schema": "org.gnome.shell.extensions.aurora-shell",

scripts/create-toolbox.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ IMAGE="${2:-registry.fedoraproject.org/fedora-toolbox:44}"
77

88
PACKAGES=(
99
gnome-shell
10+
nautilus
1011
glib2-devel
1112
mutter-devkit
1213
mutter-tests

scripts/run-gnome-shell.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,21 @@ disable_dbus_service() {
3939
printf '[D-BUS Service]\nName=%s\nExec=/usr/bin/false\n' "$name" > "$service_dir/$name.service"
4040
}
4141

42-
# A private session must not start a second keyring daemon: it cannot unlock the
43-
# host keyring and would display an authentication prompt inside the devkit.
42+
# A private session must not start host-scoped services whose state lives under
43+
# /run/user/$UID. In particular, a second document portal can invalidate the
44+
# host Flatpak document mount and leave Flatpak apps unable to start until the
45+
# host xdg-document-portal.service is restarted.
46+
disable_dbus_service org.freedesktop.portal.Documents
47+
48+
# A second keyring daemon cannot unlock the host keyring and would display an
49+
# authentication prompt inside the devkit.
4450
disable_dbus_service org.freedesktop.secrets
4551
disable_dbus_service org.freedesktop.impl.portal.Secret
4652
disable_dbus_service org.gnome.keyring
4753

4854
SHELL_ENV=(
4955
SHELL_DEBUG=all
56+
G_MESSAGES_DEBUG="Aurora Shell"
5057
AURORA_DEVTOOLS=1
5158
XDG_CURRENT_DESKTOP=GNOME
5259
XDG_SESSION_TYPE=wayland

scripts/run-toolbox-shell-test.sh

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
#!/usr/bin/env bash
2+
3+
set -euo pipefail
4+
5+
TOOLBOX="$1"
6+
EXTENSION_ZIP="$2"
7+
TEST_SCRIPT="$3"
8+
HOST_RUNTIME_DIR="${XDG_RUNTIME_DIR:-/run/user/$(id -u)}"
9+
RUNTIME_DIR="$(mktemp -d "$HOST_RUNTIME_DIR/aurora-shell-test.XXXXXX")"
10+
PRIVATE_DATA_DIR="$RUNTIME_DIR/data"
11+
SERVICE_DIR="$PRIVATE_DATA_DIR/dbus-1/services"
12+
13+
cleanup() {
14+
rm -rf "$RUNTIME_DIR"
15+
}
16+
trap cleanup EXIT INT TERM
17+
18+
chmod 700 "$RUNTIME_DIR"
19+
mkdir -p "$SERVICE_DIR"
20+
21+
disable_dbus_service() {
22+
local name="$1"
23+
printf '[D-BUS Service]\nName=%s\nExec=/usr/bin/false\n' "$name" > "$SERVICE_DIR/$name.service"
24+
}
25+
26+
# Never let a toolbox test claim the host Flatpak document portal or keyring.
27+
disable_dbus_service org.freedesktop.portal.Documents
28+
disable_dbus_service org.freedesktop.secrets
29+
disable_dbus_service org.freedesktop.impl.portal.Secret
30+
disable_dbus_service org.gnome.keyring
31+
32+
toolbox --container "$TOOLBOX" run \
33+
env \
34+
-u DBUS_SESSION_BUS_ADDRESS \
35+
-u DBUS_STARTER_ADDRESS \
36+
-u DBUS_STARTER_BUS_TYPE \
37+
XDG_RUNTIME_DIR="$RUNTIME_DIR" \
38+
XDG_DATA_DIRS="$PRIVATE_DATA_DIR:${XDG_DATA_DIRS:-/usr/local/share:/usr/share}" \
39+
GSETTINGS_SCHEMA_DIR=/usr/share/glib-2.0/schemas \
40+
dbus-run-session gnome-shell-test-tool \
41+
--headless \
42+
--extension "$EXTENSION_ZIP" \
43+
"$TEST_SCRIPT"

0 commit comments

Comments
 (0)