1
0
Fork 0
mirror of https://github.com/pnx/dotfiles synced 2026-06-16 19:30:01 +02:00
dotfiles/hypr/scripts/focus-or-start.sh

13 lines
240 B
Bash
Executable file

#!/bin/sh
execCommand=$1
className=$2
class=$(hyprctl -j clients | jq -r ".[] | select(.class | startswith(\"${className}\")) | .class")
if [[ $class != "" ]]
then
hyprctl dispatch focuswindow "class:${class}"
else
${execCommand} &
fi