Skip to content

Commit 5e43e50

Browse files
committed
Fixes for icons
1 parent 91cdf8a commit 5e43e50

15 files changed

Lines changed: 277 additions & 300 deletions

File tree

Justfile

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ default:
2121

2222
# Build container image
2323
[group('Build')]
24-
build ghcr="0":
24+
build ghcr="0" nocache="0":
2525
#!/usr/bin/env bash
2626
set -euo pipefail
2727
@@ -42,6 +42,11 @@ build ghcr="0":
4242
BUILD_ARGS+=("--build-arg" "SHA_HEAD_SHORT=$(git rev-parse --short HEAD)")
4343
fi
4444
45+
# Add --no-cache if requested
46+
if [[ "{{ nocache }}" == "1" ]]; then
47+
BUILD_ARGS+=("--no-cache")
48+
fi
49+
4550
# Use rootful podman for GHCR builds
4651
if [[ "{{ ghcr }}" == "1" ]]; then
4752
{{ SUDO }} {{ PODMAN }} build \
@@ -62,6 +67,11 @@ build ghcr="0":
6267
echo "Build complete: ${IMAGE_FULL}"
6368
echo "========================================"
6469
70+
# Build container image without cache
71+
[group('Build')]
72+
build-force:
73+
@just build 0 1
74+
6575
# Build for GHCR push (rootful)
6676
[group('Build')]
6777
build-ghcr:
@@ -96,14 +106,23 @@ build-qcow2-fast:
96106

97107
echo "Building qcow2 from ${LOCAL_IMAGE} using bootc install..."
98108

99-
# Check if image exists
109+
# Check if image exists in user storage
100110
if ! {{ PODMAN }} image exists "${LOCAL_IMAGE}"; then
101111
echo "Error: Image ${LOCAL_IMAGE} not found. Run 'just build' first."
102112
exit 1
103113
fi
104114

105115
mkdir -p "${OUTPUT_DIR}"
106116

117+
# Copy image to root storage (required for sudo podman run)
118+
if [[ "${UID}" -gt 0 ]]; then
119+
echo "Copying image to root podman storage..."
120+
# Remove old image from root storage first to ensure fresh copy
121+
{{ SUDO }} {{ PODMAN }} rmi "${LOCAL_IMAGE}" 2>/dev/null || true
122+
# Use podman save/load instead of scp for reliability
123+
{{ PODMAN }} save "${LOCAL_IMAGE}" | {{ SUDO }} {{ PODMAN }} load
124+
fi
125+
107126
# Remove existing disks to start fresh
108127
rm -f "${RAW_FILE}" "${QCOW2_FILE}"
109128

@@ -249,6 +268,8 @@ run-qcow2:
249268
--disk path="${QCOW2_FILE}",format=qcow2,bus=virtio \
250269
--os-variant fedora-unknown \
251270
--boot uefi \
271+
--video virtio \
272+
--graphics spice \
252273
--autoconsole graphical
253274

254275
# Delete the qcow2 test VM

build_files/apps/02-gaming.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/bash
2+
# Hypercube Gaming
3+
# Steam and gaming utilities from negativo17
4+
5+
set -ouex pipefail
6+
7+
echo "Installing gaming packages..."
8+
9+
### Add negativo17 Steam repository
10+
dnf5 -y config-manager addrepo --from-repofile=https://negativo17.org/repos/fedora-steam.repo
11+
12+
### Install Steam
13+
dnf5 -y --setopt=install_weak_deps=False install steam
14+
15+
### Disable negativo17 repo after install (prevent user from layering packages)
16+
sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/fedora-steam.repo
17+
18+
echo "Gaming packages installed successfully"

build_files/dx/01-dx-tooling.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ dnf5 -y install distrobox
1313
dnf5 -y install \
1414
podman \
1515
podman-compose \
16+
podman-docker \
1617
buildah \
1718
skopeo
1819

build_files/shared/build.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ BUILD_DIRS=(
2323
"/ctx/build_files/base"
2424
"/ctx/build_files/hyprland"
2525
"/ctx/build_files/dx"
26+
"/ctx/build_files/apps"
2627
"/ctx/build_files/hypercube"
2728
)
2829

dot_files/quickshell/modules/notifications/NotificationPopup.qml

