From 079f7f5f2e960a3e007d9591932e0cd4dd390d35 Mon Sep 17 00:00:00 2001 From: Eaglers Date: Mon, 17 Dec 2018 21:02:13 +0400 Subject: [PATCH] Change Snap confinement to "classic", add hooks that add/remove session --- session/usr/share/xsessions/plasma.desktop | 95 ++++++++++++++++++++++ snap/hooks/install | 4 + snap/hooks/post-refresh | 1 + snap/hooks/remove | 9 ++ snapcraft.yaml => snap/snapcraft.yaml | 6 +- 5 files changed, 114 insertions(+), 1 deletion(-) create mode 100644 session/usr/share/xsessions/plasma.desktop create mode 100755 snap/hooks/install create mode 120000 snap/hooks/post-refresh create mode 100755 snap/hooks/remove rename snapcraft.yaml => snap/snapcraft.yaml (96%) diff --git a/session/usr/share/xsessions/plasma.desktop b/session/usr/share/xsessions/plasma.desktop new file mode 100644 index 0000000..a3d82ff --- /dev/null +++ b/session/usr/share/xsessions/plasma.desktop @@ -0,0 +1,95 @@ +[Desktop Entry] +Type=XSession +Exec=snap run plasma-desktop.startkde +DesktopNames=KDE +Name=Plasma +Name[ar]=بلازما +Name[bs]=Plazma +Name[ca]=Plasma +Name[ca@valencia]=Plasma +Name[cs]=Plasma +Name[da]=Plasma +Name[de]=Plasma +Name[el]=Plasma +Name[en_GB]=Plasma +Name[es]=Plasma +Name[et]=Plasma +Name[eu]=Plasma +Name[fi]=Plasma +Name[fr]=Plasma +Name[gl]=Plasma +Name[he]=פלזמה +Name[hu]=Plasma +Name[id]=Plasma +Name[is]=Plasma +Name[it]=Plasma +Name[ja]=プラズマ +Name[ko]=Plasma +Name[lt]=Plasma +Name[nb]=Plasma +Name[nds]=Plasma +Name[nl]=Plasma +Name[nn]=Plasma +Name[pa]=ਪਲਾਜ਼ਮਾ +Name[pl]=Plazma +Name[pt]=Plasma +Name[pt_BR]=Plasma +Name[ru]=Plasma +Name[sk]=Plasma +Name[sl]=Plasma +Name[sr]=Плазма +Name[sr@ijekavian]=Плазма +Name[sr@ijekavianlatin]=Plasma +Name[sr@latin]=Plasma +Name[sv]=Plasma +Name[tr]=Plama +Name[uk]=Плазма +Name[x-test]=xxPlasmaxx +Name[zh_CN]=Plasma +Name[zh_TW]=Plasma +Comment=Plasma by KDE +Comment[ar]=بلازما كدي +Comment[bs]=Plazma od strane KDe +Comment[ca]=Plasma, creat per la comunitat KDE +Comment[ca@valencia]=Plasma, creat per la comunitat KDE +Comment[cs]=Plasma z KDE +Comment[da]=Plasma fra KDE +Comment[de]=Plasma von KDE +Comment[el]=Plasma από το KDE +Comment[en_GB]=Plasma by KDE +Comment[es]=Plasma, por KDE +Comment[et]=KDE Plasma +Comment[eu]=KDEren Plasma +Comment[fi]=Plasma KDE:ltä +Comment[fr]=Plasma, par KDE +Comment[gl]=Plasma, fornecido por KDE. +Comment[he]=פלזמה באמצעות KDE +Comment[hu]=Plasma a KDE-től +Comment[id]=Plasma oleh KDE +Comment[is]=Plasma frá KDE +Comment[it]=Plasma di KDE +Comment[ja]=Plasma by KDE +Comment[ko]=KDE Plasma +Comment[lt]=Plasmą sukūrė KDE +Comment[nb]=Plasma av KDE +Comment[nds]=Plasma vun KDE +Comment[nl]=Plasma door KDE +Comment[nn]=Plasma frå KDE +Comment[pa]=KDE ਵਲੋਂ ਪਲਾਜ਼ਮਾ +Comment[pl]=Plazma dzięki KDE +Comment[pt]=Plasma do KDE +Comment[pt_BR]=Plasma do KDE +Comment[ru]=KDE Plasma +Comment[sk]=Plasma od KDE +Comment[sl]=KDE Plasma +Comment[sr]=Плазма од КДЕ‑а +Comment[sr@ijekavian]=Плазма од КДЕ‑а +Comment[sr@ijekavianlatin]=Plasma od KDE‑a +Comment[sr@latin]=Plasma od KDE‑a +Comment[sv]=Plasma av KDE +Comment[tr]=KDE Plasma +Comment[uk]=Плазма KDE +Comment[x-test]=xxPlasma by KDExx +Comment[zh_CN]=KDE 的 Plasma +Comment[zh_TW]=Plasma by KDE +X-KDE-PluginInfo-Version=5.12.5 diff --git a/snap/hooks/install b/snap/hooks/install new file mode 100755 index 0000000..dfa2fa3 --- /dev/null +++ b/snap/hooks/install @@ -0,0 +1,4 @@ +#!/bin/bash + +mkdir -p /usr/share/xsessions/ +ln -s $SNAP/usr/share/xsessions/plasma.desktop /usr/share/xsessions/ diff --git a/snap/hooks/post-refresh b/snap/hooks/post-refresh new file mode 120000 index 0000000..f7ffc47 --- /dev/null +++ b/snap/hooks/post-refresh @@ -0,0 +1 @@ +install \ No newline at end of file diff --git a/snap/hooks/remove b/snap/hooks/remove new file mode 100755 index 0000000..0a32a19 --- /dev/null +++ b/snap/hooks/remove @@ -0,0 +1,9 @@ +#!/bin/bash + +if [ $(ls -1A | wc -l) = "1" ] +then + rm /usr/share/xsessions/plasma.desktop + rm -d /usr/share/xsessions/ +else + rm /usr/share/xsessions/plasma.desktop +fi diff --git a/snapcraft.yaml b/snap/snapcraft.yaml similarity index 96% rename from snapcraft.yaml rename to snap/snapcraft.yaml index 8c53e67..f8a5a0f 100644 --- a/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -3,7 +3,7 @@ name: plasma version: 5.9 summary: wow description: phew -confinement: strict +confinement: classic grade: stable apps: @@ -115,3 +115,7 @@ parts: after: [plasma] plugin: dump source: xwayland + session: + after: [patchy] + plugin: dump + source: session