Commit Graph

29 Commits

Author SHA1 Message Date
Prateek Sunal
ab915fb724
feat(net): %netspeed% token to show combined up+download speed (#2590)
Closes #1083 

* Add netspeed parameter (#1083)

* Update net.cpp

* Update net.hpp

* Update network.cpp

* Update CHANGELOG.md
2022-02-06 21:12:38 +01:00
Cameron
195a0d94df
feat(network): Add mac address token (#2569)
* Add mac address option

* Add error handling

* Address changes

* Move outside of for loop

* Update changelog
2022-01-16 02:39:55 +01:00
llenck
6e34265d7b
Replace system_clock with steady_clock (#2559)
This fixes #857 and #1932. Also replaces PR #1725, since we don't need
our own implementation of condition_variable anymore since people who
update their polybar should have GCC 10 by now.

The m_updated_at field of the mpd module was removed instead of having
its clock change because it became unused in commit 645a3142a1.
2022-01-12 23:06:29 +01:00
Patrick Ziegler
4d90ac2f4c
fix(net): Use canonical interface name (#2540)
One can define an 'altname' for an interface. That name is valid of
if_nametoindex but it doesn't appear in `/sys/class/net`:

```
sudo ip link property add dev enp0s31f6 altname eno
```

This creates an altname eno for the existing interface enp0s31f6

Before, using eno, would lead to an error in `realpath`.

Ref: https://www.reddit.com/r/Polybar/comments/q8f0ye/error_disabling_module_network_reason_realpath/hgqpq1m/?context=3
2021-10-15 17:36:32 +02:00
Patrick Ziegler
5011e66346
fix(net): Check if interface is valid first. (#2497)
Fixes #2496
2021-09-09 21:47:23 +02:00
devsnek
f7c2d83ef2
feat(net): interface discovery (#2025) 2021-01-03 11:48:15 +01:00
Thibaut CHARLES
50d8a1ba06
feat(network): Ability to change speed unit text (B/s) (#2068)
New config option `speed-unit = B/s` will be used to suffix the upload and download speeds.

* mod::network: udspeed-unit to set network speed unit suffix

* Changed udspeed-unit to speed-unit
2020-11-29 14:15:27 +01:00
sunil
22af69545a feat(net): Support bridge interfaces (#1528)
Bridge interfaces don't provide linkspeed via ethtool but everything else works the same as with ethernet links.

Fixes #1522
2018-11-28 16:09:00 +01:00
NBonaparte
07d35df538 fix(net): make sure WITH_LIBNL is defined before checking 2018-11-01 19:50:33 +01:00
patrick96
3c504bb913 fix(build): remove side-effects of iwlib.h
wireless_tools 29 redefines inline in iwlib.h as:
    #define inline inline __attribute__((always_inline))

which conflicts with POLYBAR_NS, which is defined as:

    #define POLYBAR_NS    \
      namespace polybar { \
        inline namespace APP_VERSION_NAMESPACE {

In version 30.pre9 this #define is moved into a source file and thus
cannot conflict.

The error only occurs when building with clang, so it seems gcc and
clang handle this differently

Fixes #1492
2018-10-31 17:00:13 -07:00
taschenb
3afc341c7b feat(net): Add nl80211 support (#1009)
This patch enables support for nl80211. In case the libnl-genl-3.0
library isn't found, it will fall back to Wext instead.
The library to use can also be manually set with the CMake option
WITH_LIBNL.

The Wireless-Extensions (WE or Wext) are deprecated and long replaced
by cfg80211.

Although Wext isn't used by WiFi drivers anymore, CFG80211_WEXT allows
old tools to communicate with modern drivers by providing a wrapper
API.
2018-06-18 20:16:09 -07:00
sqwishy
d1d307d500 feat(net): Add local_ip6 token (#1239)
It's queried the same way ipv4 addresses are queried, but here it displays globally routable addresses. If there are multiple such addresses, it picks one (same as with ipv4). It's possible that an address discovered this way is not in fact globally reachable but still marked as global.
2018-06-10 22:51:43 +02:00
NBonaparte
0a8a326730 feat(net): Add unknown-as-up option
Fixes #457
2018-03-04 23:09:18 +01:00
Michael Carlberg
5b33ada576 refactor(common): Cleanup 2017-01-11 07:17:54 +01:00
Michael Carlberg
8cc885c316 refactor: Cleanup 2017-01-11 03:07:28 +01:00
Michael Carlberg
9c191cb025 fix(net): Always close socket handle
Refs #283
2017-01-01 15:10:58 +01:00
Michael Carlberg
7ecd132610 fix(net): Convert dBm to percentage
Fixes #249
2016-12-23 08:13:40 +01:00
Michael Carlberg
f9062d031c refactor(clang-tidy): Apply fixes 2016-12-15 03:30:41 +01:00
Michael Carlberg
ff9be848c7 refactor(clang-tidy): Apply fixes 2016-11-25 21:58:49 +01:00
Michael Carlberg
8db3e79919 refactor(clang-format): Apply fixes 2016-11-25 14:17:41 +01:00
Michael Carlberg
c6d85b2b92 refactor: Optimize build 2016-11-20 23:04:31 +01:00
Michael Carlberg
fd57ab0f3d fix: project rename 2016-11-19 06:26:07 +01:00
Michael Carlberg
e22ec91101 fix(network): Check for TUN/TAP devices
Ref #159
2016-11-14 17:55:35 +01:00
Michael Carlberg
983963d4e4 feat(network): Accumulate stats from all interfaces
Add config setting that will display accumulated
values for up-/downspeed (accumulate-stats = true)

Closes #144
2016-11-14 12:42:59 +01:00
Michael Carlberg
e7cb345cec wip: Separate source from definitions 2016-11-03 12:54:32 +01:00
Michael Carlberg
2768041d7c fix(network): Connection state
Closes jaagr/lemonbuddy#118
2016-10-29 07:26:57 +02:00
Michael Carlberg
82f311b695 refactor(network): Code cleanup
- Cleanup of network module and adapter
- Check operstate instead of carrier when testing the
  the current connection state, as suggested by @patrick96 in #44
- Separate signal quality and signal strength
- Log failed attempt to query device driver
2016-10-18 09:41:20 +02:00
Michael Carlberg
790059243b feat(network): Configurable min width for up/down speed 2016-10-11 14:08:59 +02:00
Michael Carlberg
d359ab6057 refactor: Application rewrite 2016-10-10 14:52:57 +02:00