rename hyprland-systemd.desktop and remove hyprland-session.service

This commit is contained in:
Izmyname 2024-11-07 21:01:12 +05:00 committed by Mihai Fufezan
parent 430b5c302a
commit ccfae82ad1
4 changed files with 3 additions and 37 deletions

View file

@ -222,16 +222,10 @@ if(NO_SYSTEMD)
else() else()
message(STATUS "SYSTEMD support is requested (NO_SYSTEMD not defined)...") message(STATUS "SYSTEMD support is requested (NO_SYSTEMD not defined)...")
add_compile_definitions(USES_SYSTEMD) add_compile_definitions(USES_SYSTEMD)
configure_file(systemd/hyprland-session.service.in
systemd/hyprland-session.service @ONLY)
# session file -systemd # session file -uwsm
install(FILES ${CMAKE_SOURCE_DIR}/systemd/hyprland-systemd.desktop install(FILES ${CMAKE_SOURCE_DIR}/systemd/hyprland-uwsm.desktop
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/wayland-sessions) DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/wayland-sessions)
# install systemd service
install(FILES ${CMAKE_BINARY_DIR}/systemd/hyprland-session.service
DESTINATION ${CMAKE_INSTALL_LIBDIR}/systemd/user)
endif() endif()
set(CPACK_PROJECT_NAME ${PROJECT_NAME}) set(CPACK_PROJECT_NAME ${PROJECT_NAME})

View file

@ -1,16 +0,0 @@
[Unit]
Description=Hyprland - Tiling compositor with the looks
Documentation=man:Hyprland(1)
BindsTo=graphical-session.target
Before=graphical-session.target
Wants=xdg-desktop-autostart.target
Wants=graphical-session-pre.target
After=graphical-session-pre.target
[Service]
Type=notify
ExecStart=@PREFIX@/@BINDIR@/Hyprland
ExecStop=@PREFIX@/@BINDIR@/hyprctl dispatch exit
ExecStopPost=systemctl --user unset-environment DISPLAY WAYLAND_DISPLAY HYPRLAND_INSTANCE_SIGNATURE XDG_CURRENT_DESKTOP
Restart=on-failure
Slice=session.slice

View file

@ -1,17 +1,5 @@
install_data( install_data(
'hyprland-systemd.desktop', 'hyprland-uwsm.desktop',
install_dir: join_paths(get_option('datadir'), 'wayland-sessions'), install_dir: join_paths(get_option('datadir'), 'wayland-sessions'),
install_tag: 'runtime', install_tag: 'runtime',
) )
conf_data = configuration_data()
conf_data.set('PREFIX', get_option('prefix'))
conf_data.set('BINDIR', get_option('bindir'))
user_unit_dir = systemd.get_variable(pkgconfig: 'systemduserunitdir',
pkgconfig_define: ['prefix', get_option('prefix')])
configure_file(
configuration: conf_data,
input: 'hyprland-session.service.in',
output: '@BASENAME@',
install_dir: user_unit_dir )