From 2f1af8411adec6ae34d122dfb02b666ea3b4f097 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Thu, 16 Jan 2020 13:28:23 -0600 Subject: [PATCH] Stuff --- apps/de/sway/config | 2 +- apps/de/sway/init | 3 ++- apps/tmpfiles/disable-lid-wakeup | 1 + apps/udev-rules/lowbat | 2 ++ .../usb-device-plugin} | 0 apps/udev-rules/wifi-powersave | 1 + bin/lib/arch-linux/provisioning/3-extras.bash | 1 + bin/lib/sudo_setup | 14 +++++++++++--- 8 files changed, 19 insertions(+), 5 deletions(-) create mode 100644 apps/tmpfiles/disable-lid-wakeup create mode 100644 apps/udev-rules/lowbat rename apps/{de/udev-rules/90-usb-device-plugin.rules => udev-rules/usb-device-plugin} (100%) create mode 100644 apps/udev-rules/wifi-powersave diff --git a/apps/de/sway/config b/apps/de/sway/config index 4cd73a3..fa37494 100644 --- a/apps/de/sway/config +++ b/apps/de/sway/config @@ -13,7 +13,7 @@ set $menu dmenu_path | dmenu | xargs swaymsg exec -- output * bg $HOME/.wallpaper fill # TODO: configured displays? -# output eDP-1 res 3200x1800 pos 0 0 scale 2 +output eDP-1 res 3200x1800 pos 0 0 scale 2 # output DP-3 res 3440x1440 pos 1600 0 ### Input configuration diff --git a/apps/de/sway/init b/apps/de/sway/init index 714a829..1c58eaa 100755 --- a/apps/de/sway/init +++ b/apps/de/sway/init @@ -19,6 +19,7 @@ export MOZ_ENABLE_WAYLAND=1 # configuration flag for some of my dotfiles scripts export IS_WAYLAND=1 -exec mako +killall -9 dunst &> /dev/null +mako & sway diff --git a/apps/tmpfiles/disable-lid-wakeup b/apps/tmpfiles/disable-lid-wakeup new file mode 100644 index 0000000..9ded313 --- /dev/null +++ b/apps/tmpfiles/disable-lid-wakeup @@ -0,0 +1 @@ +w /proc/acpi/wakeup - - - - LID diff --git a/apps/udev-rules/lowbat b/apps/udev-rules/lowbat new file mode 100644 index 0000000..2077231 --- /dev/null +++ b/apps/udev-rules/lowbat @@ -0,0 +1,2 @@ +# Suspend the system when battery level drops to 3% or lower +SUBSYSTEM=="power_supply", ATTR{status}=="Discharging", ATTR{capacity}=="[0-5]", RUN+="/usr/bin/systemctl hibernate" diff --git a/apps/de/udev-rules/90-usb-device-plugin.rules b/apps/udev-rules/usb-device-plugin similarity index 100% rename from apps/de/udev-rules/90-usb-device-plugin.rules rename to apps/udev-rules/usb-device-plugin diff --git a/apps/udev-rules/wifi-powersave b/apps/udev-rules/wifi-powersave new file mode 100644 index 0000000..334068d --- /dev/null +++ b/apps/udev-rules/wifi-powersave @@ -0,0 +1 @@ +ACTION=="add", SUBSYSTEM=="net", KERNEL=="wl*", RUN+="/usr/bin/iw dev $name set power_save on" diff --git a/bin/lib/arch-linux/provisioning/3-extras.bash b/bin/lib/arch-linux/provisioning/3-extras.bash index 258e354..3f1bb24 100755 --- a/bin/lib/arch-linux/provisioning/3-extras.bash +++ b/bin/lib/arch-linux/provisioning/3-extras.bash @@ -11,6 +11,7 @@ fi pacaur --needed -S \ bluez bluz-libs bluez-utils bluez-tools \ pigz `# Multi-core gzipping` \ + iw `# WiFi Power Saving` \ arc-gtk-theme `# GTK Theme` \ elementary-icon-theme `# GUI File Explorer Icons` \ thunar thunar-volman gvfs `# GUI File Explorer + Volume Management/Auto-Mount Disks)` \ diff --git a/bin/lib/sudo_setup b/bin/lib/sudo_setup index aed4efc..795eac9 100755 --- a/bin/lib/sudo_setup +++ b/bin/lib/sudo_setup @@ -13,11 +13,19 @@ source "${dfp}/bin/lib/setup_helpers.bash" links=( # display manager files - "$dfp/apps/de/sway/init" "/usr/bin/sway-lytedev" - "$dfp/apps/de/sway/dm-entry" "/usr/share/wayland-sessions/sway-lytedev.desktop" + "$dfp/apps/de/sway/init" "/usr/bin/sway-lytedev" + "$dfp/apps/de/sway/dm-entry" "/usr/share/wayland-sessions/sway-lytedev.desktop" # touchpad - "$dfp/apps/de/libinput/touchpad.conf" "/etc/X11/xorg.conf.d/41-libinput-lytedev-touchpad-options.conf" + "$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" ) _dotfiles_setup_run_setup "$dfp/.agreed-to-erasing-root-files.lock" "${links[@]}"