diff options
Diffstat (limited to 'terminal')
| -rwxr-xr-x | terminal | 24 |
1 files changed, 21 insertions, 3 deletions
@@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Terminal emulator wrapper # @@ -35,6 +35,13 @@ fi #SH="bash --login -i -rcfile $HOME/.terminal" SH="zsh -i" +# Set a custom zsh config folder if commands are specified, to speed up startup +# Drawback is that any shell spawn from the command won't have any customization. +#if [ ! -z "$1" ]; then +# mkdir -p ~/.custom/terminal +# export ZDOTDIR="~/.custom/terminal" +#fi + # Dispatch if [ "$TERM" == "stterm" ]; then if [ ! -z "$1" ]; then @@ -75,9 +82,20 @@ elif [ "$TERM" == "xterm" ]; then xterm -u8 $FN_FONT -geometry $GEOMETRY -title $TITLE -e $SH fi elif [ "$TERM" == "alacritty" ]; then + # Run alacritty with LIBGL_ALWAYS_SOFTWARE to avoid glitches during startup + # or when switching windows and workspaces. + # + # Problem description: + # https://forum.endeavouros.com/t/weird-glitches-when-switching-workspaces-and-launching-windows/32862 + # https://github.com/alacritty/alacritty/issues/6680 + # + # Solution, sincel alacritty uses OpenGL: + # https://docs.mesa3d.org/envvars.html#envvar-LIBGL_ALWAYS_SOFTWARE + # https://superuser.com/questions/106056/force-software-based-opengl-rendering-on-ubuntu + # if [ ! -z "$1" ]; then - alacritty -e $SH -c "$*" + LIBGL_ALWAYS_SOFTWARE=1 alacritty -e $SH -c "$*" else - alacritty + LIBGL_ALWAYS_SOFTWARE=1 alacritty fi fi |
