]> git.donarmstrong.com Git - deb_pkgs/autorandr.git/commitdiff
Added autostart that works in KDE
authorMatt Alexander <matt@alxndr.me>
Fri, 20 Jan 2023 18:22:50 +0000 (12:22 -0600)
committerPhillip Berndt <phillip.berndt@googlemail.com>
Mon, 23 Jan 2023 10:22:50 +0000 (11:22 +0100)
Makefile

index 3ecb0a743e91d135f39dcd04f7dbc2bd84538a20..bc4ebabf44090440001af07a546e9c0692eda03f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -66,12 +66,17 @@ DEFAULT_TARGETS+=autostart_config
 install_autostart_config:
        mkdir -p ${DESTDIR}/${XDG_AUTOSTART_DIR}
        install -m 644 contrib/etc/xdg/autostart/autorandr.desktop ${DESTDIR}/${XDG_AUTOSTART_DIR}/autorandr.desktop
+       # KDE-specific autostart (workaround for https://github.com/systemd/systemd/issues/18791)
+       install -m 644 contrib/etc/xdg/autostart/autorandr.desktop ${DESTDIR}/${XDG_AUTOSTART_DIR}/autorandr-kde.desktop
+       desktop-file-edit --remove-key=X-GNOME-Autostart-Phase --add-only-show-in=KDE ${DESTDIR}/${XDG_AUTOSTART_DIR}/autorandr-kde.desktop
+
 ifneq ($(PREFIX),/usr/)
        sed -i -re 's#/usr/bin/autorandr#$(subst #,\#,${PREFIX})/bin/autorandr#g' ${DESTDIR}/${XDG_AUTOSTART_DIR}/autorandr.desktop
 endif
 
 uninstall_autostart_config:
        rm -f ${DESTDIR}/${XDG_AUTOSTART_DIR}/autorandr.desktop
+       rm -f ${DESTDIR}/${XDG_AUTOSTART_DIR}/autorandr-kde.desktop
 
 # Rules for systemd
 SYSTEMD_UNIT_DIR:=$(shell pkg-config --variable=systemdsystemunitdir systemd 2>/dev/null)