Network Manager - ulises-jeremias/dotfiles GitHub Wiki

🌐 Network Manager Guide

This section provides guidance for managing and configuring your network setup using NetworkManager, with custom dotfiles support.

Tip

Like everything else in this setup, the Network Manager integration is fully customizable. You can configure connections, UI tools, and even define shortcuts or scripts β€” all managed through your dotfiles and chezmoi.


βš™οΈ Tools You Can Use

Depending on your preference, you can use either graphical or terminal-based tools for managing networks:

1. nmtui – TUI interface (Text-based User Interface)

nmtui

Use this for:

  • Activating or deactivating connections
  • Connecting to Wi-Fi
  • Setting static IP addresses

2. nmcli – Command-line Interface

nmcli device wifi list
nmcli device wifi connect <SSID> password <password>

Use this for scripting, automating, or managing networks programmatically.

3. network-manager-applet – GUI tray icon

If you're running a system tray (e.g., via Polybar or XFCE), you can use the applet to manage Wi-Fi and VPNs.

Install:

sudo pacman -S network-manager-applet  # Arch-based

πŸ“ Dotfiles Integration

While network configurations aren't typically stored directly in the dotfiles, you can:

  • Create helper scripts to automate Wi-Fi/VPN switching
  • Manage your tray applet visibility and behavior
  • Bind hotkeys for toggling Wi-Fi, VPN, or Airplane Mode

You can version any helper script or autostart command using chezmoi:

chezmoi edit ~/.config/autostart/network-helper.sh

✨ Example: Quick Connect Script

Here’s an example nmcli script that you can store in ~/.local/bin/connect-home-wifi.sh:

#!/bin/bash
nmcli device wifi connect "HomeWiFi" password "yourpassword"

Make it executable:

chmod +x ~/.local/bin/connect-home-wifi.sh

Add it to your chezmoi config or call it from a keybinding.


πŸ§ͺ Debugging Network Issues

Useful nmcli commands:

nmcli general status
nmcli device
nmcli connection show
journalctl -u NetworkManager.service

πŸ†˜ Need Help?

Take control of your network configuration with tools that match your workflow β€” whether it's terminal, GUI, or automation! πŸ“‘

⚠️ **GitHub.com Fallback** ⚠️