OSDN Git Service

[add] : Added logout logo for lxde.
authorhayao <shun819.mail@gmail.com>
Fri, 12 Jun 2020 10:20:20 +0000 (19:20 +0900)
committerhayao <shun819.mail@gmail.com>
Fri, 12 Jun 2020 10:20:20 +0000 (19:20 +0900)
channels/lxde/airootfs.any/usr/share/libalpm/hooks/alterlinux-lxde-logo.hook [new file with mode: 0644]
channels/lxde/airootfs.any/usr/share/libalpm/scripts/alterlinux-lxde-logo [new file with mode: 0755]
channels/lxde/airootfs.any/usr/share/lxde/images/alterlinux.png [new file with mode: 0644]

diff --git a/channels/lxde/airootfs.any/usr/share/libalpm/hooks/alterlinux-lxde-logo.hook b/channels/lxde/airootfs.any/usr/share/libalpm/hooks/alterlinux-lxde-logo.hook
new file mode 100644 (file)
index 0000000..bf58127
--- /dev/null
@@ -0,0 +1,13 @@
+[Trigger]
+Type = Path
+Operation = Install
+Operation = Upgrade
+Operation = Remove
+Target = usr/share/lxde/images/logout-banner.png
+
+[Action]
+Description = Optimizing LXDE logo ...
+When = PostTransaction
+Depends=lxde-common
+Exec = bash /usr/share/libalpm/scripts/alterlinux-lxde-logo
+NeedsTargets
diff --git a/channels/lxde/airootfs.any/usr/share/libalpm/scripts/alterlinux-lxde-logo b/channels/lxde/airootfs.any/usr/share/libalpm/scripts/alterlinux-lxde-logo
new file mode 100755 (executable)
index 0000000..4759f59
--- /dev/null
@@ -0,0 +1,22 @@
+#!/usr/bin/env bash
+
+# Delete file only if file exists
+# remove <file1> <file2> ...
+function remove () {
+    local _list
+    local _file
+    _list=($(echo "$@"))
+    for _file in "${_list[@]}"; do
+        if [[ -f ${_file} ]]; then
+            rm -f "${_file}"
+        elif [[ -d ${_file} ]]; then
+            rm -rf "${_file}"
+        fi
+    done
+}
+
+
+# Replace wlogo.
+remove "/usr/share/lxde/images/logout-banner.png"
+ln -s "/usr/share/lxde/images/alterlinux.png" "/usr/share/lxde/images/logout-banner.png"
+chmod 644 "/usr/share/lxde/images/logout-banner.png"
\ No newline at end of file
diff --git a/channels/lxde/airootfs.any/usr/share/lxde/images/alterlinux.png b/channels/lxde/airootfs.any/usr/share/lxde/images/alterlinux.png
new file mode 100644 (file)
index 0000000..b5c45d8
Binary files /dev/null and b/channels/lxde/airootfs.any/usr/share/lxde/images/alterlinux.png differ