forked from Shinonome/alt-illogical-impulse
ac6d3adeb9
BREAKING CHANGE: Remove external dots-hyprland dependency - Imported all essential configs from dots-hyprland/installer-replication - Added complete configs/ directory with: - hypr/ - Hyprland configuration - quickshell/ - Quickshell widgets and config - applications/ - Application configurations - scripts/ - Utility scripts - matugen/ - Material You theming - Updated flake.nix to use local ./configs instead of external repo - Simplified update-flake script (removed external repo management) - Updated README to reflect self-contained architecture - All builds pass with local configurations Benefits: - No external repository dependencies - Faster builds (no network dependencies) - Version controlled configs in single repo - Easier maintenance and development - Complete installer replication in one place
48 lines
1.5 KiB
QML
48 lines
1.5 KiB
QML
import qs.modules.common
|
|
import qs.modules.common.widgets
|
|
import qs.services
|
|
import qs.modules.common.functions
|
|
import Qt5Compat.GraphicalEffects
|
|
import QtQuick
|
|
import Quickshell.Io
|
|
import Quickshell.Widgets
|
|
|
|
IconImage {
|
|
id: root
|
|
property string url
|
|
property string displayText
|
|
|
|
property real size: 32
|
|
property string downloadUserAgent: Config.options?.networking.userAgent ?? ""
|
|
property string faviconDownloadPath: Directories.favicons
|
|
property string domainName: url.includes("vertexaisearch") ? displayText : StringUtils.getDomain(url)
|
|
property string faviconUrl: `https://www.google.com/s2/favicons?domain=${domainName}&sz=32`
|
|
property string fileName: `${domainName}.ico`
|
|
property string faviconFilePath: `${faviconDownloadPath}/${fileName}`
|
|
property string urlToLoad
|
|
|
|
Process {
|
|
id: faviconDownloadProcess
|
|
running: false
|
|
command: ["bash", "-c", `[ -f ${faviconFilePath} ] || curl -s '${root.faviconUrl}' -o '${faviconFilePath}' -L -H 'User-Agent: ${downloadUserAgent}'`]
|
|
onExited: (exitCode, exitStatus) => {
|
|
root.urlToLoad = root.faviconFilePath
|
|
}
|
|
}
|
|
|
|
Component.onCompleted: {
|
|
faviconDownloadProcess.running = true
|
|
}
|
|
|
|
source: Qt.resolvedUrl(root.urlToLoad)
|
|
implicitSize: root.size
|
|
|
|
layer.enabled: true
|
|
layer.effect: OpacityMask {
|
|
maskSource: Rectangle {
|
|
width: root.implicitSize
|
|
height: root.implicitSize
|
|
radius: Appearance.rounding.full
|
|
}
|
|
}
|
|
} |