Add support for distrobox
This commit is contained in:
parent
862e544a71
commit
46b6968238
5 changed files with 21 additions and 0 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1 +1,3 @@
|
||||||
secrets/
|
secrets/
|
||||||
|
dotfiles/zsh/.zcompdump
|
||||||
|
dotfiles/nvim/lazy-lock.json
|
||||||
|
|
|
@ -20,6 +20,10 @@ local function distro_traits(name)
|
||||||
icon = "",
|
icon = "",
|
||||||
color = "#73ba25",
|
color = "#73ba25",
|
||||||
},
|
},
|
||||||
|
[ "distrobox" ] = {
|
||||||
|
icon = "[ " .. os.getenv("CONTAINER_ID") .. "]",
|
||||||
|
color = "#917d62",
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
local icon = icons[name]
|
local icon = icons[name]
|
||||||
|
@ -31,6 +35,13 @@ local function distro_traits(name)
|
||||||
end
|
end
|
||||||
|
|
||||||
return function()
|
return function()
|
||||||
|
if os.getenv("CONTAINER_ID") ~= nil then
|
||||||
|
return {
|
||||||
|
name = "distrobox",
|
||||||
|
traits = distro_traits("distrobox"),
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
local release_file = io.open("/etc/os-release", "rb")
|
local release_file = io.open("/etc/os-release", "rb")
|
||||||
if release_file == nil then
|
if release_file == nil then
|
||||||
return {
|
return {
|
||||||
|
|
3
dotfiles/zsh/conf.d/distrobox.zsh
Normal file
3
dotfiles/zsh/conf.d/distrobox.zsh
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
#!/usr/bin/env zsh
|
||||||
|
|
||||||
|
# TODO: Script to prompt which environment the user wants to enter in to
|
|
@ -2,5 +2,6 @@
|
||||||
|
|
||||||
if [ -n "$(command -v "nvim")" ]; then
|
if [ -n "$(command -v "nvim")" ]; then
|
||||||
export MANPAGER='nvim +Man!'
|
export MANPAGER='nvim +Man!'
|
||||||
|
export EDITOR="nvim"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,10 @@ else
|
||||||
nix_shell_ps1=""
|
nix_shell_ps1=""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -n "$CONTAINER_ID" ]; then
|
||||||
|
dicon="%F{bg-yellow}[ $CONTAINER_ID]%f"
|
||||||
|
fi
|
||||||
|
|
||||||
setopt prompt_subst
|
setopt prompt_subst
|
||||||
autoload -Uz vcs_info
|
autoload -Uz vcs_info
|
||||||
precmd () { vcs_info }
|
precmd () { vcs_info }
|
||||||
|
|
Loading…
Reference in a new issue