tadly / hideIt.sh

Automagically hide/show a window by its name when the cursor is within a defined region or you mouse over it.
GNU General Public License v3.0
248 stars 11 forks source link

hideIt.sh I block the whole tray of polybar #7

Closed medioman closed 5 years ago

medioman commented 5 years ago

when I start my radio scripts, youtube, in the polybar tray does not start more calendar, mpd, poweoff, etc etc I warn you that polybar does not give any terminal errors. Do you know how to solve? Thank you

tadly commented 5 years ago

I'm not sure what "does not start more" means.

Do you mean that additionally started tray elements do not show up?

If so, this is due to hideIt.sh not knowing the tray changed in size. Depending on where your tray is located, the newly added tray elements might be outside of your visible screen area. Simply hiding and unhiding the tray using hideIt will recalculate all positions

medioman commented 5 years ago

No, the elements placed in the tray with scripts, when I start them, no longer start the other default elements, they are blocked, they start when I close the scripts.see photo [url=https://scrot.moe/image/x1LeQ][img]https://cdn.scrot.moe/images/2019/05/27/ArchLabs_2019-05-27-14_1600x900.md.png[/img][/url]

I started the youtube script, but if I click on the calerndario it does not start, unfortunately the screenshot does not print the arrow dl mouse

----Messaggio originale----

Da: notifications@github.com

Data: 27-mag-2019 9.36

A: "tadly/hideIt.sh"hideIt.sh@noreply.github.com

Cc: "medioman"sonbello@alice.it, "Author"author@noreply.github.com

Ogg: Re: [tadly/hideIt.sh] hideIt.sh I block the whole tray of polybar (#7)

I'm not sure what "does not start more" means.

Do you mean that additionally started tray elements do not show up?

If so, this is due to hideIt.sh not knowing the tray changed in size. Depending on where your tray is located, the newly added tray elements might be outside of your visible screen area. Simply hiding and unhiding the tray using hideIt will recalculate all positions — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

tadly commented 5 years ago

Sorry but I really have no clue.

What exactly is your script doing? What are "the other default elements" What does the youtube script do? What is calerndario? Where is the "tray" in your screenshot?

How does your polybar configuration look like for the tray? How do you use hideIt? (the command)

You don't really give me a lot of information to work with...

medioman commented 5 years ago

hi. 1)my script youtube:

!/usr/bin/env bash

!/bin/bash

yad dialog to download and save youtube video

written by May 2016

if ! type youtube-dl &>/dev/null;then DLG=$(yad --form --window-icon=distributor-logo-bunsenlabs \ --borders=10 \ --text=" youtube-dl not found\n\n Install it first and run the script again" --button="OK" \ --title="Youtube downloader" --center --undecorated \ ) exit fi

while :; do ENTRY=$(yad --form --window-icon=distributor-logo-bunsenlabs --center \ --borders=10 \ --title="Youtube downloader" \ --field="Enter Save directory:DIR" \ --field="Enter youtube url" \ --field="Play file when downloaded:CHK" \ ) RET=$?

OIFS=$IFS # save Internal Field Separator
IFS="|" # separator is "|" in returned choices
i=0
retChoice=()

for ret in $ENTRY;do retChoice[$i]="$ret" i=$(($i+1)) done

IFS=$OIFS # reset IFS back to default

SAVEDIR=${retChoice[0]} # directory path
URL=${retChoice[1]}
URL=${URL##*'='}
PLAY=${retChoice[2]}

if (( $RET == 1 ));then
    exit
fi
if [[ -z $SAVEDIR ]] || [[ -z $URL ]];then
    yad --form --text="Complete both fields" --center --window-icon=distributor-logo-bunsenlabs
else
    break
fi

done

STRING=$(date +%s | sha256sum | base64 | head -c 8) EXIT=/tmp/$STRING

Run youtube download, pipe to progress dialog

( ( youtube-dl --newline -i -o "$SAVEDIR/%(id)s.%(ext)s" $URL )& echo $! ) \ | ( read PIPED_PID; while read -r line || [[ -n "$line" ]]; do if [[ "$(echo $line | grep '[0-9]%')" ]];then percent=$(echo $line | grep -Eo "[^[-+]?[0-9]+.?[0-9]]$*%" | tr -d '%') printf "%.f\n" "$percent" fi echo "#$line" done | yad --progress \ --auto-close \ --window-icon=distributor-logo-bunsenlabs --borders=10 \ --center --undecorated --text="Youtube downloader:" --button="Cancel:1" || echo "rm" > $EXIT; kill $PIPED_PID )

if [[ -f $EXIT ]];then rm -f $EXIT rm $(find $SAVEDIR -type f -name $URL.* | grep part) &>/dev/null notify-send -t 3000 --icon "dialog-info" "Download cancelled" exit fi

if [[ $PLAY = TRUE ]] &>/dev/null;then xdg-open "$SAVEDIR/$URL".* fi

exit 0 2)workspaces,calendar,coreuse,memm

3)Posted srcipt

