nix/modules/home/programs/wezterm/wezterm.lua
Ameya Shenoy 4998e822a7 feat: init
Signed-off-by: Ameya Shenoy <shenoy.ameya@gmail.com>
2024-11-11 01:48:40 +05:30

49 lines
1.3 KiB
Lua

-- Pull in the wezterm API
local wezterm = require 'wezterm'
-- This table will hold the configuration.
local config = {}
-- In newer versions of wezterm, use the config_builder which will
-- help provide clearer error messages
if wezterm.config_builder then
config = wezterm.config_builder()
end
-- This is where you actually apply your config choices
config.color_scheme = 'Monokai (terminal.sexy)'
config.window_background_opacity = 0.5
config.window_decorations = "RESIZE"
config.use_fancy_tab_bar = false
config.show_tabs_in_tab_bar = false
config.show_new_tab_button_in_tab_bar = false
config.font = wezterm.font 'Iosevka Nerd Font'
config.font_size = 13.0
local xcursor_size = nil
local xcursor_theme = nil
local success, stdout, stderr = wezterm.run_child_process({"gsettings", "get", "org.gnome.desktop.interface", "cursor-theme"})
if success then
xcursor_theme = stdout:gsub("'(.+)'\n", "%1")
end
local success, stdout, stderr = wezterm.run_child_process({"gsettings", "get", "org.gnome.desktop.interface", "cursor-size"})
if success then
xcursor_size = tonumber(stdout)
end
config.xcursor_theme = xcursor_theme
config.xcursor_size = xcursor_size
-- workaround for showing cursor on wezterm
config.enable_wayland = false
-- and finally, return the configuration to wezterm
return config