mirror of
https://github.com/basecamp/omarchy.git
synced 2026-02-17 15:25:37 +00:00
Compare commits
2 Commits
4fadf666e6
...
e4b7372666
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e4b7372666 | ||
|
|
a30448ceec |
@@ -59,11 +59,7 @@ sudo mkdir -p /etc/mkinitcpio.conf.d
|
||||
echo "Adding resume hook to $MKINITCPIO_CONF"
|
||||
echo "HOOKS+=(resume)" | sudo tee "$MKINITCPIO_CONF" >/dev/null
|
||||
|
||||
# Configure suspend-then-hibernate
|
||||
echo "Configuring suspend-then-hibernate"
|
||||
sudo mkdir -p /etc/systemd/logind.conf.d /etc/systemd/sleep.conf.d /usr/lib/systemd/system-sleep
|
||||
sudo cp "$OMARCHY_PATH/default/systemd/lid.conf" /etc/systemd/logind.conf.d/
|
||||
sudo cp "$OMARCHY_PATH/default/systemd/hibernate.conf" /etc/systemd/sleep.conf.d/
|
||||
# Ensure keyboard backlight doesn't prevent sleep
|
||||
sudo cp -p "$OMARCHY_PATH/default/systemd/system-sleep/keyboard-backlight" /usr/lib/systemd/system-sleep/
|
||||
|
||||
# Use ACPI alarm for RTC wakeup on s2idle systems (needed for suspend-then-hibernate)
|
||||
|
||||
@@ -90,13 +90,19 @@ img2png() {
|
||||
|
||||
# SSH Port Forwarding Functions
|
||||
fip() {
|
||||
[[ -z "$1" || -z "$2" ]] && echo "Usage: fip <port> <host>" && return 1
|
||||
ssh -f -N -L "$1:localhost:$1" "$2" && echo "Forwarding localhost:$1 -> $2:$1"
|
||||
[[ $# -lt 2 ]] && echo "Usage: fip <host> <port1> [port2] ..." && return 1
|
||||
local host="$1"
|
||||
shift
|
||||
for port in "$@"; do
|
||||
ssh -f -N -L "$port:localhost:$port" "$host" && echo "Forwarding localhost:$port -> $host:$port"
|
||||
done
|
||||
}
|
||||
|
||||
dip() {
|
||||
[[ -z "$1" ]] && echo "Usage: dip <port>" && return 1
|
||||
pkill -f "ssh.*-L $1:localhost:$1" && echo "Stopped forwarding port $1" || echo "No forwarding on port $1"
|
||||
[[ $# -eq 0 ]] && echo "Usage: dip <port1> [port2] ..." && return 1
|
||||
for port in "$@"; do
|
||||
pkill -f "ssh.*-L $port:localhost:$port" && echo "Stopped forwarding port $port" || echo "No forwarding on port $port"
|
||||
done
|
||||
}
|
||||
|
||||
lip() {
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
[Sleep]
|
||||
HibernateDelaySec=90min
|
||||
SuspendEstimationSec=0
|
||||
@@ -1,2 +0,0 @@
|
||||
[Login]
|
||||
HandleLidSwitch=suspend-then-hibernate
|
||||
Reference in New Issue
Block a user