dragon icon indicating copy to clipboard operation
dragon copied to clipboard

[FEATURE REQUEST] Add --sticky flag

Open nikitabobko opened this issue 2 years ago • 1 comments

I wish dragon stayed on top even when I switch workspaces

nikitabobko avatar Mar 27 '22 13:03 nikitabobko

Workaround for ones who are interested in it. I created a wrapper script that makes dragon window sticky:

#!/usr/bin/env bash
set -e # Exit if one of commands exit with non-zero exit code
set -u # Treat unset variables and parameters other than the special parameters ‘@’ or ‘*’ as an error

if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
    dragon-drop "$@"
    exit 0
fi

make_dnd_window_sticky_once_it_appear() {
    while [ "$(xdotool getwindowfocus getwindowname)" != "dragon" ]; do
        true # just wait
    done
    wmctrl -i -r "$(xdotool getwindowfocus)" -b add,sticky
}

make_dnd_window_sticky_once_it_appear &
dragon-drop "$@"

nikitabobko avatar Mar 27 '22 13:03 nikitabobko