Small program that allows various modes for waybar in Hyprland.
Warning
In order to work, it must follow these constrains: exactly 1 Waybar process must be running with only 1 Bar. And Waybar must have been launched providing full paths for its config file. (ie. waybar -c ~/waybar/myconfig
)
All deps except xmake are included with waybar.
xmake
waybar
g++ // C++ 17 or later
fmt
jsoncpp
autowaybar -m all
: Will hide waybar in all monitors until your mouse reaches the top of any of the screens.autowaybar -m focused
: Will hide waybar in the focused monitor only.
In order to build it:
xmake
or manually:
g++ src/*.cpp src/*.hpp src/*.h -o autowaybar -lfmt -ljsoncpp -O3 -march=native
Now you can run it by doing:
xmake run autowaybar arguments [args]
or you can install it to your path by doing:
xmake install --admin
# waybar start OR restart
bind=$mainMod, W, exec, if ! pgrep waybar; then waybar & else killall -SIGUSR2 waybar & fi
#autohide with autowaybar
bind=$mainMod, A, exec, if ! pgrep autowaybar; then autowaybar -m all & fi
bind=$mainMod SHIFT, A, exec, killall -9 autowaybar
hyprctl monitors | grep Monitor
Monitor eDP-1 (ID 0):