dots-of-war/files/scripts/swallow_app.sh

20 lines
273 B
Bash
Raw Normal View History

2020-06-21 10:41:26 +00:00
#! /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