Skip to content

Instantly share code, notes, and snippets.

@ptrcnull
Last active April 12, 2022 12:17
Show Gist options
  • Save ptrcnull/231a4d93f3d288ac68dacfbfebadb22e to your computer and use it in GitHub Desktop.
Save ptrcnull/231a4d93f3d288ac68dacfbfebadb22e to your computer and use it in GitHub Desktop.
small sway launcher
#!/bin/sh
export XDG_RUNTIME_DIR=/tmp/run-1000
mkdir -p $XDG_RUNTIME_DIR
chown patrycja:patrycja $XDG_RUNTIME_DIR
chmod 700 $XDG_RUNTIME_DIR
export MOZ_ENABLE_WAYLAND=1
export LANG="en_IE.UTF-8"
export QT_QPA_PLATFORM=wayland
export _JAVA_AWT_WM_NONREPARENTING=1
export PATH="$PATH:$HOME/.local/bin"
rm -f $XDG_RUNTIME_DIR/bus
export DBUS_SESSION_BUS_ADDRESS=unix:path=$XDG_RUNTIME_DIR/bus
dbus-daemon --session --address=$DBUS_SESSION_BUS_ADDRESS &
mkdir -p ~/.local/var/log
sway $@ 2>&1 | tee -a ~/.local/var/log/sway.log
# fallback shell
exec zsh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment