dotfiles/gui/awesome/autostart

46 lines
1.3 KiB
Plaintext
Raw Normal View History

#!/bin/sh
# startup apps
2022-09-08 16:16:51 +00:00
# ! /bin/pgrep nextcloud && nextcloud &
! /bin/pgrep flameshot && flameshot &
! /bin/pgrep nm-applet && nm-applet &
! /bin/pgrep copyq && copyq &
2022-09-08 13:52:08 +00:00
! /bin/pgrep syncthing && syncthing &
2022-09-03 09:04:47 +00:00
# ! /bin/pgrep -f "lua virtcam.lua" && cd ~/dotfiles/gui/virtcam && lua virtcam.lua &
# input method
ibus-daemon -drx
# turn bluetooth power on
bluetoothctl power on
# export X variable for cronjob to send notification
echo DBUS_SESSION_BUS_ADDRESS=$DBUS_SESSION_BUS_ADDRESS > ~/.cron.env
echo DISPLAY=$DISPLAY >> ~/.cron.env
# adjust brightness in battery mode
grep -F 0 /sys/class/power_supply/ACAD/online && sudo light -S 30
# prioritize hdmi output
HDMI_SINK=$(pactl list short sinks | awk '{print $2}' | grep hdmi)
if [ -n "$HDMI_SINK" ]; then
pactl set-default-sink "$HDMI_SINK"
fi
2022-10-23 14:34:14 +00:00
# prioritize condense microphone input
CONDENSER_SOURCE=$(pactl list short sources | awk '{print $2}' | grep Condenser)
if [ -n "$CONDENSER_SOURCE" ]; then
pactl set-default-source "$CONDENSER_SOURCE"
fi
# fix pulseaudio echo-cancel side effect
pactl set-source-volume @DEFAULT_SOURCE@ 100%
2022-09-03 09:04:47 +00:00
DOW=$(date +%u)
HOD=$(date +%k)
[ "$DOW" -ge 1 ] && [ "$DOW" -le 5 ] \
&& [ "$HOD" -ge 8 ] && [ "$HOD" -le 20 ] \
&& gpg -d "$(ls ~/.password-store/*.gpg | head -n 1)" > /dev/null