1
0
Fork 0
dotfiles/home/dot_local/bin/executable_sway

58 lines
1.7 KiB
Plaintext
Raw Permalink Normal View History

2021-05-30 22:48:52 +00:00
#!/bin/bash
import-gsettings() {
# usage: import-gsettings <gsettings key>:<settings.ini key> <gsettings key>:<settings.ini key> ...
expression=""
for pair in "$@"; do
IFS=:; set -- $pair
expressions="$expressions -e 's:^$2=(.*)$:gsettings set org.gnome.desktop.interface $1 \1:e'"
done
IFS=
eval sed -E $expressions "${XDG_CONFIG_HOME:-$HOME/.config}"/gtk-3.0/settings.ini >/dev/null
}
2023-10-02 03:34:08 +00:00
# list DRM device priority
# Set intel graphics as lowest priority
# https://github.com/swaywm/sway/wiki#i-have-a-multi-gpu-setup-like-intelnvidia-or-intelamd-and-sway-does-not-start
2024-06-11 04:13:38 +00:00
export WLR_DRM_DEVICES="$(drm_info -j | jq --raw-output 'to_entries[] | [if .value.driver.desc == "Intel Graphics" then 1 else 0 end, .key] | @tsv' | sort | awk '{printf "%s:", $2}' | sed -e 's/:$//')"
2023-10-02 03:34:08 +00:00
2024-07-20 04:37:52 +00:00
# temporary fix
# # https://github.com/swaywm/sway/issues/4763
export WLR_DRM_NO_ATOMIC=1
2024-03-27 16:34:07 +00:00
# disable hardware cursor (cause mouse to stutter on my setup)
#export WLR_NO_HARDWARE_CURSORS=1
2021-05-30 22:48:52 +00:00
export XDG_CURRENT_DESKTOP=sway
export XDG_SESSION_TYPE=wayland
# Qt
#export DESKTOP_SESSION=gnome
2024-03-27 16:34:07 +00:00
#export QT_STYLE_OVERRIDE=gtk
#export QT_QPA_PLATFORMTHEME=gtk2
2021-05-30 22:48:52 +00:00
export QT_AUTO_SCREEN_SCALE_FACTOR=0
#export QT_QPA_PLATFORM=wayland-egl
export QT_WAYLAND_DISABLE_WINDOWDECORATION=1
# GTK
export CLUTTER_BACKEND=wayland
import-gsettings \
gtk-theme:gtk-theme-name \
icon-theme:gtk-icon-theme-name \
cursor-theme:gtk-cursor-theme-name
# Elementary/EFL
export ECORE_EVAS_ENGINE=wayland_egl
export ELM_ENGINE=wayland_egl
# SDL
2024-03-27 16:34:07 +00:00
#export SDL_VIDEODRIVER=wayland
2021-05-30 22:48:52 +00:00
# Java
export _JAVA_AWT_WM_NONREPARENTING=1
# Firefox
export MOZ_ENABLE_WAYLAND=1
export MOZ_DBUS_REMOTE=1
exec /usr/bin/sway $@