From a9db31c3a20fd3db01c747341d8ac591887ca920 Mon Sep 17 00:00:00 2001 From: TrudeEH Date: Sat, 22 Jun 2024 14:31:39 +0100 Subject: [PATCH] Add wifi interface --- install.sh | 46 +++++++++++++++++---------------- programs/slstatus/config.def.h | 9 +++++-- programs/slstatus/config.h | 9 +++++-- programs/slstatus/slstatus | Bin 31872 -> 31872 bytes 4 files changed, 38 insertions(+), 26 deletions(-) diff --git a/install.sh b/install.sh index 93052312..b04af68d 100755 --- a/install.sh +++ b/install.sh @@ -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 diff --git a/programs/slstatus/config.def.h b/programs/slstatus/config.def.h index 281adbec..d0def86c 100644 --- a/programs/slstatus/config.def.h +++ b/programs/slstatus/config.def.h @@ -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 }, diff --git a/programs/slstatus/config.h b/programs/slstatus/config.h index 281adbec..d0def86c 100644 --- a/programs/slstatus/config.h +++ b/programs/slstatus/config.h @@ -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 }, diff --git a/programs/slstatus/slstatus b/programs/slstatus/slstatus index b094f6bf6f9254f0bc03351f14136ab6261abb37..a6c529455dd6ec2b5117480b79539a4d929f4ac3 100755 GIT binary patch delta 2252 zcmZ{m3rrMO6o%(46lRsjE+q_$3X4csun3e8&{l=0(Z*WPrsd7N%9=Kn zHnlDsOssujqp8Lk#WksI(iDxR)Y9ZmYt3tQK=*jykW4TM@s?5dWEG<=t)Yhx=M1k^*gA&1!=FcOg(UC!XEhAB6=`LPE8TH{l&*QWP5Y z*_1-L%^plAe6oE`Anouin6Z+mk-tn#n;eA17G>Ohe#`zb-=)MfqNzS>QV7xK9P4n< zTfEqjOUt;$kxVJRLyk9yT)t^3on{K--pp9)_1(;To5;uav!?KttZJI+yPx%Oyu7}8 zO@`!1tm97$D`hY-G1+eChlMerTGAsEuNTJ_MKzE7AcSm^B)Lb3bTArRI7yPadxaRp zi{IHN#1i;Z`-Sj;t>9N+%773f;QdoVI56DS(?YnwUa%fqaYl$e;6AV$yaoEFZU04x z5G>vx_*9_OEX5BBQ2<8;SPOm#dcmq8A+CUR;5gU>TAq-kW1s^ZIE#tEE$1--cn%x} zS6;vbsL&{w12$h2q6It-c7Qp*3UM5)2hRtgqUT{qIKkEqqXRg4Nr-pAX_tlg1grxO zgS){V@ESM*&iV~2hj(T_m<}EXmw@|IHqhmd3bJF z9PQ%rvIP2(H^IKjJImrscTe%LvK6UKC@S{E#1)BW2nt#EFP~rV`)9!aD(96e)W*f- z`Lu%fmgmQOhtj{`4_O$NZh9_EcEG%Y$Uo2Uyo%{&f76Zv=d-mUfn60c?c=J7eA_MT zkVR@YyD2wJw!=P*xT)MW=f9m(On;r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