DashNix/eww_laptop/scripts/cockpit_toggle
2023-02-23 23:20:59 +01:00

11 lines
277 B
Bash
Executable file

#! /bin/bash
ISOPEN=$(eww windows | grep "*cockpit" | tr -d '*')
if [ "$ISOPEN" = "" ]; then
MONITOR=$(hyprctl monitors | grep -B 10 "focused: yes" | grep "ID" | awk -F '(' ' { print $2 } ' | tr -d 'ID ):')
eww open cockpit_window_"$MONITOR"
else
eww close "$ISOPEN"
fi