Add wifi interface

This commit is contained in:
2024-06-22 14:31:39 +01:00
parent 00b29cd850
commit a9db31c3a2
4 changed files with 38 additions and 26 deletions

View File

@@ -7,7 +7,7 @@ fi
# Set dialog colors
cp -f dotfiles/.dialogrc $HOME/.dialogrc
BACKTITLE="Trude's FreeBSD Toolkit"
BACKTITLE="Trude's Linux Toolkit"
dialog --erase-on-exit \
--backtitle "$BACKTITLE" \
--checklist "Use the arrow keys and SPACE to select, then press ENTER." 30 90 5 \
@@ -46,17 +46,17 @@ for selection in $main_menu; do
dialogUpdate 0 7 4 4 4
sudo apt-get update > logs/update.log
sudo apt-get update &> logs/update.log
dialogUpdate 15 5 7 4 4
sudo apt-get dist-upgrade -y >> logs/update.log
sudo apt-get dist-upgrade -y &>> logs/update.log
dialogUpdate 35 5 5 7 4
sudo apt-get upgrade -y >> logs/update.log
sudo apt-get upgrade -y &>> logs/update.log
dialogUpdate 80 5 5 5 7
sudo apt-get clean
sudo apt-get autoremove -y >> logs/update.log
sudo apt-get autoremove -y &>> logs/update.log
dialogUpdate 100 5 5 5 5
fi
@@ -123,7 +123,7 @@ for selection in $main_menu; do
# --- ENABLE BLUETOOTH ---
{
sudo apt-get install -y
sudo apt-get install -y bluetooth rfkill
} | dialog --backtitle "$BACKTITLE" --programbox "Enable Bluetooth support (blueman)" 30 90
fi
@@ -151,36 +151,38 @@ for selection in $main_menu; do
dialogDotfiles 20 5 7 4 4 4 4 4 4 4
# DE Deps
sudo apt-get install libx11-dev libxft-dev libxinerama-dev build-essential libxrandr-dev policykit-1-gnome dbus-x11 -y >> logs/dotfiles.log # Policykit is for graphic authentication. Not needed for the DE itself; dbux-x11 is needed for some apps like Steam, also not required for the DE.
sudo apt-get install libx11-dev libxft-dev libxinerama-dev build-essential libxrandr-dev policykit-1-gnome dbus-x11 -y &>> logs/dotfiles.log # Policykit is for graphic authentication. Not needed for the DE itself; dbux-x11 is needed for some apps like Steam, also not required for the DE.
dialogDotfiles 30 5 5 7 4 4 4 4 4 4
# Audio
sudo apt-get install pipewire-audio wireplumber pipewire-pulse pipewire-alsa -y >> logs/dotfiles.log
systemctl --user --now enable wireplumber.service >> logs/dotfiles.log
sudo apt-get install pipewire-audio wireplumber pipewire-pulse pipewire-alsa -y &>> logs/dotfiles.log
systemctl --user --now enable wireplumber.service &>> logs/dotfiles.log
dialogDotfiles 45 5 5 5 7 4 4 4 4 4
# Network
sudo apt-get install network-manager -y >> logs/dotfiles.log
sudo apt-get install network-manager -y &>> logs/dotfiles.log
sudo systemctl enable NetworkManager >> logs/dotfiles.log 2> logs/dotfiles.iwd.log
dialogDotfiles 60 5 5 5 5 7 4 4 4 4
# Firefox
sudo apt-get install firefox-esr -y >> logs/dotfiles.log
sudo apt-get install firefox-esr -y &>> logs/dotfiles.log
dialogDotfiles 75 5 5 5 5 5 7 4 4 4
# Neovim
sudo apt-get install -y ninja-build gettext cmake unzip curl build-essential
git clone https://github.com/neovim/neovim --depth 1
cd neovim
git checkout stable
make CMAKE_BUILD_TYPE=RelWithDebInfo
sudo make install
cd ..
rm -rf neovim
dialogDotfiles 80 5 5 5 5 5 5 7 4 4
{
sudo apt-get install -y ninja-build gettext cmake unzip curl build-essential
git clone https://github.com/neovim/neovim --depth 1 2>/dev/null
cd neovim
git checkout stable
make CMAKE_BUILD_TYPE=RelWithDebInfo
sudo make install
cd ..
rm -rf neovim
dialogDotfiles 80 5 5 5 5 5 5 7 4 4
} | dialog --backtitle "$BACKTITLE" --programbox "Compile Neovim" 30 90
# Utilities
sudo apt-get install htop fzf tmux git vim wget curl feh scrot dunst -y >> logs/dotfiles.log
sudo apt-get install htop fzf tmux git vim wget curl feh scrot dunst -y &>> logs/dotfiles.log
dialogDotfiles 85 5 5 5 5 5 5 5 7 4
# Compile
@@ -190,7 +192,7 @@ for selection in $main_menu; do
dialogDotfiles 95 5 5 5 5 5 5 5 5 7
# Copy configs | end
cp -vrf dotfiles/.* $HOME >> logs/dotfiles.log
cp -vrf dotfiles/.* $HOME &>> logs/dotfiles.log
fc-cache -f
dialogDotfiles 100 5 5 5 5 5 5 5 5 5
fi

View File

@@ -4,7 +4,7 @@
const unsigned int interval = 1000;
/* text to show if no value can be retrieved */
static const char unknown_str[] = "??";
static const char unknown_str[] = "";
/* maximum output string length */
#define MAXLEN 2048
@@ -63,11 +63,16 @@ static const char unknown_str[] = "??";
* wifi_essid WiFi ESSID interface name (wlan0)
* wifi_perc WiFi signal in percent interface name (wlan0)
*/
static const struct arg args[] = {
/* function format argument */
{ wifi_essid, " %s", "wlan0" },
{ wifi_perc, "(%s%%) ", "wlan0" },
{ wifi_essid, "%s", "wlo1" },
{ wifi_perc, "(%s", "wlan0" },
{ wifi_perc, "%s%%) ", "wlo1" },
{ battery_perc, "󰂉 %s%% ", "BAT0" },
{ run_command, " %s%% ", "wpctl get-volume @DEFAULT_AUDIO_SINK@ | cut -c 11-" },
{ cpu_perc, " %s%% ", NULL },

View File

@@ -4,7 +4,7 @@
const unsigned int interval = 1000;
/* text to show if no value can be retrieved */
static const char unknown_str[] = "??";
static const char unknown_str[] = "";
/* maximum output string length */
#define MAXLEN 2048
@@ -63,11 +63,16 @@ static const char unknown_str[] = "??";
* wifi_essid WiFi ESSID interface name (wlan0)
* wifi_perc WiFi signal in percent interface name (wlan0)
*/
static const struct arg args[] = {
/* function format argument */
{ wifi_essid, " %s", "wlan0" },
{ wifi_perc, "(%s%%) ", "wlan0" },
{ wifi_essid, "%s", "wlo1" },
{ wifi_perc, "(%s", "wlan0" },
{ wifi_perc, "%s%%) ", "wlo1" },
{ battery_perc, "󰂉 %s%% ", "BAT0" },
{ run_command, " %s%% ", "wpctl get-volume @DEFAULT_AUDIO_SINK@ | cut -c 11-" },
{ cpu_perc, " %s%% ", NULL },

Binary file not shown.