changed some text

This commit is contained in:
Sohrab Behdani 2024-12-15 22:43:28 +03:30
parent deaede3bd5
commit 9d9c873fe4
33 changed files with 15 additions and 109 deletions

View file

@ -1 +0,0 @@
archlinux-kernel-manager

View file

@ -1,96 +0,0 @@
#!/usr/bin/env sh
# this script should not be run as root
# the polkit agent running on the desktop environment should prompt for root password
echo "---------------------------------------------------------------------------"
echo "[INFO]: Checking session"
test $(whoami) == "root" && echo "[ERROR]: Do not run this script as root." && exit 1
test -z $DISPLAY && echo "[ERROR]: DISPLAY variable is not set." && exit 1
# check session is either one of X11, Wayland or TTY
SESSION=$(loginctl show-session $(loginctl|grep $(whoami) | awk '{print $1}') -p Type | awk -F= '{print $2}' | grep "x11\|wayland\|tty")
test -z "$SESSION" && echo "[ERROR]: Failed to verify session for user, SESSION = $SESSION" && exit 1
XAUTHORITY=$(xauth info | awk -F"Authority file:" '{print $2}' | tr -d ' ')
test -z "$XAUTHORITY" && echo "[ERROR]: XAUTHORIY file is not set" && exit 1
test -s "$XAUTHORITY" || touch "$XAUTHORITY"
XAUTH_HONORED=$(xauth info | awk -F"Changes honored:" '{print $2}' | tr -d ' ')
test $XAUTH_HONORED = "yes" || echo "[ERROR]: Xauth changes honored = no, restart X server" || exit 1
# GTK_A11Y=none - fixes the dbus-launch errors with GTK4
echo "[INFO]: XAUTHORITY = $XAUTHORITY"
echo "[INFO]: DBUS_SESSION_BUS_ADDRESS = $DBUS_SESSION_BUS_ADDRESS"
echo "[INFO]: DESKTOP SESSION = $DESKTOP_SESSION"
function start_in_wayland() {
echo "[INFO]: Starting in Wayland session"
xauth gen $DISPLAY &> /dev/null
case "$DESKTOP_SESSION" in
plasma | gnome)
pkexec env DISPLAY=$DISPLAY WAYLAND_DISPLAY="$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY" XAUTHORITY=$XAUTHORITY DBUS_SESSION_BUS_ADDRESS=$DBUS_SESSION_BUS_ADDRESS GDK_BACKEND=x11 GTK_A11Y=none '/usr/share/archlinux-kernel-manager/archlinux-kernel-manager.py'
;;
*)
pkexec env DISPLAY=$DISPLAY WAYLAND_DISPLAY="$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY" XAUTHORITY=$XAUTHORITY DBUS_SESSION_BUS_ADDRESS=$DBUS_SESSION_BUS_ADDRESS GTK_A11Y=none '/usr/share/archlinux-kernel-manager/archlinux-kernel-manager.py'
;;
esac
}
function start_in_x11() {
echo "[INFO]: Starting in X11 session"
pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY DBUS_SESSION_BUS_ADDRESS=$DBUS_SESSION_BUS_ADDRESS GTK_A11Y=none '/usr/share/archlinux-kernel-manager/archlinux-kernel-manager.py'
}
function start_in_tty() {
echo "[INFO]: Starting in TTY session"
pkexec '/usr/share/archlinux-kernel-manager/archlinux-kernel-manager.py'
}
case "$SESSION" in
"wayland")
# Wayland session, generate Xauth session cookie for $DISPLAY
echo "[INFO]: Display = $DISPLAY"
echo "[INFO]: Session = $SESSION"
start_in_wayland
;;
"x11")
# X11 session, don't do anything here
echo "[INFO]: Display = $DISPLAY"
echo "[INFO]: Session = $SESSION"
# just show msg on whether the Xauth session cookie is setup
start_in_x11
;;
"tty")
# TTY session, as user may not use a display manager
echo "[INFO]: Display = $DISPLAY"
echo "[INFO]: Session = $SESSION"
start_in_tty
;;
*)
# anything here is an unknown session, fallback to XDG_SESSION_TYPE
echo "[INFO]: Display = $DISPLAY"
echo "[WARN]: Session could not be verified, using XDG_SESSION_TYPE"
case "$XDG_SESSION_TYPE" in
"wayland")
start_in_wayland
;;
"tty")
start_in_tty
;;
"x11")
start_in_x11
;;
*)
echo "[ERROR]: $XDG_SESSION_TYPE is empty, cannot continue"
exit 1
;;
esac
;;
esac
echo "---------------------------------------------------------------------------"

