shownotes-w3m-rice/dragonzord
2020-12-07 03:58:43 -08:00

16 lines
527 B
Bash
Executable File

#!/usr/bin/env sh
# AUTHOR: gotbletu (@gmail|twitter|youtube|github|lbry)
# https://www.youtube.com/user/gotbletu
# DESC: set dragon drag and drop program to be always on top
# DEMO: https://youtu.be/ukIG_OVXa3Q
# DEPEND: wmctrl sed gawk dragon (https://github.com/mwh/dragon)
# REFF:
if [ "$1" = -h ] || [ "$1" = --help ]; then
dragon --help | sed "s/dragon/${0##*/}/g"
exit 0
else
(sleep 1 && WIN_ID="$(wmctrl -l | awk '/dragon/ {print $1}')" && wmctrl -i -r "$WIN_ID" -b add,above) &
dragon "$@"
fi