commit 090d3e1dd5c66460768f1959e59923e26d49145c
parent 261d56d343386e520a752281a671028e708960bc
Author: Sebastiano Tronto <sebastiano@tronto.net>
Date: Thu, 18 Jun 2026 18:37:36 +0200
mount umount no psw
Diffstat:
3 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/.profile b/.profile
@@ -42,7 +42,8 @@ alias e='doas ip link set eth1 up && doas udhcpc -i eth1 -n'
alias d='iwctl station wlan0 disconnect'
wm() {
iwctl station wlan0 get-networks | \
- grep '^ ' | sed 's/^ //' | sed 's/ .*//' | grep -v '^$' | \
+ uncolor | tail -n -4 | head -n -1 | \
+ grep -e '^ ' | sed 's/^ //' | sed 's/ .*//' | \
fzf | xargs iwctl station wlan0 connect
}
diff --git a/scripts/setup-config-alpine b/scripts/setup-config-alpine
@@ -62,7 +62,7 @@ doas mv "$tmp_xorg_file" /etc/X11/xorg.conf.d/40-libinput.conf
tmp_doas_file=$(mktemp)
cp /etc/doas.d/20-wheel.conf "$tmp_doas_file"
-for c in poweroff reboot ip udhcpc; do
+for c in poweroff reboot ip udhcpc mount umount; do
printf 'permit nopass :wheel as root cmd %s\n' "$c" >> "$tmp_doas_file"
done
doas cp "$tmp_doas_file" /etc/doas.d/20-wheel.conf
diff --git a/scripts/uncolor b/scripts/uncolor
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+# Removes ANSI color codes from its stdin, prints to stdout.
+# Source: https://stackoverflow.com/questions/17998978/removing-colors-from-output
+
+sed 's/\x1B\[[0-9;]\{1,\}[A-Za-z]//g'