Lines changed: 8 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -144,69 +144,25 @@ PanelWindow {
144144
Layout.fillWidth: true
145145
spacing: Common.Appearance.spacing.small
146146

147-
// App icon with datacube fallback
147+
// App icon via IconResolver
148148
Item {
149149
id: popupIconContainer
150150
Layout.preferredWidth: 20
151151
Layout.preferredHeight: 20
152152

153-
property string iconName: notification.appIcon || ""
154-
property string datacubeIcon: ""
155-
property bool datacubeQueried: false
156-
property bool iconLoaded: datacubePopupIcon.status === Image.Ready || primaryPopupIcon.status === Image.Ready
157-
visible: iconLoaded
158-
159-
Component.onCompleted: {
160-
if (notification.appName && !datacubeQueried) {
161-
datacubeQueried = true
162-
popupIconLookup.query = notification.appName
163-
popupIconLookup.running = true
164-
}
165-
}
166-
167-
Process {
168-
id: popupIconLookup
169-
property string query: ""
170-
command: ["bash", "-lc", "datacube-cli query '" + query.replace(/'/g, "'\\''") + "' --json -m 1"]
171-
172-
stdout: SplitParser {
173-
splitMarker: "\n"
174-
onRead: data => {
175-
if (!data || data.trim() === "") return
176-
try {
177-
const item = JSON.parse(data)
178-
if (item.icon) {
179-
if (item.icon.startsWith("/")) {
180-
popupIconContainer.datacubeIcon = "file://" + item.icon
181-
} else {
182-
popupIconContainer.datacubeIcon = "image://icon/" + item.icon
183-
}
184-
}
185-
} catch (e) {}
186-
}
187-
}
188-
}
153+
// Get icon from IconResolver (triggers async lookup if not cached)
154+
property string resolvedIcon: notification.appName ? Services.IconResolver.getIcon(notification.appName) : ""
155+
property string fallbackIcon: notification.appIcon || ""
156+
property string iconSource: resolvedIcon || (fallbackIcon ? "image://icon/" + fallbackIcon : "")
189157

190-
// Primary: Try datacube icon first
191-
Image {
192-
id: datacubePopupIcon
193-
anchors.fill: parent
194-
source: popupIconContainer.datacubeIcon
195-
sourceSize: Qt.size(20, 20)
196-
smooth: true
197-
visible: status === Image.Ready
198-
}
158+
visible: appIcon.status === Image.Ready
199159

200-
// Fallback: Qt icon provider
201160
Image {
202-
id: primaryPopupIcon
161+
id: appIcon
203162
anchors.fill: parent
204-
source: popupIconContainer.iconName && datacubePopupIcon.status !== Image.Ready
205-
? "image://icon/" + popupIconContainer.iconName
206-
: ""
163+
source: popupIconContainer.iconSource
207164
sourceSize: Qt.size(20, 20)
208165
smooth: true
209-
visible: datacubePopupIcon.status !== Image.Ready && status === Image.Ready
210166
}
211167
}
212168

dot_files/quickshell/modules/sidebars/NotificationsView.qml

Lines changed: 9 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -273,76 +273,31 @@ ColumnLayout {
273273
anchors.margins: Common.Appearance.spacing.medium
274274
spacing: Common.Appearance.spacing.small
275275

276-
// App icon with datacube fallback
276+
// App icon via IconResolver
277277
Item {
278278
id: notifIconContainer
279279
Layout.preferredWidth: 32
280280
Layout.preferredHeight: 32
281281
Layout.alignment: Qt.AlignTop
282282

283-
property string iconName: notification.appIcon || ""
284-
property string datacubeIcon: ""
285-
property bool datacubeQueried: false
283+
// Get icon from IconResolver (triggers async lookup if not cached)
284+
property string resolvedIcon: notification.appName ? Services.IconResolver.getIcon(notification.appName) : ""
285+
property string fallbackIcon: notification.appIcon || ""
286+
property string iconSource: resolvedIcon || (fallbackIcon ? "image://icon/" + fallbackIcon : "")
286287

287-
Component.onCompleted: {
288-
if (notification.appName && !datacubeQueried) {
289-
datacubeQueried = true
290-
iconLookup.query = notification.appName
291-
iconLookup.running = true
292-
}
293-
}
294-
295-
Process {
296-
id: iconLookup
297-
property string query: ""
298-
command: ["bash", "-lc", "datacube-cli query '" + query.replace(/'/g, "'\\''") + "' --json -m 1"]
299-
300-
stdout: SplitParser {
301-
splitMarker: "\n"
302-
onRead: data => {
303-
if (!data || data.trim() === "") return
304-
try {
305-
const item = JSON.parse(data)
306-
if (item.icon) {
307-
if (item.icon.startsWith("/")) {
308-
notifIconContainer.datacubeIcon = "file://" + item.icon
309-
} else {
310-
notifIconContainer.datacubeIcon = "image://icon/" + item.icon
311-
}
312-
}
313-
} catch (e) {
314-
console.log("Icon lookup parse error:", e)
315-
}
316-
}
317-
}
318-
}
319-
320-
// Primary: Try datacube icon first
321288
Image {
322-
id: datacubeNotifIcon
289+
id: notifIcon
323290
anchors.fill: parent
324-
source: notifIconContainer.datacubeIcon
291+
source: notifIconContainer.iconSource
325292
sourceSize: Qt.size(32, 32)
326293
smooth: true
327294
visible: status === Image.Ready
328295
}
329296

330-
// Fallback 1: Qt icon provider
331-
Image {
332-
id: primaryNotifIcon
333-
anchors.fill: parent
334-
source: notifIconContainer.iconName && datacubeNotifIcon.status !== Image.Ready
335-
? "image://icon/" + notifIconContainer.iconName
336-
: ""
337-
sourceSize: Qt.size(32, 32)
338-
smooth: true
339-
visible: datacubeNotifIcon.status !== Image.Ready && status === Image.Ready
340-
}
341-
342-
// Fallback 2: Letter icon
297+
// Fallback: Letter icon
343298
Rectangle {
344299
anchors.fill: parent
345-
visible: datacubeNotifIcon.status !== Image.Ready && primaryNotifIcon.status !== Image.Ready
300+
visible: notifIcon.status !== Image.Ready
346301
radius: Common.Appearance.rounding.small
347302
color: Common.Appearance.m3colors.primaryContainer
348303

0 commit comments

Comments
 (0)