Skip to content

Commit

Permalink
renamed desktop file from app.go
Browse files Browse the repository at this point in the history
  • Loading branch information
harshau007 committed Jun 10, 2024
1 parent ceb9a75 commit 1d618ec
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app.go
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ func (a *App) URL(url string) {

func (a *App) ToggleAutostart(enable bool) {
autoDir := filepath.Join(os.Getenv("HOME"), ".config", "autostart")
autoFile := filepath.Join(autoDir, "alg-welcome.desktop")
autoFile := filepath.Join(autoDir, "welcome.desktop")

if _, err := os.Stat(autoDir); os.IsNotExist(err) {
err := os.MkdirAll(autoDir, 0755)
Expand All @@ -340,7 +340,7 @@ func (a *App) ToggleAutostart(enable bool) {
}

fmt.Println("Enabling autostart...")
err := exec.Command("cp", "/usr/share/applications/alg-welcome.desktop", autoFile).Run()
err := exec.Command("cp", "/usr/share/applications/welcome.desktop", autoFile).Run()
if err != nil {
fmt.Println("Error enabling autostart:", err)
return
Expand Down Expand Up @@ -369,7 +369,7 @@ func (a *App) CheckFileExists() bool {
}

homeDir := usr.HomeDir
filePath := filepath.Join(homeDir, ".config", "autostart", "alg-welcome.desktop")
filePath := filepath.Join(homeDir, ".config", "autostart", "welcome.desktop")

_, err = os.Stat(filePath)
return !os.IsNotExist(err)
Expand Down
Binary file modified build/bin/welcome
Binary file not shown.

0 comments on commit 1d618ec

Please sign in to comment.