From 0f3a6673290d4635f6a5de75e2751e4be541f773 Mon Sep 17 00:00:00 2001 From: LordMZTE Date: Sat, 21 Jan 2023 19:09:24 +0100 Subject: [PATCH] try out wezterm --- .config/i3/config.cgt | 2 +- .config/river/{init => init.cgt} | 4 +- .config/wezterm/wezterm.lua.cgt | 69 ++++++++++++++++++++++++++++++++ cg_opts.lua | 2 + 4 files changed, 74 insertions(+), 3 deletions(-) rename .config/river/{init => init.cgt} (98%) create mode 100644 .config/wezterm/wezterm.lua.cgt diff --git a/.config/i3/config.cgt b/.config/i3/config.cgt index ab9a4f9..e70be66 100644 --- a/.config/i3/config.cgt +++ b/.config/i3/config.cgt @@ -46,7 +46,7 @@ bindsym XF86Calculator exec qalculate-gtk floating_modifier $mod # start a terminal -bindsym $mod+Return exec TERMINAL=alacritty i3-sensible-terminal +bindsym $mod+Return exec TERMINAL=<% opt.term_command %> i3-sensible-terminal # open thunar bindsym $mod+Ctrl+e exec thunar diff --git a/.config/river/init b/.config/river/init.cgt similarity index 98% rename from .config/river/init rename to .config/river/init.cgt index 83e6ec5..ba01a85 100755 --- a/.config/river/init +++ b/.config/river/init.cgt @@ -10,8 +10,8 @@ # Note: the "Super" modifier is also known as Logo, GUI, Windows, Mod4, etc. -# Super+Return to start an instance of alacritty -riverctl map normal Super+Shift Return spawn alacritty +# Super+Return to start a terminal +riverctl map normal Super+Shift Return spawn <% opt.term_command %> # Super+Q to close the focused view riverctl map normal Super Q close diff --git a/.config/wezterm/wezterm.lua.cgt b/.config/wezterm/wezterm.lua.cgt new file mode 100644 index 0000000..8264e07 --- /dev/null +++ b/.config/wezterm/wezterm.lua.cgt @@ -0,0 +1,69 @@ +local wt = require "wezterm" + +return { + color_scheme = "Dracula (Official)", + font = wt.font "<% opt.term_font %>", + window_background_opacity = 0.8, + + disable_default_key_bindings = true, + leader = { key = "a", mods = "CTRL", timeout_milliseconds = 2000 }, + keys = { + -- splitting + { + key = "h", + mods = "LEADER", + action = wt.action.SplitVertical {}, + }, + { + key = "v", + mods = "LEADER", + action = wt.action.SplitHorizontal {}, + }, + + -- switching panes + { + key = "h", + mods = "ALT", + action = wt.action.ActivatePaneDirection "Left", + }, + { + key = "j", + mods = "ALT", + action = wt.action.ActivatePaneDirection "Down", + }, + { + key = "k", + mods = "ALT", + action = wt.action.ActivatePaneDirection "Up", + }, + { + key = "l", + mods = "ALT", + action = wt.action.ActivatePaneDirection "Right", + }, + + -- tabs + { + key = "t", + mods = "CTRL|SHIFT", + action = wt.action.SpawnTab "CurrentPaneDomain", + }, + { + key = "t", + mods = "CTRL", + action = wt.action.ActivateTabRelative(1), + }, + + -- font size + { + key = "+", + mods = "CTRL", + action = wt.action.IncreaseFontSize, + }, + { + key = "-", + mods = "CTRL", + action = wt.action.DecreaseFontSize, + }, + }, +} diff --git a/cg_opts.lua b/cg_opts.lua index d0d2bbe..413a432 100644 --- a/cg_opts.lua +++ b/cg_opts.lua @@ -3,4 +3,6 @@ local opts = {} opts.font = "Iosevka Nerd Font" opts.term_font = "Iosevka Term Nerd Font Mono" +opts.term_command = "wezterm" + return opts