From d5cbecbfe03a6d524b1d6563112f4d5d06c646fb Mon Sep 17 00:00:00 2001 From: Lucien Cartier-Tilet Date: Wed, 9 Nov 2022 15:29:42 +0100 Subject: [PATCH] [Bin] Better launch Wayland --- org/config/bin.org | 62 +++++++++++++++++++++++++++++++++++++++++++-- org/config/fish.org | 12 ++------- 2 files changed, 62 insertions(+), 12 deletions(-) diff --git a/org/config/bin.org b/org/config/bin.org index 6f6afdb..7c0e13a 100644 --- a/org/config/bin.org +++ b/org/config/bin.org @@ -2015,14 +2015,66 @@ CACHEFILE=$([ -n "$XDG_CACHE_HOME" ] && echo "$XDG_CACHE_HOME/wallpaper" || echo :PROPERTIES: :CUSTOM_ID: Wayland-3e7jdch05mj0 :END: +** Wayland Environment Variables Setup +:PROPERTIES: +:HEADER-ARGS: :shebang "#!/usr/bin/env sh" :mkdirp yes :tangle ~/.local/bin/way-env-setup +:CUSTOM_ID: WaylandWaylandEnvironmentVariablesSetup-ik05m461rmj0 +:END: +#+begin_src sh +#export GDK_BACKEND=wayland # May cause problems with some xorg applications +export TDESKTOP_DISABLE_GTK_INTEGRATION=1 +export CLUTTER_BACKEND=wayland +export BEMENU_BACKEND=wayland + +# Firefox +export MOZ_ENABLE_WAYLAND=1 + +# +# Qt environment +# +export QT_QPA_PLATFORM=wayland-egl #error with apps xcb +export QT_WAYLAND_FORCE_DPI=physical +export QT_WAYLAND_DISABLE_WINDOWDECORATION=1 + +# +# Elementary environment +# +export ELM_DISPLAY=wl +export ECORE_EVAS_ENGINE=wayland_egl +export ELM_ENGINE=wayland_egl +export ELM_ACCEL=opengl +# export ELM_SCALE=1 + +# +# SDL environment +# +export SDL_VIDEODRIVER=wayland + +# +# Java environment +# +export _JAVA_AWT_WM_NONREPARENTING=1 + +export NO_AT_BRIDGE=1 +export WINIT_UNIX_BACKEND=wayland +export DBUS_SESSION_BUS_ADDRESS +export DBUS_SESSION_BUS_PID +#+end_src + ** Hyprland :PROPERTIES: :HEADER-ARGS: :shebang "#!/usr/bin/env sh" :mkdirp yes :tangle ~/.local/bin/launch-hyprland :CUSTOM_ID: Hyprland-i1v993a05mj0 :END: #+begin_src sh -export MOZ_ENABLE_WAYLAND=1 export SDL_VIDEODRIVER=wayland +export XDG_SESSION_TYPE=wayland +export XDG_SESSION_DESKTOP=wlroots +export XDG_CURRENT_TYPE=wlroots +export XDG_CURRENT_DESKTOP=wlroots +. /etc/X11/xinit/xinitrc.d/50-systemd-user.sh +. way-env-setup +systemctl --user import-environment DISPLAY WAYLAND_DISPLAY XDG_CURRENT_DESKTOP exec Hyprland #+end_src @@ -2032,8 +2084,14 @@ exec Hyprland :HEADER-ARGS: :shebang "#!/usr/bin/env sh" :mkdirp yes :tangle ~/.local/bin/launch-newm :END: #+begin_src sh -export MOZ_ENABLE_WAYLAND=1 export SDL_VIDEODRIVER=wayland +export XDG_SESSION_TYPE=wayland +export XDG_SESSION_DESKTOP=wlroots +export XDG_CURRENT_TYPE=wlroots +export XDG_CURRENT_DESKTOP=wlroots +. /etc/X11/xinit/xinitrc.d/50-systemd-user.sh +. way-env-setup +systemctl --user import-environment DISPLAY WAYLAND_DISPLAY XDG_CURRENT_DESKTOP exec start-newm #+end_src diff --git a/org/config/fish.org b/org/config/fish.org index 661cf66..4ce4607 100644 --- a/org/config/fish.org +++ b/org/config/fish.org @@ -39,20 +39,12 @@ end :PROPERTIES: :CUSTOM_ID: Global_variables-1c84df8b :END: -The first thing I want to do is to load all variables from my -=~/.profile= file (which you can find [[https://labs.phundrak.com/phundrak/dotfiles/src/branch/master/.profile][here]]). The [[https://github.com/oh-my-fish/plugin-foreign-env][foreign-env]] plugin -comes in handy: +An important thing to do is to load all variables from my =~/.profile= +file (which you can find [[https://labs.phundrak.com/phundrak/dotfiles/src/branch/master/.profile][here]]). The [[https://github.com/oh-my-fish/plugin-foreign-env][foreign-env]] plugin comes in handy: #+begin_src fish fenv source ~/.profile #+end_src -Let’s start the Gnome keyring daemon. It will return a variable which must be set. -#+begin_src fish -if test -n "$DESKTOP_SESSION" - set -x (gnome-keyring-daemon --start | string split "=") -end -#+end_src - ** Development :PROPERTIES: :CUSTOM_ID: Global_variables-Development-76b3ff13