add support to hyprlandctl

BREAKING CHANGE: '-swaymsg' removed, use '-wm sway' instead
This commit is contained in:
gouvinb
2023-11-05 23:36:18 +01:00
parent ccfe7776c6
commit 1d3f023dc8
2 changed files with 20 additions and 9 deletions

View File

@@ -602,10 +602,14 @@ func launch(command string, terminal bool) {
args = []string{elements[cmdIdx]}
}
cmd = exec.Command(prefixCommand, args...)
} else if *swaymsg {
} else if *wm == "sway" {
prefixCommand = "swaymsg"
args = []string{"exec", elements[cmdIdx]}
cmd = exec.Command(prefixCommand, args...)
} else if *wm == "hyprland" {
prefixCommand = "hyprlandctl"
args = []string{"dispatch", "exec", elements[cmdIdx]}
cmd = exec.Command(prefixCommand, args...)
}
// set env variables