#!/bin/bash
#xset r rate 400 100
##emacs -fs &
rm -rf ~/.cache/fontconfig

# dbus-launch sxhkd &

#gpg-agent --server &
#feh --bg-fill ~/Pictures/monochrome.jpg

#single monitor wallpaper
source ~/.fehbg
#feh --randomize --bg-fill Pictures/wallpapers


# dual monitor 
#feh --bg-scale ~/Pictures/wallpapers/morning-wallpaper-cut1.jpg ~/Pictures/wallpapers/morning-wallpaper.-cut2.jpg # dual monitor 
#Pictures/wander1.png

#dbus-launch emacs --daemon &
#other
(sleep 1 && picom --config "$HOME/.config/picom.conf" )&
#(sleep 1 && keynav)&
# warped > keynav
(sleep 1 && warpd)&
(sleep 0 && ~/bin/keyboard ) &
killall wired
(sleep 1 && wired ) &
#(sleep 3 && optimus-manager-qt) &
(sleep 3 && flameshot) &

(sleep 4 && keepassxc) &
(sleep 6 && bspc rule -r KeePassXC ) &

(sleep 5 && syncthing -no-browser) &
#(sleep 5 && thunderbird ) &
(sleep 7 && bspc rule -r Thunderbird ) &

# Kill all davail instances before launching a single one
kill $(pgrep --full "davmail")
(sleep 5 && davmail ) &

# kill current session and if there is ones waiting to start lol
killall goimapnotify
(sleep 55 && killall goimapnotify) &

(sleep 6 && notify-send "STARTUP MSG" "Don't Forget to unlock keepassXC!") &

# start watching all mail dirs
# moved to file
  #for imapnotify_config in ~/Documents/passwords/*_imapnotify.json; do
  #  LOG_FILE=$(sed 's#/#_#g' <<< "$imapnotify_config" )
  #  (sleep 60 && goimapnotify -conf "$imapnotify_config" &> ~/.cache/"$LOG_FILE") &
  #done
~/bin/run_goimapnotify.sh &


#ibus-daemon &
#uim-toolbar-gtk3-systray & #uim Japanses Input

#if bspwm


#thunderbird &
#ibus-daemon -drx &
#syncthing-gtk -m &
#qbittorrent &

#~/bin/wm/download-wallpaper 
