Compare commits

...

2 Commits

Author SHA1 Message Date
6a0dfeba25 Keep sudo active during script 2023-05-22 20:20:17 +02:00
7822fc15ca if statement around .fehbg 2023-05-22 20:19:08 +02:00

View File

@ -1,11 +1,22 @@
#!/usr/bin/env bash
set -euo pipefail
# function to keep sudo from timing out
function func_dont_timeout {
while true; do
sudo -v
sleep 60
done
}
# check if user is root
if [ "$EUID" -ne 0 ]; then
sudo -v
fi
# keep sudo active in background
func_dont_timeout &
cat <<EOF
############################################################
###################### INSTALL CONFIG ######################
@ -473,7 +484,9 @@ if [[ -f "$HOME/.Xresources" ]]; then
fi
# execute feh
"$HOME/.fehbg"
if [[ -f "$HOME/.fehbg" ]]; then
"$HOME/.fehbg"
fi
if ps aux | grep -E "\si3(\s|$)" &>/dev/null; then
i3-msg restart 1>/dev/null