aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2025-12-25 10:30:33 -0300
committerSilvio Rhatto <rhatto@riseup.net>2025-12-25 10:30:33 -0300
commite6379b5e2db43d8ca72f0e7313de45b63bfef9bc (patch)
tree7f1ddaebc1b598738f80cb67d94b8ff7e80c9b47
parent02ec79182beaaa134e3bb7d1184b7d4b989ebcea (diff)
downloadutils-x11-master.tar.gz
utils-x11-master.tar.bz2
terminal: run alacritty with LIBGL_ALWAYS_SOFTWARE=1HEADmaster
-rwxr-xr-xterminal17
1 files changed, 14 insertions, 3 deletions
diff --git a/terminal b/terminal
index abd4cd9..7e37c26 100755
--- a/terminal
+++ b/terminal
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
#
# Terminal emulator wrapper
#
@@ -75,9 +75,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