Skip to content

Instantly share code, notes, and snippets.

@gajaza
Last active March 9, 2024 15:26
Show Gist options
  • Save gajaza/57846681c254849baa20874ab26da124 to your computer and use it in GitHub Desktop.
Save gajaza/57846681c254849baa20874ab26da124 to your computer and use it in GitHub Desktop.

Change the Default Terminal in i3wm

To change the default terminal, you can modify the order in the /usr/bin/i3-sensible-terminal file:

- for terminal in "$TERMINAL" x-terminal-emulator mate-terminal gnome-terminal terminator xfce4-terminal urxvt rxvt termit Eterm aterm uxterm xterm roxterm termite lxterminal terminology st qterminal lilyterm tilix terminix konsole kitty guake tilda alacritty hyper wezterm; do
+ for terminal in "$TERMINAL" kitty alacritty x-terminal-emulator mate-terminal gnome-terminal terminator xfce4-terminal urxvt rxvt termit Eterm aterm uxterm xterm roxterm termite lxterminal terminology st qterminal lilyterm tilix terminix konsole kitty guake tilda alacritty hyper wezterm; do

    if command -v "$terminal" > /dev/null 2>&1; then
      exec "$terminal" "$@"
    fi
done

Here, kitty and alacritty has been set to take precedence over the other terminal emulators (x-terminal-emulator, mate-terminal, etc.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment