extract sway env vars setup in it's own script
This commit is contained in:
parent
ee27de120c
commit
f9ff65c783
|
@ -0,0 +1,34 @@
|
||||||
|
#!/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
|
||||||
|
}
|
||||||
|
|
||||||
|
export XDG_SESSION_TYPE=wayland
|
||||||
|
|
||||||
|
# GTK
|
||||||
|
export CLUTTER_BACKEND=wayland
|
||||||
|
export GTK_CSD=0
|
||||||
|
if [[ -f /usr/lib/libgtk3-nocsd.so.0 ]]; then
|
||||||
|
export LD_PRELOAD=/usr/lib/libgtk3-nocsd.so.0
|
||||||
|
fi
|
||||||
|
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
|
||||||
|
export SDL_VIDEODRIVER=wayland
|
||||||
|
|
||||||
|
exec /usr/bin/sway $@
|
|
@ -1,5 +1,5 @@
|
||||||
# PATH
|
# PATH
|
||||||
export PATH="$PATH:$HOME/.local/bin:$HOME/bin"
|
export PATH="$HOME/bin:$HOME/.local/bin:$PATH"
|
||||||
|
|
||||||
# applications
|
# applications
|
||||||
export TERMINAL=termite
|
export TERMINAL=termite
|
||||||
|
|
16
files/.zshrc
16
files/.zshrc
|
@ -1,20 +1,6 @@
|
||||||
# Autostart sway if we are on tty1
|
# Autostart sway if we are on tty1
|
||||||
if [ -z "$WAYLAND_DISPLAY" ] && [ "$(tty)" = "/dev/tty1" ]; then
|
if [ -z "$WAYLAND_DISPLAY" ] && [ "$(tty)" = "/dev/tty1" ]; then
|
||||||
export XDG_SESSION_TYPE=wayland
|
exec ~/.local/bin/sway
|
||||||
|
|
||||||
# SDL
|
|
||||||
export SDL_VIDEODRIVER=wayland
|
|
||||||
|
|
||||||
# Elementary/EFL
|
|
||||||
export ECORE_EVAS_ENGINE=wayland_egl
|
|
||||||
export ELM_ENGINE=wayland_egl
|
|
||||||
|
|
||||||
# FIXME: This is a workaround
|
|
||||||
# see: https://github.com/swaywm/wlroots/pull/1344
|
|
||||||
#export WLR_DRM_NO_ATOMIC=1
|
|
||||||
#export WLR_DRM_NO_ATOMIC_GAMMA=1
|
|
||||||
|
|
||||||
exec sway -d -V &>~/sway.log
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue