diff options
Diffstat (limited to '.config/zsh/zprofile')
-rw-r--r-- | .config/zsh/zprofile | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/.config/zsh/zprofile b/.config/zsh/zprofile index 16b64c6..3a9242f 100644 --- a/.config/zsh/zprofile +++ b/.config/zsh/zprofile @@ -1,17 +1,20 @@ #!/bin/zsh + . ~/.profile -[ -n "$TMUX" ] || [ -n "$TERMUX_VERSION" ] || [ "$SSH_CONNECTION" ] && +[ -n "$TMUX" ] || [ -n "$TERMUX_VERSION" ] || [ -n "$SSH_CONNECTION" ] && return on_ac_power="$(cat /sys/class/power_supply/ACAD/online)" -[ "$on_ac_power" = 0 ] && brightnessctl set 5% || brightnessctl set 20% +[ "$on_ac_power" = 0 ] && + brightnessctl set 5% || + brightnessctl set "$(<"${XDG_STATE_HOME:-$HOME/.local/state}/brightness")" case "$TTY" in /dev/tty1) command -V optimus-manager >/dev/null && [ "$on_ac_power" = 1 ] && { echo "Waiting for nvidia card to load up..." - until [ -e /dev/dri/card1 ]; do; sleep 0.1; done + until [ -e /dev/dri/card1 ]; do sleep 0.1; done } command -V startx >/dev/null && { pgrep startx || startx } ;; |