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

Nameserver information to network block #2058

Merged
merged 8 commits into from
Jun 19, 2024
Merged

Conversation

jkauerl
Copy link
Contributor

@jkauerl jkauerl commented May 28, 2024

This PR is the first implementation to add more information to the network block.

The previous discussion was held in the following issue #2053. Specifically the first step of reading the nameservers saved in etc/resolv.conf.

It files that are modified are netlinks.rs and net.rs. With the former being the one that changes the most by creating a function to read the file, modify the Device struct and the last file by updating the documentation and adding the information to be displayed.

@bim9262 bim9262 linked an issue Jun 4, 2024 that may be closed by this pull request
src/netlink.rs Outdated Show resolved Hide resolved
src/netlink.rs Outdated Show resolved Hide resolved
Copy link
Collaborator

@MaxVerevkin MaxVerevkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@jkauerl
Copy link
Contributor Author

jkauerl commented Jun 18, 2024

Should I squash the commits into a single one or it is fine the way it is?

@MaxVerevkin
Copy link
Collaborator

Should I squash the commits into a single one or it is fine the way it is?

I usually do "squash and merge", so no need to do it manually.

@bim9262 bim9262 merged commit f895b12 into greshake:master Jun 19, 2024
13 checks passed
@matthiaskrgr
Copy link
Contributor

Looks like this breaks the net block

[[block]]
block = "net"
device = "wlp3s0"
format = "$icon $signal_strength $speed_down $graph_down $speed_up $graph_up $frequency"
missing_format = "no net"

[[block]]
block = "net"
device = "enp2s0f0"
format = " $speed_down $graph_down $speed_up $graph_up"

I only get "Failed to read nameservers" twice with this.

@MaxVerevkin
Copy link
Collaborator

@matthiaskrgr can you share the output of cat /etc/resolv.conf?

@matthiaskrgr
Copy link
Contributor

# Generated by NetworkManager
search speedport.ip
nameserver 192.168.2.1
nameserver fe80::1%wlp3s0

@MaxVerevkin
Copy link
Collaborator

Hmm, we currently don't handle the %wlp3s0 syntax. By the way, what does it do? From a quick search I couldn't find anything.

@matthiaskrgr
Copy link
Contributor

@MaxVerevkin
Copy link
Collaborator

I mean in the context of resolv.conf. Is it that this nameserver is interface-specific?

@MaxVerevkin
Copy link
Collaborator

Looks like this breaks the net block

[[block]]
block = "net"
device = "wlp3s0"
format = "$icon $signal_strength $speed_down $graph_down $speed_up $graph_up $frequency"
missing_format = "no net"

[[block]]
block = "net"
device = "enp2s0f0"
format = " $speed_down $graph_down $speed_up $graph_up"

I only get "Failed to read nameservers" twice with this.

Now tracked in #2080

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

Successfully merging this pull request may close these issues.

Request: DNS information to network block
4 participants