Skip to content

Commit

Permalink
feat: add other names for intelliJ application
Browse files Browse the repository at this point in the history
  • Loading branch information
franciscofeo committed Jul 8, 2023
1 parent 5c54f38 commit 1f06ba4
Showing 1 changed file with 21 additions and 7 deletions.
28 changes: 21 additions & 7 deletions apps/applications.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,17 @@ import (
)

const (
defaultBrowser = "xdg-open"
slack = "slack"
intelliJ = "intellij-idea-ultimate"
defaultBrowser = "xdg-open"
slack = "slack"
intelliJUltimate = "intellij-idea-ultimate"
intelliJV1 = "intellij"
intelliJV2 = "idea"
)

var appHandler = map[string]func(){
slack: openSlack,
"browser": openUrls,
intelliJ: openIntelliJ,
slack: openSlack,
"browser": openUrls,
intelliJUltimate: openIntelliJ,
}

func OpenApplications() {
Expand Down Expand Up @@ -76,9 +78,21 @@ func openSlack() {

func openIntelliJ() {
fmt.Println("-" + " Opening IntelliJ IDEA!")
err := exec.Command(intelliJ).Start()

err := exec.Command(intelliJUltimate).Start()
if err != nil {
log.Println(err)
}

err = exec.Command(intelliJV1).Start()
if err != nil {
log.Println(err)
}

err = exec.Command(intelliJV2).Start()
if err != nil {
log.Println(err)
}

time.Sleep(650 * time.Millisecond)
}

0 comments on commit 1f06ba4

Please sign in to comment.