dots-of-war/eggs/scripts/swallow_app.sh
2024-12-16 18:19:49 +01:00

19 lines
273 B
Bash
Executable file

#! /bin/bash
file="$HOME/.local/share/unhide"
app="$1"
#target="$2"
tid=$(xdo id)
hidecurrent() {
echo $tid+$app >> $file & xdo hide
}
showlast() {
sid=$(cat $file | grep "$app" | awk -F "+" 'END{print $1}')
xdo show -r $sid
}
hidecurrent & $@ ; showlast