4)see the tray now?https://scrot.moe/image/x1csv thank

----Messaggio originale----

Da: notifications@github.com

Data: 27-mag-2019 11.42

A: "tadly/hideIt.sh"hideIt.sh@noreply.github.com

Cc: "medioman"sonbello@alice.it, "Author"author@noreply.github.com

Ogg: Re: [tadly/hideIt.sh] hideIt.sh I block the whole tray of polybar (#7)

Sorry but I really have no clue.

What exactly is your script doing? What are "the other default elements" What does the youtube script do? What is calerndario? Where is the "tray" in your screenshot?

How does your polybar configuration look like for the tray? How do you use hideIt? (the command)

You don't really give me a lot of information to work with... — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

medioman commented 5 years ago

My modules.conf for script youtube

;;;;;;;;;;;;;;;;;;; ;; Music ;; ;;;;;;;;;;;;;;;;;;; [module/youtube-dl] type = custom/script interval = 5 label = "%{A1:$HOME/.config/polybar/scripts/youtube-dl.sh:} %{A3:$HOME/.config/polybar/scripts/youtube-dl.sh:} %output% %{A} %{A}" exec = echo "" format =

----Messaggio originale----

Da: notifications@github.com

Data: 27-mag-2019 11.42

A: "tadly/hideIt.sh"hideIt.sh@noreply.github.com

Cc: "medioman"sonbello@alice.it, "Author"author@noreply.github.com

Ogg: Re: [tadly/hideIt.sh] hideIt.sh I block the whole tray of polybar (#7)

Sorry but I really have no clue.

What exactly is your script doing? What are "the other default elements" What does the youtube script do? What is calerndario? Where is the "tray" in your screenshot?

How does your polybar configuration look like for the tray? How do you use hideIt? (the command)

You don't really give me a lot of information to work with... — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

tadly commented 5 years ago

I really don't get it...

Where exactly does hideIt cause issues?

medioman commented 5 years ago

if I start the youtube script no more polybar modules start up. Try it yourself for that.Cheers

----Messaggio originale----

Da: notifications@github.com

Data: 27-mag-2019 11.42

A: "tadly/hideIt.sh"hideIt.sh@noreply.github.com

Cc: "medioman"sonbello@alice.it, "Author"author@noreply.github.com

Ogg: Re: [tadly/hideIt.sh] hideIt.sh I block the whole tray of polybar (#7)

Sorry but I really have no clue.

What exactly is your script doing? What are "the other default elements" What does the youtube script do? What is calerndario? Where is the "tray" in your screenshot?

How does your polybar configuration look like for the tray? How do you use hideIt? (the command)

You don't really give me a lot of information to work with... — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

tadly commented 5 years ago

Your posted script does not create a tray so whatever you're doing I don't know how to help. I'm pretty sure your issue has nothing to do with hideIt and as such I'm closing this issue now.

If you think otherwise, make a Screen-Recording showing the exact steps to reproduce your issue.

medioman commented 5 years ago

Hi,i watch video as required. thank

----Messaggio originale----

Da: notifications@github.com

Data: 3-giu-2019 8.30

A: "tadly/hideIt.sh"hideIt.sh@noreply.github.com

Cc: "medioman"sonbello@alice.it, "Author"author@noreply.github.com

Ogg: Re: [tadly/hideIt.sh] hideIt.sh I block the whole tray of polybar (#7)

Your posted script does not create a tray so whatever you're doing I don't know how to help. I'm pretty sure your issue has nothing to do with hideIt and as such I'm closing this issue now.

If you think otherwise, make a Screen-Recording showing the exact steps to reproduce your issue. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

medioman commented 5 years ago

I use archlinux and openbox, I also wanted to report this bug: Start top and watch bash you should have opened one. Exit session and restart top you will see that you will find two "Bash" started, with consequent temperature increase, at least with archlinux and archlabs happens, with other distros I don't know.

----Messaggio originale----

Da: notifications@github.com

Data: 3-giu-2019 8.30

A: "tadly/hideIt.sh"hideIt.sh@noreply.github.com

Cc: "medioman"sonbello@alice.it, "Author"author@noreply.github.com

Ogg: Re: [tadly/hideIt.sh] hideIt.sh I block the whole tray of polybar (#7)

Your posted script does not create a tray so whatever you're doing I don't know how to help. I'm pretty sure your issue has nothing to do with hideIt and as such I'm closing this issue now.

If you think otherwise, make a Screen-Recording showing the exact steps to reproduce your issue. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

tadly commented 5 years ago

Is this bash process directly related to hideIt? Your youtube download script also relies on bash you know...

medioman commented 5 years ago

yes,because if I remove and start the default polybar script, it doesn't happen. But at least you did the test on your pc-notebook? It seems to me that you have no desire to listen to me or to fix the problems. But maybe I'm wrong. If this is not the case, I apologize. Ps) for the record I have 5-6 scripts in operation.Cheers

----Messaggio originale----

Da: notifications@github.com

Data: 3-giu-2019 13.32

A: "tadly/hideIt.sh"hideIt.sh@noreply.github.com

Cc: "medioman"sonbello@alice.it, "Author"author@noreply.github.com

Ogg: Re: [tadly/hideIt.sh] hideIt.sh I block the whole tray of polybar (#7)

Is this bash process directly related to hideIt? Your youtube download script also relies on bash you know... — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

medioman commented 5 years ago

I rewrite it because English is not my language. If I start the default polybar without hideit, and I exit the session, as often as I want, top shows everything ok. If I go out of session only with hideit and no script, every time I leave the session, a session of bash comes out at the top. Example: if I go out of session three times, on reboot they appear in top 3 bash sessions

----Messaggio originale----

Da: notifications@github.com

Data: 3-giu-2019 13.32

A: "tadly/hideIt.sh"hideIt.sh@noreply.github.com

Cc: "medioman"sonbello@alice.it, "Author"author@noreply.github.com

Ogg: Re: [tadly/hideIt.sh] hideIt.sh I block the whole tray of polybar (#7)

Is this bash process directly related to hideIt? Your youtube download script also relies on bash you know... — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

tadly commented 5 years ago

It seems to me that you have no desire to listen to me or to fix the problems.

Not true but you barely provide me any information to work of off and even after asking specific question you only answered parts of it.

Again: How do you use hideIt? (the command)

Also... What exactly do you mean by go out of session? "Exit the window-manager (openbox) so you end up on your login screen?" If so, your starting hideIt wrong.

Lastly, install htop, test again and make sure these 3 bash sessions are related to hideIt

medioman commented 5 years ago

Start hideit from openbox autostart:whit this command: sleep 4; hideIt.sh -N '^polybar-openbox-bar_LVDS1$' -p 3 -d top -H &for htop see allegate

----Messaggio originale----

Da: notifications@github.com

Data: 3-giu-2019 15.40

A: "tadly/hideIt.sh"hideIt.sh@noreply.github.com

Cc: "medioman"sonbello@alice.it, "Author"author@noreply.github.com

Ogg: Re: [tadly/hideIt.sh] hideIt.sh I block the whole tray of polybar (#7)

It seems to me that you have no desire to listen to me or to fix the problems.

Not true but you barely provide me any information to work of off and even after asking specific question you only answered parts of it.

Again: How do you use hideIt? (the command)

Also... What exactly do you mean by go out of session? "Exit the window-manager (openbox) so you end up on your login screen?" If so, your starting hideIt wrong.

Lastly, install htop, test again and make sure these 3 bash sessions are related to hideIt — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

tadly commented 5 years ago

You can't add attachments to github issues

medioman commented 5 years ago

htop image https://scrot.moe/image/x99tyand to video send yesterday http://www.filedropper.com/simplescreenrecorder-2019-06-03131323

----Messaggio originale----

Da: notifications@github.com

Data: 4-giu-2019 8.40

A: "tadly/hideIt.sh"hideIt.sh@noreply.github.com

Cc: "medioman"sonbello@alice.it, "Author"author@noreply.github.com

Ogg: Re: [tadly/hideIt.sh] hideIt.sh I block the whole tray of polybar (#7)

You can't add attachments to github issues — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

tadly commented 5 years ago

As you can see from the screenshot, these are two independent processes meaning you started two of them. How you do that I don't know. This could be because the first one is not being exited and I suspect you haven't properly configured your WM setup.

Have a look at how to properly configure logind especially the KillUserProcesses option.

medioman commented 5 years ago

Thanks, I solved the login problem. Do you know how to solve the problems of the scripts that block the modules by default, as I show in the video?

----Messaggio originale----

Da: notifications@github.com

Data: 5-giu-2019 8.20

A: "tadly/hideIt.sh"hideIt.sh@noreply.github.com

Cc: "medioman"sonbello@alice.it, "Author"author@noreply.github.com

Ogg: Re: [tadly/hideIt.sh] hideIt.sh I block the whole tray of polybar (#7)

As you can see from the screenshot, these are two independent processes meaning you started two of them. How you do that I don't know. This could be because the first one is not being exited and I suspect you haven't properly configured your WM setup.

Have a look at how to properly configure logindespecially the KillUserProcesses option. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

tadly commented 5 years ago

No.

It might be because your youtube download thingy is still running and because polybar spawned that process (due to your label = "%{A1:$HOME/.config/polybar/scripts/youtube-dl.sh:} %) it might block until the script ends.

But non of that has anything to do with hideIt and I'm not here do give you general linux support.

medioman commented 5 years ago

Goodbye, asshole

----Messaggio originale----

Da: notifications@github.com

Data: 5-giu-2019 11.55

A: "tadly/hideIt.sh"hideIt.sh@noreply.github.com

Cc: "medioman"sonbello@alice.it, "Author"author@noreply.github.com

Ogg: Re: [tadly/hideIt.sh] hideIt.sh I block the whole tray of polybar (#7)

No.

It might be because your youtube download thingy is still running and because polybar spawned that process (due to your label = "%{A1:$HOME/.config/polybar/scripts/youtube-dl.sh:} %) it blocks until the script ends.

But non of that has anything to do with hideIt and I'm not here do give you general linux support. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

tadly commented 5 years ago

I suggest you get your attitude checked. I have helped you despite your broken english and total inability to provide relevant information.

If you lack the competence to run and "debug" your system, use google and LEARN. If you need general linux support, go and find a relevant subreddit, IRC channel or whatever.