]> git.madduck.net Git - etc/xsession.git/commitdiff

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

add alacritty wrapper master
authormartin f. krafft <madduck@madduck.net>
Mon, 28 Apr 2025 11:27:18 +0000 (13:27 +0200)
committermartin f. krafft <madduck@madduck.net>
Mon, 28 Apr 2025 11:27:18 +0000 (13:27 +0200)
.bin/x-terminal-emulator

index e72642e0073ddabacf984eaa1dda2f9637890792..03f87f556b2522b859b93ef9f88d1bd1f00a9471 100755 (executable)
@@ -43,8 +43,31 @@ kitty_args() {
   echo $args
 }
 
+alacritty_args() {
+  # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1103347
+  local arg rest=0
+  local args=
+  for arg in "$@"; do
+    if [ $rest = 0 ]; then
+      case "$arg" in
+      -help | --help)
+        echo $arg
+        break
+        ;;
+      -name) arg="--class" ;;
+      -hold | -title) arg="-$arg" ;;
+      -cd) arg="--working-directory" ;;
+      -e | --) rest=1 ;;
+      esac
+    fi
+    args="$args $arg"
+  done
+  echo $args
+}
+
 case "$(readlink -f $xterm)" in
 */kitty) set -- $(kitty_args "$@") ;;
+*/alacritty) set -- $(alacritty_args "$@") ;;
 esac
 
 exec $xterm "$@"