#!/bin/bash
if=$(ip -br l | awk '$1 !~ "lo|vir|wl" { print $1}')
# echo "$if" # test the interface
defif="enp5s0" # define default interface
# echo "$defif" # test the default interface
# sed -i "s/$defif/$if/g" dotfiles/polybar/config
sed -i "s/$defif/$if/g" .config/polybar/config.ini # testing and it works
enp5s0 is saved as default interface in the config. This bash script learns your eth interface (without lo,vir,wl) and changes enp5s0 interface to yours.
I guess polybar's config file have to named with .ini extension. I noticed this a few days ago, when I ran polybar from terminal, it said config file is outdated and have to named with .ini extension. But I have committed (and others, thanks to everyone) to config file, the config.ini file does not include my commit. What can we do in this situtation?
Hello.
enp5s0
is saved as default interface in the config. This bash script learns your eth interface (without lo,vir,wl) and changesenp5s0
interface to yours.I guess polybar's config file have to named with
.ini
extension. I noticed this a few days ago, when I ran polybar from terminal, it saidconfig
file is outdated and have to named with.ini
extension. But I have committed (and others, thanks to everyone) toconfig
file, theconfig.ini
file does not include my commit. What can we do in this situtation?Resources