View file

@ -1,9 +1,9 @@
[Desktop Entry] [Desktop Entry]
Name=Arch Linux Kernel Manager Name=Parch Linux Kernel Manager
GenericName=Arch Linux Kernel Manager GenericName=Parch Linux Kernel Manager
X-GNOME-FullName=Arch Linux Kernel Manager X-GNOME-FullName=Parch Linux Kernel Manager
Comment=Arch Linux Kernel Manager - Add/Remove Linux kernels Comment=Parch Linux Kernel Manager - Add/Remove Linux kernels
Exec=/usr/bin/archlinux-kernel-manager Exec=/usr/bin/parchlinux-kernel-manager
Icon=archlinux-kernel-manager-tux Icon=archlinux-kernel-manager-tux
Terminal=false Terminal=false
Type=Application Type=Application

View file

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 2 KiB

After

Width:  |  Height:  |  Size: 2 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 1 KiB

After

Width:  |  Height:  |  Size: 1 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 7.5 KiB

After

Width:  |  Height:  |  Size: 7.5 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 909 B

After

Width:  |  Height:  |  Size: 909 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 513 KiB

After

Width:  |  Height:  |  Size: 513 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Before After
Before After

View file

@ -13,14 +13,16 @@ class AboutDialog(Gtk.AboutDialog):
def __init__(self, manager_gui, **kwargs): def __init__(self, manager_gui, **kwargs):
super().__init__(**kwargs) super().__init__(**kwargs)
website = "http://arcolinux.info/" website = "http://parchlinux.com/"
authors = ["Erik Dubois", "Fennec"] authors = ["Parch Linux"]
program_name = "Arch Linux Kernel Manager" ogauthors = ["Erik Dubois", "Fennec"]
program_name = "Parch Linux Kernel Manager"
comments = ( comments = (
f"Add/Remove Officially supported Linux kernels on Arch based systems\n" f"Add/Remove Officially supported Linux kernels on Arch based systems\n"
f"Powered by the Arch Linux Archive (a.k.a ALA)\n" f"Powered by the Arch Linux Archive (a.k.a ALA)\n"
f"Community based Linux kernels are also supported\n" f"Community based Linux kernels are also supported\n"
f"Developed in Python with GTK 4\n" f"Developed in Python with GTK 4\n"
f"Forked From ArcoLinux\n"
) )
icon_name = "akm-tux" icon_name = "akm-tux"
@ -28,6 +30,7 @@ class AboutDialog(Gtk.AboutDialog):
self.set_transient_for(manager_gui) self.set_transient_for(manager_gui)
self.set_modal(True) self.set_modal(True)
self.set_authors(authors) self.set_authors(authors)
self.set_ogauthors(ogauthors)
self.set_program_name(program_name) self.set_program_name(program_name)
self.set_comments(comments) self.set_comments(comments)
self.set_website(website) self.set_website(website)

View file

@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN" "http://www.freedesktop.org/standards/PolicyKit/1.0/policyconfig.dtd"> <!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN" "http://www.freedesktop.org/standards/PolicyKit/1.0/policyconfig.dtd">
<policyconfig> <policyconfig>
<vendor>ArcoLinux</vendor> <vendor>ParchLinux</vendor>
<vendor_url>http://arcolinux.info/</vendor_url> <vendor_url>http://parchlinux.com/</vendor_url>
<icon_name>package-x-generic</icon_name> <icon_name>package-x-generic</icon_name>
<action id="org.arcolinux.pkexec.akm"> <action id="com.parchlinux.pkm">
<description>Add/Remove Linux kernels from Arch Linux based systems</description> <description>Add/Remove Linux kernels from Arch Linux based systems</description>
<description xml:lang="zh_TW">變更您自身的使用者資料</description> <description xml:lang="zh_TW">變更您自身的使用者資料</description>
<description xml:lang="zh_CN">修改您的用户数据</description> <description xml:lang="zh_CN">修改您的用户数据</description>
@ -98,7 +98,7 @@
<allow_inactive>auth_admin</allow_inactive> <allow_inactive>auth_admin</allow_inactive>
<allow_active>auth_admin</allow_active> <allow_active>auth_admin</allow_active>
</defaults> </defaults>
<annotate key="org.freedesktop.policykit.exec.path">/usr/share/archlinux-kernel-manager/archlinux-kernel-manager.py</annotate> <annotate key="org.freedesktop.policykit.exec.path">/usr/share/parchlinux-kernel-manager/parchlinux-kernel-manager.py</annotate>
<annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate> <annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
</action> </action>
</policyconfig> </policyconfig>