This repository has been archived on 2024-03-28. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles/bin/lib/sudo_setup

33 lines
941 B
Plaintext
Raw Normal View History

2018-11-08 09:34:17 -06:00
#!/usr/bin/env bash
# TODO: ascii art header
if [[ $UID -ne 0 ]]; then
echo "Re-running with 'sudo -E'..."
sudo -E "$0" "$@"
exit
fi
dfp=$(cd "$(dirname "${BASH_SOURCE[0]}" )/../../" && pwd)
source "${dfp}/bin/lib/setup_helpers.bash"
2018-11-08 09:34:17 -06:00
links=(
2019-09-24 08:51:02 -05:00
# display manager files
2020-01-16 13:28:23 -06:00
"$dfp/apps/de/sway/init" "/usr/bin/sway-lytedev"
"$dfp/apps/de/sway/dm-entry" "/usr/share/wayland-sessions/sway-lytedev.desktop"
2019-09-24 08:51:02 -05:00
# touchpad
2020-01-16 13:28:23 -06:00
"$dfp/apps/de/libinput/touchpad.conf" "/etc/X11/xorg.conf.d/41-libinput-lytedev-touchpad-options.conf"
# udev rules
"$dfp/apps/udev-rules/lowbat" "/etc/udev/rules.d/99-lowbat.rules"
# TODO: laptop-specific setup?
"$dfp/apps/udev-rules/wifi-powersave" "/etc/udev/rules.d/81-wifi-powersave.rules"
# tmpfiles
"$dfp/apps/tmpfiles/disable-lid-wakeup" "/etc/tmpfiles.d/disable-lid-wakeup.conf"
2018-11-08 09:34:17 -06:00
)
_dotfiles_setup_run_setup "$dfp/.agreed-to-erasing-root-files.lock" "${links[@]}"