mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-20 03:50:37 +02:00
replace grep with rg
This commit is contained in:
parent
7acabc7ddf
commit
4560b92989
2 changed files with 9 additions and 7 deletions
|
@ -325,7 +325,7 @@ _full_system() {
|
||||||
_progress "97" "Adding texinfo and man-pages..."
|
_progress "97" "Adding texinfo and man-pages..."
|
||||||
pacman -S --noconfirm man-db man-pages texinfo >"${_LOG}" 2>&1 || exit 1
|
pacman -S --noconfirm man-db man-pages texinfo >"${_LOG}" 2>&1 || exit 1
|
||||||
_progress "98" "Checking kernel version..."
|
_progress "98" "Checking kernel version..."
|
||||||
_INSTALLED_KERNEL="$(pacman -Qi linux | rg 'Version.* (.*).(arch.*)' -r '$1-$2')"
|
_INSTALLED_KERNEL="$(pacman -Qi linux | rg -o 'Version.* (.*).(arch.*)' -r '$1-$2')"
|
||||||
if ! [[ "${_INSTALLED_KERNEL}" == "${_RUNNING_KERNEL}" ]]; then
|
if ! [[ "${_INSTALLED_KERNEL}" == "${_RUNNING_KERNEL}" ]]; then
|
||||||
_progress "99" "Skipping kernel module loading..."
|
_progress "99" "Skipping kernel module loading..."
|
||||||
else
|
else
|
||||||
|
|
|
@ -10,7 +10,7 @@ _configure_sway() {
|
||||||
echo "Configuring wallpaper..."
|
echo "Configuring wallpaper..."
|
||||||
sed -i -e 's|^output .*|output * bg /usr/share/archboot/grub/archboot-background.png fill|g' /etc/sway/config
|
sed -i -e 's|^output .*|output * bg /usr/share/archboot/grub/archboot-background.png fill|g' /etc/sway/config
|
||||||
echo "Configuring foot..."
|
echo "Configuring foot..."
|
||||||
if ! grep -q 'archboot colors' /etc/xdg/foot/foot.ini; then
|
if ! rg -q 'archboot colors' /etc/xdg/foot/foot.ini; then
|
||||||
cat <<EOF >> /etc/xdg/foot/foot.ini
|
cat <<EOF >> /etc/xdg/foot/foot.ini
|
||||||
# archboot colors
|
# archboot colors
|
||||||
[colors]
|
[colors]
|
||||||
|
@ -43,9 +43,9 @@ EOF
|
||||||
|
|
||||||
fi
|
fi
|
||||||
echo "Autostarting setup..."
|
echo "Autostarting setup..."
|
||||||
grep -q 'exec foot' /etc/sway/config ||\
|
rg -q 'exec foot' /etc/sway/config ||\
|
||||||
echo "exec foot -- /usr/bin/setup" >> /etc/sway/config
|
echo "exec foot -- /usr/bin/setup" >> /etc/sway/config
|
||||||
if ! grep -q firefox /etc/sway/config; then
|
if ! rg -q firefox /etc/sway/config; then
|
||||||
cat <<EOF >> /etc/sway/config
|
cat <<EOF >> /etc/sway/config
|
||||||
# from https://wiki.gentoo.org/wiki/Sway
|
# from https://wiki.gentoo.org/wiki/Sway
|
||||||
# automatic floating
|
# automatic floating
|
||||||
|
@ -85,7 +85,7 @@ EOF
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
echo "Configuring waybar..."
|
echo "Configuring waybar..."
|
||||||
if ! grep -q 'exec waybar' /etc/sway/config; then
|
if ! rg -q 'exec waybar' /etc/sway/config; then
|
||||||
# hide sway-bar
|
# hide sway-bar
|
||||||
sed -i '/position top/a mode invisible' /etc/sway/config
|
sed -i '/position top/a mode invisible' /etc/sway/config
|
||||||
# diable not usable plugins
|
# diable not usable plugins
|
||||||
|
@ -94,7 +94,7 @@ EOF
|
||||||
sed -i -e 's#"mpd", "idle_inhibitor", "pulseaudio",##g' /etc/xdg/waybar/config
|
sed -i -e 's#"mpd", "idle_inhibitor", "pulseaudio",##g' /etc/xdg/waybar/config
|
||||||
fi
|
fi
|
||||||
echo "Configuring wayvnc..."
|
echo "Configuring wayvnc..."
|
||||||
if ! grep -q wayvnc /etc/sway/config; then
|
if ! rg -q wayvnc /etc/sway/config; then
|
||||||
echo "address=0.0.0.0" > /etc/wayvnc
|
echo "address=0.0.0.0" > /etc/wayvnc
|
||||||
echo "exec wayvnc -C /etc/wayvnc &" >> /etc/sway/config
|
echo "exec wayvnc -C /etc/wayvnc &" >> /etc/sway/config
|
||||||
fi
|
fi
|
||||||
|
@ -110,8 +110,10 @@ _install_sway() {
|
||||||
}
|
}
|
||||||
|
|
||||||
_start_sway() {
|
_start_sway() {
|
||||||
|
# list available layouts:
|
||||||
|
# localectl list-x11-keymap-layouts
|
||||||
echo "MOZ_ENABLE_WAYLAND=1 QT_QPA_PLATFORM=wayland XDG_SESSION_TYPE=wayland \
|
echo "MOZ_ENABLE_WAYLAND=1 QT_QPA_PLATFORM=wayland XDG_SESSION_TYPE=wayland \
|
||||||
XKB_DEFAULT_LAYOUT=$(grep 'KEYMAP' /etc/vconsole.conf | cut -d '=' -f2 | sed -e 's#-.*##g') \
|
XKB_DEFAULT_LAYOUT=$(rg -o '^KEYMAP=(\w+)-' -r '$1' /etc/vconsole.conf) \
|
||||||
exec dbus-run-session sway >${_LOG} 2>&1" > /usr/bin/sway-wayland
|
exec dbus-run-session sway >${_LOG} 2>&1" > /usr/bin/sway-wayland
|
||||||
chmod 755 /usr/bin/sway-wayland
|
chmod 755 /usr/bin/sway-wayland
|
||||||
sway-wayland
|
sway-wayland
|
||||||
|
|
Loading…
Reference in a new issue