Network Manager - ulises-jeremias/dotfiles GitHub Wiki
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
.
Depending on your preference, you can use either graphical or terminal-based tools for managing networks:
nmtui
Use this for:
- Activating or deactivating connections
- Connecting to Wi-Fi
- Setting static IP addresses
nmcli device wifi list
nmcli device wifi connect <SSID> password <password>
Use this for scripting, automating, or managing networks programmatically.
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
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
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.
Useful nmcli
commands:
nmcli general status
nmcli device
nmcli connection show
journalctl -u NetworkManager.service
Take control of your network configuration with tools that match your workflow β whether it's terminal, GUI, or automation! π‘