i3/.config/i3/passthrough

14 lines
268 B
Bash
Executable File

#!/bin/bash
ACTIVE_WINDOW=$(xdotool getactivewindow)
ACTIVE_WM_CLASS=$(xprop -id $ACTIVE_WINDOW | grep WM_CLASS)
if [[ $ACTIVE_WM_CLASS =~ $1 ]]
then
i3 mode bypass
xdotool key --clearmodifiers --window $ACTIVE_WINDOW "$2"
i3 mode default
else
$3
fi