From d75fdb060888acf6161b03dec1d0c22928ad5d6b Mon Sep 17 00:00:00 2001 From: Eriq Taing Date: Tue, 17 Jun 2025 23:50:50 -0400 Subject: [PATCH] Moved some regular application launches into using xdg autostart or removing --- files/system/etc/xdg/autostart/discord.desktop | 14 ++++++++++++++ files/system/etc/xdg/autostart/kitty.desktop | 16 ++++++++++++++++ files/systemd/user/discord.service | 17 ----------------- files/systemd/user/steam.service | 17 ----------------- files/systemd/user/terminal.service | 17 ----------------- recipes/components/autostart-module.yml | 5 +---- 6 files changed, 31 insertions(+), 55 deletions(-) create mode 100644 files/system/etc/xdg/autostart/discord.desktop create mode 100644 files/system/etc/xdg/autostart/kitty.desktop delete mode 100644 files/systemd/user/discord.service delete mode 100644 files/systemd/user/steam.service delete mode 100644 files/systemd/user/terminal.service diff --git a/files/system/etc/xdg/autostart/discord.desktop b/files/system/etc/xdg/autostart/discord.desktop new file mode 100644 index 0000000..eb2e443 --- /dev/null +++ b/files/system/etc/xdg/autostart/discord.desktop @@ -0,0 +1,14 @@ +[Desktop Entry] +Name=Discord +StartupWMClass=discord +Comment=All-in-one voice and text chat for gamers that's free, secure, and works on both your desktop and phone. +GenericName=Internet Messenger +Exec=/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=com.discordapp.Discord --file-forwarding com.discordapp.Discord @@u %U @@ +Icon=com.discordapp.Discord +Type=Application +Categories=Network;InstantMessaging; +Path=/usr/bin +X-Desktop-File-Install-Version=0.28 +MimeType=x-scheme-handler/discord; +X-Flatpak-Tags=proprietary; +X-Flatpak=com.discordapp.Discord \ No newline at end of file diff --git a/files/system/etc/xdg/autostart/kitty.desktop b/files/system/etc/xdg/autostart/kitty.desktop new file mode 100644 index 0000000..3885177 --- /dev/null +++ b/files/system/etc/xdg/autostart/kitty.desktop @@ -0,0 +1,16 @@ +[Desktop Entry] +Version=1.0 +Type=Application +Name=kitty +GenericName=Terminal emulator +Comment=Fast, feature-rich, GPU based terminal +TryExec=kitty +StartupNotify=true +Exec=/usr/bin/hyprctl dispatch exec [workspace special:terminal silent] /usr/bin/kitty +Icon=kitty +Categories=System;TerminalEmulator; +X-TerminalArgExec=-- +X-TerminalArgTitle=--title +X-TerminalArgAppId=--class +X-TerminalArgDir=--working-directory +X-TerminalArgHold=--hold \ No newline at end of file diff --git a/files/systemd/user/discord.service b/files/systemd/user/discord.service deleted file mode 100644 index 55a382c..0000000 --- a/files/systemd/user/discord.service +++ /dev/null @@ -1,17 +0,0 @@ -[Unit] -Description=The VoIP program targeted towards gaming. -# order startup after WM -After=graphical-session.target - -[Service] -Type=exec -# Repurpose XDG Autostart filtering -ExecCondition=/lib/systemd/systemd-xdg-autostart-condition "wlroots:sway:Wayfire:labwc:Hyprland" "" -ExecStart=/usr/bin/flatpak run com.discordapp.Discord -Slice=app-graphical.slice - -[Install] -WantedBy=graphical-session.target -# Alternatively can be wanted by specific WMs' targets -# Should also be duplicated in 'After=' to avoid ordering loop -#WantedBy=wayland-session@hyprland.desktop.target \ No newline at end of file diff --git a/files/systemd/user/steam.service b/files/systemd/user/steam.service deleted file mode 100644 index 84ea60e..0000000 --- a/files/systemd/user/steam.service +++ /dev/null @@ -1,17 +0,0 @@ -[Unit] -Description=The pc gaming platform -# order startup after WM -After=graphical-session.target - -[Service] -Type=exec -# Repurpose XDG Autostart filtering -ExecCondition=/lib/systemd/systemd-xdg-autostart-condition "wlroots:sway:Wayfire:labwc:Hyprland" "" -ExecStart=/usr/bin/steam %U -Slice=app-graphical.slice - -[Install] -WantedBy=graphical-session.target -# Alternatively can be wanted by specific WMs' targets -# Should also be duplicated in 'After=' to avoid ordering loop -#WantedBy=wayland-session@hyprland.desktop.target \ No newline at end of file diff --git a/files/systemd/user/terminal.service b/files/systemd/user/terminal.service deleted file mode 100644 index 11a25e3..0000000 --- a/files/systemd/user/terminal.service +++ /dev/null @@ -1,17 +0,0 @@ -[Unit] -Description=The Kitty terminal emulator. -# order startup after WM -After=graphical-session.target - -[Service] -Type=exec -# Repurpose XDG Autostart filtering -ExecCondition=/lib/systemd/systemd-xdg-autostart-condition "wlroots:sway:Wayfire:labwc:Hyprland" "" -ExecStart=hyprctl dispatch exec [workspace special:terminal silent] /usr/bin/kitty -Slice=app-graphical.slice - -[Install] -WantedBy=graphical-session.target -# Alternatively can be wanted by specific WMs' targets -# Should also be duplicated in 'After=' to avoid ordering loop -#WantedBy=wayland-session@hyprland.desktop.target \ No newline at end of file diff --git a/recipes/components/autostart-module.yml b/recipes/components/autostart-module.yml index 88d87dd..a0e847a 100644 --- a/recipes/components/autostart-module.yml +++ b/recipes/components/autostart-module.yml @@ -4,7 +4,4 @@ modules: enabled: - swww.service - hyprpanel.service - - hyprpolkitagent.service - - discord.service - - steam.service - - terminal.service \ No newline at end of file + - hyprpolkitagent.service \ No newline at end of file