waybox/data/autostart

38 lines
911 B
Text
Raw Normal View History

2022-02-22 20:29:04 -05:00
#
# These things are run when a Waybox Wayland session is started.
# Copy to $XDG_CONFIG_HOME/waybox/autostart to customize.
#
#
# Change from Openbox: the desktop environment's config tools should begin
# through autostart elements (e.g. /etc/xdg/autostart); there's no need to
# specify them here.
#
# Update the DBus environment
dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP XDG_SESSION_TYPE
# Start a dock
cairo-dock &
# Start a panel
(waybar || yambar) &
2022-02-24 11:00:25 -05:00
# Start a notification daemon
mako &
2022-02-22 20:29:04 -05:00
# Load a random wallpaper
oldifs=$IFS
IFS=:
2022-02-24 11:00:25 -05:00
data_dirs=${XDG_DATA_DIRS:-${datadir:-/usr/share}}:${XDG_DATA_HOME:-~/.local/share}
for data_dir in $data_dirs;
2022-02-22 20:29:04 -05:00
do
2022-02-24 11:00:25 -05:00
wpdir="$data_dir/wallpapers"
test -d "$wpdir" && \
find $wpdir -name '*.jpg' -o -name '*.png' -o -name '*.svg'
2022-02-22 20:29:04 -05:00
done | (shuf -n 1 || tail -n 1) | xargs swaybg -m fill -i &
IFS=$oldifs
# vim: ft=sh