Wezterm updates, and an odd git punish file

This commit is contained in:
Tyrel Souza 2024-08-13 09:47:26 -04:00
parent 003b9cbe8b
commit 482ac00839
Signed by: tyrel
GPG Key ID: A7042C28F86F5183
3 changed files with 105 additions and 25 deletions

20
home/bin/git_punish.sh Executable file
View File

@ -0,0 +1,20 @@
#!/bin/bash
# Check if filename and line number are provided
if [ $# -ne 2 ]; then
echo "Usage: $0 <filename> <line_number>"
exit 1
fi
# Extract filename and line number from arguments
filename=$1
line_number=$2
# Get the commit hash where the line was last changed
commit_hash=$(git blame -L "$line_number,$line_number" -- "$filename" | awk '{print $1}')
# Get the email address of the committer
email_address=$(git show --no-patch --format='%ae' $commit_hash)
echo "Email address of the committer: $email_address"

View File

@ -0,0 +1,85 @@
local wezterm = require 'wezterm'
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
wezterm.on('update-status', function(window)
-- Grab the utf8 character for the "powerline" left facing
-- solid arrow.
local SOLID_LEFT_ARROW = utf8.char(0xe0b2)
-- Grab the current window's configuration, and from it the
-- palette (this is the combination of your chosen colour scheme
-- including any overrides).
local color_scheme = window:effective_config().resolved_palette
local bg = color_scheme.background
local fg = color_scheme.foreground
window:set_right_status(wezterm.format({
-- First, we draw the arrow...
{ Background = { Color = 'none' } },
{ Foreground = { Color = bg } },
{ Text = SOLID_LEFT_ARROW },
-- Then we draw our text
{ Background = { Color = bg } },
{ Foreground = { Color = fg } },
{ Text = ' ' .. wezterm.hostname() .. ' ' },
}))
end)
-- This is where you actually apply your config choices
config.set_environment_variables = {
PATH = '/opt/homebrew/bin:' .. os.getenv('PATH')
}
config.color_scheme = 'Jellybeans (Gogh)'
config.font = wezterm.font_with_fallback { 'IosevkaTerm Nerd Font' }
config.font_size = 15
config.hide_tab_bar_if_only_one_tab = true
config.window_decorations = 'RESIZE'
config.window_background_opacity = 0.8
config.macos_window_background_blur = 80
config.window_frame = {
font = wezterm.font({ family = 'IosevkaTerm Nerd Fonk', weight = 'Bold' }),
font_size = 11,
}
config.keys = {
-- Sends ESC + b and ESC + f sequence, which is used
-- for telling your shell to jump back/forward.
{
-- When the left arrow is pressed
key = 'LeftArrow',
-- With the "Option" key modifier held down
mods = 'OPT',
-- Perform this action, in this case - sending ESC + B
-- to the terminal
action = wezterm.action.SendString '\x1bb',
},
{
key = 'RightArrow',
mods = 'OPT',
action = wezterm.action.SendString '\x1bf',
},
-- Command+, for opening "settings" in nvim
{
key = ',',
mods = 'SUPER',
action = wezterm.action.SpawnCommandInNewTab {
cwd = wezterm.home_dir,
args = { 'nvim', wezterm.config_file },
},
},
}
-- and finally, return the configuration to wezterm
return config

View File

@ -1,25 +0,0 @@
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
-- For example, changing the color scheme:
config.color_scheme = 'Jellybeans (Gogh)'
config.font = wezterm.font_with_fallback {
'IosevkaTerm Nerd Font',
}
config.font_size = 13
config.hide_tab_bar_if_only_one_tab = true
-- and finally, return the configuration to wezterm
return config