Files
hlwm-config/autostart
2018-10-25 21:10:13 +02:00

51 lines
873 B
Bash
Executable File

#!/usr/bin/env bash
exec 2>&1 > >(tee -i /tmp/hlwm-autostart.log)
PIDS_FILE=/tmp/hlwm-autostart-pids
hc() {
herbstclient "$@"
}
store_pid() {
echo $! >> $PIDS_FILE
}
cd $(dirname $0)
source ./gruvbox_colors.sh
OLD_PIDS=$(cat $PIDS_FILE)
kill $(echo $OLD_PIDS)
rm $PIDS_FILE
hc emit_hook reload
./wallpaper.sh
./bindings.sh
./rules.sh
./styling.sh
hc set tree_style '╾│ ├└╼─┐'
hc unlock
hc detect_monitors
panel_height=20
statusbar_height=20
for monitor in $(hc list_monitors | cut -d: -f1) ; do
# start it on each monitor
hc pad $monitor $panel_height 0 $statusbar_height 0
./panel.py $monitor & store_pid
./statusbar.sh $monitor & store_pid
done
./tray.sh & store_pid
udiskie --tray & store_pid
systemctl --user restart sxhkd
systemctl --user restart xautolock
systemctl --user restart battery-warning.timer
wmname LG3D