Skip to content

Instantly share code, notes, and snippets.

@ISSOtm
Created September 20, 2022 19:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ISSOtm/707061992cb42a507d6020f86e6fd143 to your computer and use it in GitHub Desktop.
Save ISSOtm/707061992cb42a507d6020f86e6fd143 to your computer and use it in GitHub Desktop.
Wrapper to make Firefox respect the current theme (e.g. under i3 or Wayland)
#!/bin/bash
# Start Firefox, enforcing the global theme
export GTK_THEME="${GTK_THEME:-"$(xfconf-query -c xsettings -p /Net/ThemeName)"}"
if [[ "$XDG_SESSION_TYPE" = wayland ]]; then
export MOZ_ENABLE_WAYLAND=1
fi
exec "$(type -a "$(basename "$0")" | grep -Fv "$(realpath "$0")" | head -n 1 | cut -d ' ' -f 3)" "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment