Comments (21)
if you know your the maximum width that your traffic block puts out, and can spare a few pixels of your bar, you can add something to the block config to get rid of that behaviour, like i did for my clock, which kept realining the whole thing every minute at 11 seconds..
The line you need to add to your block in i3blocks.conf
is min_width="22:22:22"
and resetting that string to that very long output of your traffic e.g. "22MB/s"
should get rid of that nuisance.
from i3blocks.
alright. so i will find a command which output tells me, that wifi is disconnected. i'll check that variable in the beginning of the script, and just let the block exit without giving any output. that way, the block should disappear.
are you using wireless? wireless only or do you use both wifi and LAN
?
from i3blocks.
alright. just add this right after the first if-clause.
if [[ "${INTERFACE}" = "" ]]; then
exit
fi
the first if-clause checks, whether you can reach googles dns server 8.8.8.8.
If you can't, the variable INTERFACE will be an empty string.
in this if clause, we check, if the string really is empty, and if it is, we just kill the script, so it will not output anything else.
have fun with it.
from i3blocks.
That's right, how would you suggest to fix this issue?
from i3blocks.
@vKnmnn epic will test in the morning... 😎
working like a charm
from i3blocks.
Nice. As a side note:
When you open an issue on someones scripts, made in their own spare time, you may want to address the issue in a nicer tone than you did here. That way you will more likely receive a positive answer.
Cheers.
PS: you should close the issue, when the problem has been fixed.
from i3blocks.
@vKnmnn chief...i didnt open the issue ...nonetheless it was driving my ocd into overdrive so thxs for the tip...greatly appreciated..
from i3blocks.
My apologies to you then, @ralpheee88, I was not paying attention to the names. Have a nice one
from i3blocks.
@vKnmnn chief ...can you pls confirm with the minimum width for the bandwidth block the auto hide feature does not work when there is no connection?
from i3blocks.
sorry, what do you want to know?
i just enabled the bandwidth block, instance=down
, min_width="______"
and disconnected from wifi. the block stays where it is and the min_width setting is still respected. what behavior do you expect?
from i3blocks.
@vKnmnn thxs for testing!!! I could be mistaken but if there is no internet connection and min width is not set i believe there should be an auto hide function...(hope that makes sense)
(the minimum width makes the notifications persistent)
from i3blocks.
Do you want the block to disappear, when you are disconnected from wifi?
Or do you want the block to disappear, when it shows 0b? (which might happen, even when you are connected)
The min_width setting has nothing to do with this.
from i3blocks.
@vKnmnn yeah ideally i would like the block to disappear when there is inactivity after a few seconds
from i3blocks.
that would probably take some rewriting. since i'm not using the bandwith block, i won't do it for you, but scripting is not that hard, so you could learn it yourself.
realistically, the throughput of a network interface doesn't stay at 0 for long, at any time, anyways. You should be able to see that in your block.
Making the block disappear, on disconnect is rather easy. would you like help with that?
from i3blocks.
you see, the block script is run every second, so it is hard to keep track on how long throughput has been zero
from i3blocks.
@vKnmnn thxs for the insight! making the block disappear on disconnect would be a good compromise. If and whenever you have time your help would be greatly appreciated!
from i3blocks.
@vKnmnn cant thank you enough...ironically i like to have a clean status bar
from i3blocks.
which device are you running the blocks on? wireless, wired or both? i need to know which ones. they go by names like wlp2s0 (wireless) enp0s3 (wired).
(find out with ip link
)
from i3blocks.
@vKnmnn wlp4s0 & enp0s31f6
from i3blocks.
Superstar...will have a crack and let you know...
really small glitch... when not connected it shows one output/input of the block (not sure which one)
My apologies ...i had a typo...its working beautifully...Thxs!!!
from i3blocks.
gonna close this
from i3blocks.
Related Issues (20)
- memory showing tb and icons only HOT 5
- ArhLinux Update IP not showing properly. HOT 1
- firewall block HOT 1
- Bluetooth icon HOT 2
- Brightness Not working HOT 1
- How to add them? HOT 2
- playerctl: fix block when process is not running
- merging with vivien's i3blocks-contrib HOT 3
- I need your help! HOT 11
- Help !! HOT 1
- feature request scaling governor HOT 2
- weather script: Faulty grep ranges HOT 2
- Showing symbols instead of Icons HOT 2
- help with webcam script HOT 3
- Weird block space characters after ttf-font-awesome characters HOT 9
- Report : weather script missing out "thunderstorm" HOT 1
- Firewall block HOT 5
- $BLOCK_BUTTON in blocks/scroll HOT 2
- Cloudy vs Partly Cloudy HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from i3blocks.