2020-06-11 14:12:10 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
# based on https://github.com/pastapojken/i3SteamOrKill
|
2020-06-22 19:07:12 +00:00
|
|
|
# required packages:
|
|
|
|
# - xdotool
|
|
|
|
|
2020-06-11 14:12:10 +00:00
|
|
|
winID=$(xdotool getactivewindow)
|
|
|
|
winClass=$(xprop -id $winID WM_CLASS)
|
|
|
|
|
|
|
|
if [[ $winClass = *"Steam"* ]]; then
|
|
|
|
xdotool windowunmap $(xdotool getactivewindow)
|
|
|
|
exit
|
|
|
|
elif [[ $winClass = *"evolution"* ]]; then
|
|
|
|
|
|
|
|
i3-msg kill
|
|
|
|
systemctl --user stop evolution-source-registry.service
|
|
|
|
killall -e /usr/lib/evolution-data-server/evolution-alarm-notify
|
|
|
|
exit
|
|
|
|
else
|
|
|
|
i3-msg kill
|
|
|
|
exit
|
|
|
|
fi
|