Better eww
This commit is contained in:
@@ -1,7 +1,12 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
# Close the bar if it's already open (wrong screen), then open on the target screen.
|
||||
# Must go through eww-ensure-daemon: this runs on every monitor hotplug, and a
|
||||
# bare `eww open` against a busy/dead socket spawns a second daemon, leaving the
|
||||
# first one's bar and popups on screen with no way to close them.
|
||||
moveOrOpenBar = screen: "${pkgs.writeShellScript "kanshi-eww-bar-${toString screen}" ''
|
||||
${pkgs.custom.eww-ensure-daemon}/bin/eww-ensure-daemon || exit 1
|
||||
|
||||
if ${pkgs.eww}/bin/eww active-windows 2>/dev/null | grep -qx "bar"; then
|
||||
${pkgs.eww}/bin/eww close bar
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user