Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE REQUEST] Add --sticky flag #48

Open
nikitabobko opened this issue Mar 27, 2022 · 1 comment
Open

[FEATURE REQUEST] Add --sticky flag #48

nikitabobko opened this issue Mar 27, 2022 · 1 comment

Comments

@nikitabobko
Copy link

I wish dragon stayed on top even when I switch workspaces

@nikitabobko nikitabobko changed the title Add --sticky flag [FEATURE REQUEST] Add --sticky flag Mar 27, 2022
@nikitabobko
Copy link
Author

nikitabobko commented Mar 27, 2022

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 "$@"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant