Add desktop integration and Arch PKGBUILD
- steam-dice.svg: flat dice icon on Steam-blue gradient - steam-dice.desktop: launcher entry under Game category - PKGBUILD: steam-dice-git, builds from GitHub source - Use setDesktopFileName for correct Wayland WM_CLASS, with local SVG fallback when running from the source tree Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
# Maintainer: Mollusk <silvernode@gmail.com>
|
||||
pkgname=steam-dice-git
|
||||
_pkgname=steam-dice
|
||||
pkgver=r0.0000000
|
||||
pkgrel=1
|
||||
pkgdesc="A PyQt6 desktop app that picks a random game from your Steam library"
|
||||
arch=('any')
|
||||
url="https://github.com/silvernode/steam-dice"
|
||||
license=('GPL-2.0-only')
|
||||
depends=('python' 'python-pyqt6' 'python-requests' 'python-keyring' 'xdg-utils')
|
||||
makedepends=('git')
|
||||
provides=("$_pkgname")
|
||||
conflicts=("$_pkgname")
|
||||
source=("$_pkgname::git+https://github.com/silvernode/steam-dice.git")
|
||||
sha256sums=('SKIP')
|
||||
|
||||
pkgver() {
|
||||
cd "$_pkgname"
|
||||
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$_pkgname"
|
||||
install -Dm755 steam_dice.py "$pkgdir/usr/bin/steam-dice"
|
||||
install -Dm644 steam-dice.desktop "$pkgdir/usr/share/applications/steam-dice.desktop"
|
||||
install -Dm644 steam-dice.svg "$pkgdir/usr/share/icons/hicolor/scalable/apps/steam-dice.svg"
|
||||
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$_pkgname/LICENSE"
|
||||
install -Dm644 README.md "$pkgdir/usr/share/doc/$_pkgname/README.md"
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=Steam Dice
|
||||
GenericName=Random Game Picker
|
||||
Comment=Pick a random game from your Steam library
|
||||
Exec=steam-dice
|
||||
Icon=steam-dice
|
||||
Terminal=false
|
||||
Categories=Game;
|
||||
Keywords=steam;dice;random;game;launcher;
|
||||
StartupNotify=true
|
||||
StartupWMClass=steam-dice
|
||||
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256">
|
||||
<defs>
|
||||
<linearGradient id="bg" x1="0" y1="0" x2="0" y2="1">
|
||||
<stop offset="0" stop-color="#2a475e"/>
|
||||
<stop offset="1" stop-color="#1b2838"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="die" x1="0" y1="0" x2="0" y2="1">
|
||||
<stop offset="0" stop-color="#e8eef2"/>
|
||||
<stop offset="1" stop-color="#b6c3cc"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<rect width="256" height="256" rx="48" fill="url(#bg)"/>
|
||||
<rect x="52" y="52" width="152" height="152" rx="22" fill="url(#die)" stroke="#8f98a0" stroke-width="2"/>
|
||||
<g fill="#1b2838">
|
||||
<circle cx="90" cy="90" r="13"/>
|
||||
<circle cx="166" cy="90" r="13"/>
|
||||
<circle cx="128" cy="128" r="13"/>
|
||||
<circle cx="90" cy="166" r="13"/>
|
||||
<circle cx="166" cy="166" r="13"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 857 B |
+7
-1
@@ -572,7 +572,13 @@ class SteamDice(QMainWindow):
|
||||
|
||||
if __name__ == "__main__":
|
||||
app = QApplication(sys.argv)
|
||||
app.setWindowIcon(QIcon.fromTheme("codes.nora.gDiceRoller"))
|
||||
app.setDesktopFileName("steam-dice")
|
||||
icon = QIcon.fromTheme("steam-dice")
|
||||
if icon.isNull():
|
||||
local_icon = os.path.join(os.path.dirname(os.path.abspath(__file__)), "steam-dice.svg")
|
||||
if os.path.exists(local_icon):
|
||||
icon = QIcon(local_icon)
|
||||
app.setWindowIcon(icon)
|
||||
win = SteamDice()
|
||||
win.show()
|
||||
sys.exit(app.exec())
|
||||
|
||||
Reference in New Issue
Block a user