28 lines
No EOL
423 B
Bash
Executable file
28 lines
No EOL
423 B
Bash
Executable file
#!/bin/sh
|
|
|
|
KILLED=false
|
|
if pgrep satty; then
|
|
killall satty
|
|
KILLED=true
|
|
fi
|
|
|
|
if [ -z $1 ]; then
|
|
:
|
|
elif [ $1 = "--button" ]; then
|
|
if [ $KILLED = "true" ]; then
|
|
exit 0;
|
|
else
|
|
set -- "$2";
|
|
fi
|
|
fi
|
|
|
|
if [ -z "$1" ]; then
|
|
grim -w "$(hyprctl activewindow -j | jq -r .address)" - | satty --filename -
|
|
elif [ "$1" = "--full" ]; then
|
|
grim - | satty --filename -
|
|
else
|
|
echo "Usage: $0 [--button] [--full]";
|
|
exit 1;
|
|
fi
|
|
|
|
exit 0; |