Skip to content

Commit

Permalink
Split out waybar start in sway
Browse files Browse the repository at this point in the history
  • Loading branch information
r3claimer committed Aug 22, 2024
1 parent fa5f825 commit 5ddcb7e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/wayland/compositor/sway/scripts/sway.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,13 @@ export LANG=en_US.UTF-8
#Check if waybar exists in .config
if [ ! -d "/storage/.config/waybar" ]; then
mkdir -p "/storage/.config/waybar"
mkdir -p "/storage/.config/waybar/hotkeys"
cp /etc/xdg/waybar/config.jsonc /storage/.config/waybar/config.jsonc
cp /etc/xdg/waybar/style.css /storage/.config/waybar/style.css
fi

#Check if waybar hotkeys exist in .config/waybar
if [ ! -d "/storage/.config/waybar/hotkeys" ]; then
mkdir -p "/storage/.config/waybar/hotkeys"
cp -rf /etc/xdg/waybar/hotkeys/* /storage/.config/waybar/hotkeys
cp -f /storage/.config/waybar/hotkeys/default-hotkeys /storage/.config/waybar/hotkeys/current-hotkeys
fi
Expand All @@ -23,6 +27,9 @@ if [ ! -z "$(lsmod | grep 'nvidia')" ]; then
SWAY_GPU_ARGS="--unsupported-gpu"
fi

# set waybar state at start
/usr/bin/show_waybar.sh

# start sway, even if no input devices are connected
export WLR_LIBINPUT_NO_DEVICES=1

Expand Down

0 comments on commit 5ddcb7e

Please sign in to comment.