summaryrefslogtreecommitdiff
path: root/sphtop
blob: bc2bf15fef1f45798d8a080851a502e94c7ac7e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/sh

COUNT="$(pgrep -U "$(whoami)" -f "$(basename $0)" | wc -l)"

if [ "${COUNT:-0}" -lt "3" ]; then
  hyprctl dispatch exec "[workspace special:sphtop;float;noanim] alacritty --class \"$(basename $0)\" -o \"window.position: {\'960,540\'}\" -e htop"
  hyprctl dispatch togglespecialworkspace sphtop
  sleep 0.2
fi

hyprctl dispatch togglespecialworkspace sphtop