Skip to content

Network

Wrapper library over networkmanager to better integrate with Astal.

Usage

You can browse the Network reference.

CLI

There is no CLI for this library, use the one provided by networkmanager.

sh
nmcli --help

Library

js
import Network from "gi://AstalNetwork"

const network = Network.get_default()

print(network.wifi.ssid)
py
from gi.repository import AstalNetwork as Network

network = Network.get_default()

print(network.get_wifi().get_ssid())
lua
local Network = require("lgi").require("AstalNetwork")

local network = Network.get_default()

print(network.wifi.ssid)
vala
// Not yet documented

Installation

  1. install dependencies
sh
sudo pacman -Syu meson vala libnm gobject-introspection
sh
sudo dnf install meson vala valadoc NetworkManager-libnm-devel gobject-introspection-devel
sh
sudo apt install meson valac libnm-dev gobject-introspection
  1. clone repo
sh
git clone https://github.com/aylur/astal.git
cd astal/lib/network
  1. install
sh
meson setup --prefix /usr build
meson install -C build

Released under the LGPL v2.1 License