generalize config, fix wezterm on desktop

master
Felix Pankratz 5 months ago
parent 0d61dc21b9
commit fdc9647b3a

@ -106,6 +106,7 @@ local color_on = color_off:lighten(0.4)
wezterm.on('update-right-status', function(window) wezterm.on('update-right-status', function(window)
local bat = '' local bat = ''
local b = wezterm.battery_info()[1] local b = wezterm.battery_info()[1]
if b then
bat = wezterm.format { bat = wezterm.format {
{ Foreground = { { Foreground = {
Color = Color =
@ -142,6 +143,11 @@ wezterm.on('update-right-status', function(window)
} }, } },
{ Text = '' }, { Text = '' },
} }
else
bat = wezterm.format {
{ Text = '🖥' },
}
end
local time = wezterm.strftime '%k:%M ' local time = wezterm.strftime '%k:%M '
@ -253,7 +259,7 @@ config.window_background_opacity = 0.9
config.window_frame = { config.window_frame = {
active_titlebar_bg = title_color_bg, active_titlebar_bg = title_color_bg,
inactive_titlebar_bg = title_color_bg, inactive_titlebar_bg = title_color_bg,
font_size = 10.0, font_size = 11.0,
} }
config.window_decorations = 'RESIZE' config.window_decorations = 'RESIZE'

@ -0,0 +1,47 @@
local wezterm = require 'wezterm'
local color_default_fg_light = wezterm.color.parse("#cacaca") -- 💩
local color_default_fg_dark = wezterm.color.parse("#303030")
return {
VERIDIAN = {
bg = wezterm.color.parse("#4D8060"),
fg = color_default_fg_light
},
PAYNE = {
bg = wezterm.color.parse("#385F71"),
fg = color_default_fg_light
},
INDIGO = {
bg = wezterm.color.parse("#7C77B9"),
fg = color_default_fg_light
},
CAROLINA = {
bg = wezterm.color.parse("#8FBFE0"),
fg = color_default_fg_dark
},
FLAME = {
bg = wezterm.color.parse("#D36135"),
fg = color_default_fg_dark
},
JET = {
bg = wezterm.color.parse("#282B28"),
fg = color_default_fg_light
},
TAUPE = {
bg = wezterm.color.parse("#785964"),
fg = color_default_fg_light
},
ECRU = {
bg = wezterm.color.parse("#C6AE82"),
fg = color_default_fg_dark
},
VIOLET = {
bg = wezterm.color.parse("#685F74"),
fg = color_default_fg_light
},
VERDIGRIS = {
bg = wezterm.color.parse("#28AFB0"),
fg = color_default_fg_light
}
}

@ -0,0 +1,7 @@
# machine specific configuration
BROWSER='/mnt/c/Program Files/Mozilla Firefox/firefox.exe'
export BROWSER
alias devel='cd /mnt/d/devel'
alias desk='cd /mnt/c/Users/Panki/Desktop'

@ -44,12 +44,9 @@ cd() {
alias sudo='sudo --preserve-env=HOME' alias sudo='sudo --preserve-env=HOME'
alias grep='grep --colour=auto' alias grep='grep --colour=auto'
alias diff='diff --color=auto'
alias ls='ls --color=auto' alias ls='ls --color=auto'
alias ll='ls -alFh' alias ll='ls -alFh'
alias vi='nvim'
alias vim='vi'
alias devel='cd /mnt/c/devel'
alias desk='cd /mnt/c/Users/PankratzF/Desktop'
alias e='explorer.exe .' alias e='explorer.exe .'
alias nmap='/mnt/c/Program\ Files\ \(x86\)/Nmap/nmap.exe' alias nmap='/mnt/c/Program\ Files\ \(x86\)/Nmap/nmap.exe'
alias sudo='sudo ' alias sudo='sudo '
@ -66,18 +63,15 @@ if [[ "$(command -v nvim)" ]]; then
export EDITOR='nvim' export EDITOR='nvim'
export MANPAGER='nvim +Man!' export MANPAGER='nvim +Man!'
export MANWIDTH=999 export MANWIDTH=999
alias vi='nvim'
alias vim='vi'
else
export EDITOR='vim'
fi fi
# jump to man flag # jump to man flag
function fman () { man -P "less -p \"^ +$2\"" $1 } function fman () { man -P "less -p \"^ +$2\"" $1 }
# fzf stuff
export FZF_TMUX=1
export FZF_DEFAULT_OPTS='--height 40%'
export FZF_COMPLETION_TRIGGER='~~'
source /usr/share/doc/fzf/examples/key-bindings.zsh
alias fp='fzf --preview "bat --style=numbers --color=always --line-range :500 {}"'
# cheat - display text reminders # cheat - display text reminders
function cheat() { function cheat() {
bat -l md -p ~/cheat/"$1" bat -l md -p ~/cheat/"$1"
@ -85,11 +79,10 @@ function cheat() {
compdef '_files -W "/home/panki/cheat"' cheat compdef '_files -W "/home/panki/cheat"' cheat
# tokens etc # tokens etc
source ~/.exports test -f "$HOME/.exports" && source "$HOME/.exports"
# wezterm # wezterm
source ~/.zsh/wezterm.sh source "$HOME/.zsh/wezterm.sh"
# This will set the default prompt to the fade theme
if [[ $UID -eq 0 ]]; then if [[ $UID -eq 0 ]]; then
HISTFILE="${HISTFILE%_history}_root_history" HISTFILE="${HISTFILE%_history}_root_history"
prompt fade red prompt fade red
@ -97,6 +90,11 @@ else
HISTFILE=~/.histfile HISTFILE=~/.histfile
prompt pure prompt pure
fi fi
ICONS=(😈 💀 🤡 👻 👽 👾 🤖 😺 💋 💥 🦥 🐣 🐧 🐸 🐢 🐍 🐳 🌴 🍉 🍎 🍒 🥝 🥥 🥨 🍕 ☕ 🚨 🚀 🛸 🪐 🌠 🌙 🌞 🌈 ⚡ 🔥 💧 ✨ 🎉 💎 💾 📎 💣 📡 ) ICONS=(😈 💀 🤡 👻 👽 👾 🤖 😺 💋 💥 🦥 🐣 🐧 🐸 🐢 🐍 🐳 🌴 🍉 🍎 🍒 🥝 🥥 🥨 🍕 ☕ 🚨 🚀 🛸 🪐 🌠 🌙 🌞 🌈 ⚡ 🔥 💧 ✨ 🎉 💎 💾 📎 💣 📡 )
export PURE_PROMPT_SYMBOL="$(shuf -n1 -e "${ICONS[@]}")" export PURE_PROMPT_SYMBOL="$(shuf -n1 -e "${ICONS[@]}")"
__wezterm_set_user_var "ICON" $PURE_PROMPT_SYMBOL __wezterm_set_user_var "ICON" $PURE_PROMPT_SYMBOL
# local specific
local_conf="$HOME/.zsh/$(hostname).zsh"
test -f $local_conf && source $local_conf

Loading…
Cancel
Save