Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a script to start the startup programs like other DE #1749

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ALEX5402
Copy link

Pull Request

Description

This PR adds a bash script that automatically runs executable commands from .desktop files located in the ~/.config/autostart/ directory. This feature mimics the startup program behavior seen in other Desktop Environments (DE).

Type of change

Please put an x in the boxes that apply:

  • New feature (non-breaking change which adds functionality)

Checklist

Please put an x in the boxes that apply:

  • I have read the CONTRIBUTING document.
  • My code follows the code style of this project.
  • My commit message follows the commit guidelines.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added a changelog entry.
  • I have added necessary comments/documentation to my code.
  • I have added tests to cover my changes.
  • I have tested my code locally and it works as expected.
  • All new and existing tests passed.

@mahaveergurjar
Copy link
Contributor

Why need this ??? if you need auto start then add the app in exec-once

@rubiin
Copy link
Contributor

rubiin commented Aug 22, 2024

Why need this ??? if you need auto start then add the app in exec-once

I agree. We dont need another utility, just add the program you want to launch on exec-once

@rubiin
Copy link
Contributor

rubiin commented Aug 26, 2024

@kRHYME7 can be closed i guess

@ALEX5402
Copy link
Author

Why need this ??? if you need auto start then add the app in exec-once

i mentioned that script to start the startup programs like other DE here

see here script to start the startup programs like other DE

@mahaveergurjar
Copy link
Contributor

Why need this ??? if you need auto start then add the app in exec-once

i mentioned that script to start the startup programs like other DE here

see here script to start the startup programs like other DE

I know it's for app startup but don't need this script in hyprland because in hyprland exec-once used for auto startup that's why don't need this script

@rubiin
Copy link
Contributor

rubiin commented Aug 28, 2024

Every cli and gui app can be launched with exec-once in hyprland which starts the app as soon as hyprland starts so its like reinventing the wheel which adds maintainance burden

image

@ALEX5402
Copy link
Author

Every cli and gui app can be launched with exec-once in hyprland which starts the app as soon as hyprland starts so its like reinventing the wheel which adds maintainance burden

image

I know this is why i mention the it opens that app like other DE
my consept why i need to define eatch programm manually on there to open
why not just make a script which autometicly do that

image

from inside the app is that a bad idea ?

@@ -38,7 +38,7 @@ exec-once = wl-paste --type text --watch cliphist store # clipboard store text d
exec-once = wl-paste --type image --watch cliphist store # clipboard store image data
exec-once = $scrPath/swwwallpaper.sh # start wallpaper daemon
exec-once = $scrPath/batterynotify.sh # battery notification

exec-once = $scrPath/autostart.sh # run the startups
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @ALEX5402,

This is good, but as I read through the discussion, both parties have good thoughts about this.

You can move this line to ./userprefs.t2 (

) so we can make this optional.

I encourage you to make this optional as honestly this will become a burden for maintaining the repo, as by default we don't know what packages/services are run on startup.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

by default it gonna run those packages only which you enabled on startup from inside the app

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

run those packages only which you enabled on startup from inside the app

Can you explain more about the script? What I understand of the script is it will extract the "Exec=" part, which is the command to launch an app, nothing fancy.

What you are saying is the script can pinpoint which users enabled the startup "from inside the app" ?
Or you are saying that $AUTOSTART_DIR is respected by most apps, and enabling it to run at the startup "from inside the app". Which I assumed that the application adds the .desktop file entry to the $AUTOSTART_DIR?

Copy link
Author

@ALEX5402 ALEX5402 Aug 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

then should i change that with $AUTOSTART_DIR ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants