mirror of
https://github.com/swaywm/sway.git
synced 2026-04-29 06:46:22 -04:00
Replace urxvt in default config with a simple terminal chooser
This commit is contained in:
parent
ba96983bf0
commit
35636ce4d2
3 changed files with 54 additions and 1 deletions
|
|
@ -14,7 +14,7 @@ set $down j
|
|||
set $up k
|
||||
set $right l
|
||||
# Your preferred terminal emulator
|
||||
set $term urxvt
|
||||
set $term swayterm
|
||||
# Your preferred application launcher
|
||||
# Note: it's recommended that you pass the final command to sway
|
||||
set $menu dmenu_path | dmenu | xargs swaymsg exec
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ add_project_arguments(
|
|||
cc = meson.get_compiler('c')
|
||||
|
||||
is_freebsd = host_machine.system().startswith('freebsd')
|
||||
bindir = get_option('bindir')
|
||||
datadir = get_option('datadir')
|
||||
sysconfdir = get_option('sysconfdir')
|
||||
prefix = get_option('prefix')
|
||||
|
|
@ -187,6 +188,8 @@ install_data(
|
|||
install_dir: datadir + '/wayland-sessions'
|
||||
)
|
||||
|
||||
install_data('swayterm', install_dir: bindir)
|
||||
|
||||
if get_option('default-wallpaper')
|
||||
wallpaper_files = files(
|
||||
'assets/Sway_Wallpaper_Blue_768x1024.png',
|
||||
|
|
|
|||
50
swayterm
Executable file
50
swayterm
Executable file
|
|
@ -0,0 +1,50 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# This file is in the public domain. It is based on i3-sensible-terminal.
|
||||
#
|
||||
# Find a terminal emulator among the list of known ones. Prefer user
|
||||
# default ($TERMINAL), system default (x-terminal-emulator on Debian)
|
||||
# then Wayland-native with few dependencies.
|
||||
#
|
||||
# See also https://lists.freedesktop.org/archives/xdg/2015-October/013583.html
|
||||
|
||||
KNOWN_TERMINALS='
|
||||
alacritty
|
||||
sakura
|
||||
termite
|
||||
termit
|
||||
tilix
|
||||
kitty
|
||||
cool-retro-term
|
||||
qterminal
|
||||
roxterm
|
||||
xfce4-terminal
|
||||
pantheon-terminal
|
||||
terminology
|
||||
gnome-terminal
|
||||
mate-terminal
|
||||
konsole
|
||||
aminal
|
||||
evilvte
|
||||
mlterm
|
||||
lxterminal
|
||||
lilyterm
|
||||
terminator
|
||||
hyper
|
||||
mrxvt
|
||||
urxvt
|
||||
xterm
|
||||
st
|
||||
Eterm
|
||||
rxvt
|
||||
aterm
|
||||
'
|
||||
|
||||
for command in "$TERMINAL" x-terminal-emulator $KNOWN_TERMINALS; do
|
||||
if hash "$command" 2>/dev/null; then
|
||||
exec "$command" "$@"
|
||||
fi
|
||||
done
|
||||
|
||||
swaynag -m "${0##*/} could not find a terminal emulator. Please, \
|
||||
either install one, define \$TERMINAL or adjust Sway config."
|
||||
Loading…
Add table
Add a link
Reference in a new issue