Commit Graph

2064 Commits

Author SHA1 Message Date
Alex 94a882bf95
Merge pull request #1113 from alebastr/exclusive-and-passthrough
Add config options for exclusive zone and input event passthrough
2021-05-22 10:34:39 +02:00
Aleksei Bavshin da2d603b53
doc: add man for exclusive and passthrough flags 2021-05-21 22:44:19 -07:00
Aleksei Bavshin 7aaa3df701
feat(bar): add config flag to disable exclusive zone 2021-05-21 22:44:18 -07:00
Aleksei Bavshin 729553d3bc
feat(bar): add config flag for pointer event passthrough 2021-05-21 22:44:17 -07:00
Alex f78a802d11
Merge pull request #1106 from tperard/network-module-reword
Network module rework
2021-05-21 17:02:28 +02:00
Alex 826a549d1f
Merge pull request #1112 from yonatan8070/master
Add options to use a .json extension for the config filename
2021-05-21 17:00:02 +02:00
Yonatan Avhar 99918205ed Correct .json to .jsonc 2021-05-21 17:53:43 +03:00
Yonatan Avhar c65ec9e14f Add options to use a .json extension for the config filename 2021-05-21 15:54:48 +03:00
Anthony PERARD c1427ff807 network: Handle carrier information
IFLA_CARRIER allows to know when a cable is plugged to the Ethernet
card or when the WiFi is connected. If there's no carrier, the
interface will be considered disconnected.
2021-05-15 16:38:00 +01:00
Anthony PERARD 0bb436f949 network: Rework interface auto detection, handle route change events
Last part of the rework of handleEvents(), this time we take the
getExternalInterface() function and add it to the handleEvents()
function. That way, waybar can react immediately when a new "external
interface" is available and doesn't need to probe. Also that avoid to
have two different functions consuming from the same socket and we
don't need to recode some of the functions that are already available
via libnl (to send and receive messages).
2021-05-15 16:38:00 +01:00
Anthony PERARD 0fc7ef6685 network: Rework address lookup to use only events
In order to get the IP address of an interface, we can get the
information out of NEWADDR events without needed to call getifaddrs().
And when now events are expected, we can requests a dump of all
addresses and handle addresses changes the same way via handleEvents()
only.
2021-05-15 16:38:00 +01:00
Anthony PERARD c9bbaa7241 network: Rework initial interface search by using a dump
Instead of using an alternative way to list all links in order to
choose one when an "interface" is in the configuration, we can ask for
a dump of all interface an reuse the handleEvents() function.

This patch also start to rework the handleEvents() function to grab
more information out of each event, like the interface name.
2021-05-15 16:38:00 +01:00
Anthony PERARD 63fdf66ad6 network: Read all available messages on ev_sock_
When more than one message is available to read on the ev_sock_
socket, only the first one is read.

Make some changes to be able to read all the messages available by
setting the socket to non-blocking. This way we can detect when
there's nothing left to read and loop back to wait with epoll.
2021-05-15 16:38:00 +01:00
Anthony PERARD 9357a6cb88 network: Start the module with some text in the label_
Fix modules starting with no text, but not hidding.

Start with some "text" in the module's label_, update() will then
update it. Since the text should be different, update() will be able
to show or hide the event_box_. This is to work around the case where
the module start with no text, but the the event_box_ is shown.
2021-05-15 16:38:00 +01:00
Anthony PERARD dbc06abf18 network: Initialise cidr_ like clearIface() does 2021-05-15 16:38:00 +01:00
Amanieu d'Antras 4d067619a8 Fix power calculation when battery units are in μA instead of μW 2021-05-15 15:55:38 +01:00
Alex cf3d6545c3
Merge pull request #1101 from Max1Truc/master
fix: incorrect battery percentage on Pinebook Pro
2021-05-11 10:41:38 +02:00
Max1Truc f3a6e2d494 fix: incorrect battery percentage on Pinebook Pro 2021-05-10 21:00:14 +02:00
Alex cdce3e03ea
Update meson.build 2021-04-30 14:25:48 +02:00
Alex b25b7d29fc
Update spdlog.wrap 2021-04-30 14:25:26 +02:00
Alex 71d7596b6f
fix: bluetooth status tooltip 2021-04-30 14:23:49 +02:00
Alex 06e699c862
Merge pull request #1087 from Synthetica9/multiple-rewrites
rewriteTitle: allow multiple sequential rewrites
2021-04-27 00:00:53 +02:00
Patrick Hilhorst a03283d65f
rewriteTitle: allow multiple sequential rewrites 2021-04-26 20:26:43 +02:00
Alex ef38061edd
Merge pull request #1084 from gabegorelick/battery-discharging-full
[modules/battery] allow format-discharging-full
2021-04-26 09:28:00 +02:00
Gabe Gorelick 7e13e26c29
[modules/battery] allow format-discharging-full
`format-discharging-full` has been impossible since #923 made it
impossible to be full and discharging at the same time. This should
fix that by only making `format-charging-full` impossible. Whether
or not that should be allowed is a good question, but beyond the
scope of this change.

Fixes #1031
2021-04-25 22:00:24 -04:00
Alex 5f7329f5b9
Merge pull request #1081 from David96/master
[modules/pulseaudio] fix bluetooth class for PipeWire
2021-04-25 14:03:00 +02:00
David96 2213380dc0 [modules/pulseaudio] fix bluetooth class for PipeWire
apparently, pipewire-pulse slightly changed the naming of the sink.
2021-04-25 11:19:35 +02:00
Alex 66d8035ed1
Merge pull request #1055 from vrld/feature-rewrite-window-title
Add option to rewrite sway/window title
2021-04-21 14:23:45 +02:00
Matthias Richter 7cdf178f8d Document changes in manpage
Add section on rewrite rules and extend example
2021-04-21 12:24:47 +02:00
Matthias Richter af3c868a5b Catch exception on erroneous rules
std::regex and std::regex_replace may throw an std::regex_error if the
expression or replacement contain errors.

Log this error and carry on with the next rule, so that the title is
shown even if the config contains errors.
2021-04-21 12:24:47 +02:00
Matthias Richter b16c8972c7 Add option to rewrite sway/window title
Rewrites window title according to config option "rewrite".
"rewrite" is an object where keys are regular expressions and values are
rewrite rules if the expression matches. Rules may contain references to
captures of the expression. Regex and replacement follow ECMA-script
rules. If no regex matches, the title is left unchanged.

example:
"sway/window": {
  "rewrite": {
    "(.*) - Mozilla Firefox": " $1",
    "(.*) - zsh": " $1",
  }
}
2021-04-21 12:24:47 +02:00
Alex 1c9b62de07
Merge pull request #1076 from Scrumplex/add-mpd-volume-status
Implement MPD volume status format template
2021-04-20 09:38:19 +02:00
Sefa Eyeoglu fc89b01ba6
feat: implement mpd volume format template
Allow the user to show the current volume from MPD status via the
`format` and/or `tooltip-format` configuration options.

The values are provided by libmpdclient and are integers, generally
between 0-100 (without %). Values above 100 are also possible, as mpd
output plugins like `pulse` support volumes above 100%.

Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2021-04-20 08:35:47 +02:00
Alex 70e67c5daa
Merge pull request #1074 from Anakael/feature/taskbar-ignore-list
[wlr/taskbar] Add ignore-list param
2021-04-18 20:02:14 +02:00
dmitry 5ad3b6018a Remove exceed protected 2021-04-18 21:37:58 +03:00
dmitry ba278985e8 Add ignore-list param to wlr/taskbar 2021-04-18 21:34:29 +03:00
Alex 5300461c79 chore: v0.9.7 2021-04-15 21:17:54 +02:00
Alex d0f60c47bf
Merge pull request #1070 from jgmdev/cpumodulefix
[Module CPU] fix crash due to empty frequencies.
2021-04-15 21:17:00 +02:00
Alex 07f2470e36
Merge pull request #974 from kamushadenes/patch-1
Improve Pulseaudio sink/source separation
2021-04-15 21:09:35 +02:00
jgmdev f8f1e791a3 [Module CPU] fix crash due to empty frequencies.
On some systems (eg: ARM) the supported frequencies of the CPU are not
properly reported by /proc/cpuinfo so if that fails try to retrieve them
from /sys/devices/system/cpu/cpufreq/policy[0-9]/cpuinfo_[max|min]_freq.
2021-04-15 14:30:29 -04:00
Alex 729a4fe37e chore: v0.9.6 2021-04-15 16:09:45 +02:00
Alex 97e4b53cf3
Merge pull request #1061 from akheron/multi-battery-status
Use the correct battery status when multiple batteries are present
2021-03-28 19:35:51 +02:00
Petri Lehtinen c850212288 Use the correct battery status when multiple batteries are present 2021-03-28 20:07:35 +03:00
Alex 600afaf530
Merge pull request #1037 from Moonlight-Angel/cpu-frequency
Add cpu min/max/avg frequencies
2021-03-25 12:09:42 +01:00
Alex c21dc681c9
Merge pull request #1052 from Logarithmus/fix-sway-language-manpage
meson.build: add missing waybar-sway-language manpage
2021-03-23 14:57:06 +01:00
Artur Sinila f4ad5d36ec meson.build: add missing waybar-sway-language manpage 2021-03-23 16:51:08 +03:00
Alex f627fe3a39
Merge pull request #1051 from lunik1/disk-css
Add default styling for disk module
2021-03-23 12:31:52 +01:00
Alex 7b6dc33824
Merge pull request #1056 from martin2250/patch-1
Add style for battery state "plugged"
2021-03-23 12:30:50 +01:00
Martin Pittermann b4ee994515
Add style for battery state "plugged" 2021-03-23 00:26:45 +01:00
Alex b1dd62078f
Merge pull request #1002 from nullobsi/master
add length limits for MPD module tags
2021-03-15 09:15:09 +01:00