eww closes the bar on it's own
This commit is contained in:
parent
68c90481fc
commit
95e640c9e8
1 changed files with 5 additions and 27 deletions
|
@ -74,42 +74,20 @@ func (hm *Hyprman) generateEwwClasses() {
|
||||||
|
|
||||||
func ewwBar1(cmd string) {
|
func ewwBar1(cmd string) {
|
||||||
time.Sleep(3 * time.Second)
|
time.Sleep(3 * time.Second)
|
||||||
if err := exec.Command("eww", cmd, "bar1").Run(); err != nil {
|
output, err := exec.Command("eww", cmd, "bar1").CombinedOutput()
|
||||||
log.Fatal(err)
|
if err != nil {
|
||||||
|
notify(fmt.Sprintf("failed to %s bar 1\n\n%s\n\n%v", cmd, output, err))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (hm *Hyprman) handleHyprEvent(line string) {
|
func (hm *Hyprman) handleHyprEvent(line string) {
|
||||||
s := strings.Split(line, ">>")
|
s := strings.Split(line, ">>")
|
||||||
event, _ := s[0], s[1]
|
event, _ := s[0], s[1]
|
||||||
switch event {
|
if event == "monitoradded" {
|
||||||
case "monitorremoved":
|
|
||||||
notify("Monitor removed closing bar1")
|
|
||||||
go ewwBar1("close")
|
|
||||||
hm.generateEwwClasses()
|
|
||||||
case "monitoradded":
|
|
||||||
notify("Monitor added opening bar1")
|
notify("Monitor added opening bar1")
|
||||||
go ewwBar1("open")
|
go ewwBar1("open")
|
||||||
hm.generateEwwClasses()
|
|
||||||
case "workspace",
|
|
||||||
"focusedmon",
|
|
||||||
"activewindow",
|
|
||||||
"createworkspace",
|
|
||||||
"destroyworkspace",
|
|
||||||
"moveworkspace",
|
|
||||||
"renameworkspace",
|
|
||||||
"openwindow",
|
|
||||||
"closewindow",
|
|
||||||
"movewindow",
|
|
||||||
"movewindowv2",
|
|
||||||
"changefloatingmode",
|
|
||||||
"windowtitle",
|
|
||||||
"togglegroup",
|
|
||||||
"moveintogroup",
|
|
||||||
"moveoutofgroup",
|
|
||||||
"configreloaded":
|
|
||||||
hm.generateEwwClasses()
|
|
||||||
}
|
}
|
||||||
|
hm.generateEwwClasses()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (hm *Hyprman) LaunchEww() {
|
func (hm *Hyprman) LaunchEww() {
|
||||||
|
|
Loading…
Reference in a new issue