2022-07-30 02:15:33 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# startup apps
|
2022-09-08 16:16:51 +00:00
|
|
|
# ! /bin/pgrep nextcloud && nextcloud &
|
2022-07-30 02:15:33 +00:00
|
|
|
! /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 &
|
2022-07-30 02:15:33 +00:00
|
|
|
|
|
|
|
# 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
|
|
|
|
|
2022-07-30 02:15:33 +00:00
|
|
|
# fix pulseaudio echo-cancel side effect
|
|
|
|
pactl set-source-volume @DEFAULT_SOURCE@ 100%
|
2022-09-03 09:04:47 +00:00
|
|
|
|
|
|
|
|
2022-09-07 01:06:12 +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
|
|
|
|
|