Prefer USER to USERNAME

USERNAME seems to act weird on MacOS in scripts and nvim conifig
This commit is contained in:
Andrew Tomaka 2022-12-10 09:44:53 -05:00
parent a567fe4f12
commit fdf329b3df
Signed by: atomaka
GPG key ID: 61209BF70A5B18BE
3 changed files with 4 additions and 4 deletions

View file

@ -36,7 +36,7 @@ vim.api.nvim_create_autocmd({"WinLeave"}, {
--- background matching terminal
function ChangeBackground()
local home = os.getenv("HOME")
local user = os.getenv("USERNAME")
local user = os.getenv("USER")
local file = io.open(home.."/.config/"..user.."/color.yml", "rb")
local background = file:read()
file:close()