Add wezterm setup
This commit is contained in:
parent
ceaec45f54
commit
76f102b21d
7 changed files with 87 additions and 68 deletions
|
|
@ -33,15 +33,32 @@
|
|||
state: touch
|
||||
mode: '0644'
|
||||
|
||||
- name: create alacritty configuration dir
|
||||
- name: create wezterm configuration dir
|
||||
file:
|
||||
path: '{{ xdg_config_dir }}/alacritty'
|
||||
path: '{{ xdg_config_dir }}/wezterm/includes'
|
||||
state: directory
|
||||
|
||||
- name: copy alacritty configuration
|
||||
- name: copy wezterm configuration files
|
||||
template:
|
||||
dest: '{{ xdg_config_dir }}/alacritty/alacritty.toml'
|
||||
src: 'templates/alacritty.j2'
|
||||
src: '{{ item.src }}'
|
||||
dest: '{{ item.dest }}'
|
||||
loop:
|
||||
- {
|
||||
src: 'templates/wezterm/wezterm.lua.j2',
|
||||
dest: '{{ xdg_config_dir }}/wezterm/wezterm.lua'
|
||||
}
|
||||
- {
|
||||
src: 'templates/wezterm/includes/colors.lua.j2',
|
||||
dest: '{{ xdg_config_dir }}/wezterm/includes/colors.lua'
|
||||
}
|
||||
- {
|
||||
src: 'templates/wezterm/includes/fonts.lua.j2',
|
||||
dest: '{{ xdg_config_dir }}/wezterm/includes/fonts.lua'
|
||||
}
|
||||
- {
|
||||
src: 'templates/wezterm/includes/window.lua.j2',
|
||||
dest: '{{ xdg_config_dir }}/wezterm/includes/window.lua'
|
||||
}
|
||||
|
||||
- name: enable fstrim timer
|
||||
become: true
|
||||
|
|
|
|||
|
|
@ -1,62 +0,0 @@
|
|||
# {{ ansible_managed }}
|
||||
#
|
||||
import = [ "{{ xdg_config_dir }}/alacritty/include.toml" ]
|
||||
|
||||
[selection]
|
||||
save_to_clipboard = true
|
||||
|
||||
[keyboard]
|
||||
bindings = [{ key = "N", mods = "Control | Shift", action = "SpawnNewInstance" },]
|
||||
|
||||
[font]
|
||||
normal = { family = "monospace", style = "Regular" }
|
||||
|
||||
[colors]
|
||||
[colors.primary]
|
||||
# Terminal stying
|
||||
# Defaults
|
||||
# foreground = "#d8d8d8"
|
||||
# background = "#181818"
|
||||
|
||||
foreground = "#000000"
|
||||
background = "#ffffff"
|
||||
|
||||
[colors.normal]
|
||||
# Defaults
|
||||
# black = "#181818"
|
||||
# red = "#ac4242"
|
||||
# green = "#90a959"
|
||||
# yellow = "#f4bf75"
|
||||
# blue = "#6a9fb5"
|
||||
# magenta = "#aa759f"
|
||||
# cyan = "#75b5aa"
|
||||
# white = "#d8d8d8"
|
||||
|
||||
black = "#353535"
|
||||
red = "#e84f4f"
|
||||
green = "#77d62f"
|
||||
yellow = "#e1aa5d"
|
||||
blue = "#7dc1cf"
|
||||
magenta = "#9b64fb"
|
||||
cyan = "#6d878d"
|
||||
white = "#dddddd"
|
||||
|
||||
[colors.dim]
|
||||
# Defaults
|
||||
# black = "#0f0f0f"
|
||||
# red = "#712b2b"
|
||||
# green = "#5f6f3a"
|
||||
# yellow = "#a17e4d"
|
||||
# blue = "#456877"
|
||||
# magenta = "#704d68"
|
||||
# cyan = "#4d7770"
|
||||
# white = "#8e8e8e"
|
||||
|
||||
black = "#0f0f0f"
|
||||
red = "#712b2b"
|
||||
green = "#5f6f3a"
|
||||
yellow = "#a17e4d"
|
||||
blue = "#456877"
|
||||
magenta = "#704d68"
|
||||
cyan = "#4d7770"
|
||||
white = "#8e8e8e"
|
||||
10
templates/wezterm/includes/colors.lua.j2
Normal file
10
templates/wezterm/includes/colors.lua.j2
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
-- {{ ansible_managed }}
|
||||
|
||||
return {
|
||||
colors = {
|
||||
-- The default text color
|
||||
foreground = 'black',
|
||||
-- The default background color
|
||||
background = 'white'
|
||||
}
|
||||
}
|
||||
14
templates/wezterm/includes/fonts.lua.j2
Normal file
14
templates/wezterm/includes/fonts.lua.j2
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
-- {{ ansible_managed }}
|
||||
|
||||
local wezterm = require 'wezterm';
|
||||
|
||||
return {
|
||||
font = wezterm.font(
|
||||
'MonaspiceNe Nerd Font Mono',
|
||||
{ weight = 'Regular', stretch = 'Normal', style = 'Normal' }
|
||||
),
|
||||
|
||||
font_size = 11,
|
||||
freetype_load_target = 'Light',
|
||||
freetype_render_target = 'HorizontalLcd'
|
||||
}
|
||||
17
templates/wezterm/includes/window.lua.j2
Normal file
17
templates/wezterm/includes/window.lua.j2
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
-- {{ ansible_managed }}
|
||||
|
||||
return {
|
||||
-- disable the tabbar
|
||||
enable_tab_bar = false,
|
||||
|
||||
-- window size
|
||||
initial_cols = 145,
|
||||
initial_rows = 35,
|
||||
|
||||
window_padding = {
|
||||
left = 0,
|
||||
right = 0,
|
||||
top = 0,
|
||||
bottom = 0,
|
||||
}
|
||||
}
|
||||
22
templates/wezterm/wezterm.lua.j2
Normal file
22
templates/wezterm/wezterm.lua.j2
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
-- {{ ansible_managed }}
|
||||
|
||||
local wezterm = require 'wezterm';
|
||||
local config = wezterm.config_builder();
|
||||
|
||||
config.term = 'wezterm';
|
||||
|
||||
local modules = {
|
||||
'colors',
|
||||
'fonts',
|
||||
'window',
|
||||
}
|
||||
|
||||
for _, module_name in pairs(modules) do
|
||||
local module_path = string.format('includes.%s', module_name)
|
||||
local module = require(module_path)
|
||||
for key, value in pairs(module) do
|
||||
config[key] = value;
|
||||
end
|
||||
end
|
||||
|
||||
return config
|
||||
|
|
@ -14,7 +14,7 @@ packages:
|
|||
- postgresql
|
||||
- plasma-meta
|
||||
- syncthing
|
||||
- alacritty
|
||||
- wezterm
|
||||
- tmux
|
||||
- unrar
|
||||
- vim
|
||||
|
|
@ -29,5 +29,6 @@ packages:
|
|||
- pipewire-pulse
|
||||
- pipewire-alsa
|
||||
- wireguard-tools
|
||||
- otf-monaspace-nerd
|
||||
|
||||
platform_packages: []
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue