Added session switcher unit file to use sway kernel command line option to start sway session on boot
This commit is contained in:
parent
ba925750cd
commit
cc619123c3
@ -47,6 +47,7 @@ SRC_URI = "\
|
|||||||
file://iptables-flush.sh \
|
file://iptables-flush.sh \
|
||||||
file://systemd/zram-swap.service \
|
file://systemd/zram-swap.service \
|
||||||
file://systemd/iptables.service \
|
file://systemd/iptables.service \
|
||||||
|
file://systemd/session-switcher.service \
|
||||||
file://skel/profile \
|
file://skel/profile \
|
||||||
file://skel/bashrc \
|
file://skel/bashrc \
|
||||||
file://skel/vimrc \
|
file://skel/vimrc \
|
||||||
@ -68,7 +69,7 @@ RDEPENDS_${PN} = "bash"
|
|||||||
|
|
||||||
inherit allarch systemd useradd
|
inherit allarch systemd useradd
|
||||||
|
|
||||||
SYSTEMD_SERVICE_${PN} = "zram-swap.service watch-run-user.path iptables.service"
|
SYSTEMD_SERVICE_${PN} = "zram-swap.service watch-run-user.path iptables.service session-switcher.service"
|
||||||
|
|
||||||
do_install() {
|
do_install() {
|
||||||
install -m 0755 -d ${D}/storage
|
install -m 0755 -d ${D}/storage
|
||||||
@ -97,6 +98,8 @@ do_install() {
|
|||||||
install -m 644 ${WORKDIR}/systemd/zram-swap.service ${D}${systemd_system_unitdir}
|
install -m 644 ${WORKDIR}/systemd/zram-swap.service ${D}${systemd_system_unitdir}
|
||||||
install -m 644 ${WORKDIR}/systemd/iptables.service ${D}${systemd_system_unitdir}
|
install -m 644 ${WORKDIR}/systemd/iptables.service ${D}${systemd_system_unitdir}
|
||||||
|
|
||||||
|
install -m 644 ${WORKDIR}/systemd/session-switcher.service ${D}${systemd_system_unitdir}
|
||||||
|
|
||||||
install -m 644 ${WORKDIR}/systemd/watch-run-user.path ${D}${systemd_system_unitdir}
|
install -m 644 ${WORKDIR}/systemd/watch-run-user.path ${D}${systemd_system_unitdir}
|
||||||
install -m 644 ${WORKDIR}/systemd/watch-run-user.service ${D}${systemd_system_unitdir}
|
install -m 644 ${WORKDIR}/systemd/watch-run-user.service ${D}${systemd_system_unitdir}
|
||||||
install -m 644 ${WORKDIR}/systemd/launch-default-realm.path ${D}${systemd_system_unitdir}
|
install -m 644 ${WORKDIR}/systemd/launch-default-realm.path ${D}${systemd_system_unitdir}
|
||||||
|
@ -0,0 +1,13 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Session Switcher
|
||||||
|
After=accounts-daemon.service
|
||||||
|
Wants=accounts-daemon.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
RemainAfterExit=no
|
||||||
|
ExecStart=/bin/sh -c 'for arg in `cat /proc/cmdline`; do case $arg in sway) /usr/bin/busctl call org.freedesktop.Accounts /org/freedesktop/Accounts/User1000 org.freedesktop.Accounts.User SetXSession s "sway"; esac; done'
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=graphical.target
|
||||||
|
|
Loading…
Reference in New Issue
Block a user