generalize config, fix wezterm on desktop
This commit is contained in:
parent
0d61dc21b9
commit
fdc9647b3a
80
.wezterm.lua
80
.wezterm.lua
@ -106,42 +106,48 @@ local color_on = color_off:lighten(0.4)
|
||||
wezterm.on('update-right-status', function(window)
|
||||
local bat = ''
|
||||
local b = wezterm.battery_info()[1]
|
||||
bat = wezterm.format {
|
||||
{ Foreground = {
|
||||
Color =
|
||||
b.state_of_charge > 0.2 and color_on or color_off,
|
||||
} },
|
||||
{ Text = '▉' },
|
||||
{ Foreground = {
|
||||
Color =
|
||||
b.state_of_charge > 0.4 and color_on or color_off,
|
||||
} },
|
||||
{ Text = '▉' },
|
||||
{ Foreground = {
|
||||
Color =
|
||||
b.state_of_charge > 0.6 and color_on or color_off,
|
||||
} },
|
||||
{ Text = '▉' },
|
||||
{ Foreground = {
|
||||
Color =
|
||||
b.state_of_charge > 0.8 and color_on or color_off,
|
||||
} },
|
||||
{ Text = '▉' },
|
||||
{ Background = {
|
||||
Color =
|
||||
b.state_of_charge > 0.98 and color_on or color_off,
|
||||
} },
|
||||
{ Foreground = {
|
||||
Color =
|
||||
b.state == "Charging"
|
||||
and color_on:lighten(0.3):complement()
|
||||
or
|
||||
(b.state_of_charge < 0.2 and wezterm.GLOBAL.count % 2 == 0)
|
||||
and color_on:lighten(0.1):complement()
|
||||
or color_off:darken(0.1)
|
||||
} },
|
||||
{ Text = ' ⚡ ' },
|
||||
}
|
||||
if b then
|
||||
bat = wezterm.format {
|
||||
{ Foreground = {
|
||||
Color =
|
||||
b.state_of_charge > 0.2 and color_on or color_off,
|
||||
} },
|
||||
{ Text = '▉' },
|
||||
{ Foreground = {
|
||||
Color =
|
||||
b.state_of_charge > 0.4 and color_on or color_off,
|
||||
} },
|
||||
{ Text = '▉' },
|
||||
{ Foreground = {
|
||||
Color =
|
||||
b.state_of_charge > 0.6 and color_on or color_off,
|
||||
} },
|
||||
{ Text = '▉' },
|
||||
{ Foreground = {
|
||||
Color =
|
||||
b.state_of_charge > 0.8 and color_on or color_off,
|
||||
} },
|
||||
{ Text = '▉' },
|
||||
{ Background = {
|
||||
Color =
|
||||
b.state_of_charge > 0.98 and color_on or color_off,
|
||||
} },
|
||||
{ Foreground = {
|
||||
Color =
|
||||
b.state == "Charging"
|
||||
and color_on:lighten(0.3):complement()
|
||||
or
|
||||
(b.state_of_charge < 0.2 and wezterm.GLOBAL.count % 2 == 0)
|
||||
and color_on:lighten(0.1):complement()
|
||||
or color_off:darken(0.1)
|
||||
} },
|
||||
{ Text = ' ⚡ ' },
|
||||
}
|
||||
else
|
||||
bat = wezterm.format {
|
||||
{ Text = '🖥' },
|
||||
}
|
||||
end
|
||||
|
||||
local time = wezterm.strftime '%k:%M '
|
||||
|
||||
@ -253,7 +259,7 @@ config.window_background_opacity = 0.9
|
||||
config.window_frame = {
|
||||
active_titlebar_bg = title_color_bg,
|
||||
inactive_titlebar_bg = title_color_bg,
|
||||
font_size = 10.0,
|
||||
font_size = 11.0,
|
||||
}
|
||||
|
||||
config.window_decorations = 'RESIZE'
|
||||
|
47
.wezterm/colors.lua
Normal file
47
.wezterm/colors.lua
Normal file
@ -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
|
||||
}
|
||||
}
|
7
.zsh/MOTHERSHIP.zsh
Normal file
7
.zsh/MOTHERSHIP.zsh
Normal file
@ -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'
|
26
.zshrc
26
.zshrc
@ -44,12 +44,9 @@ cd() {
|
||||
|
||||
alias sudo='sudo --preserve-env=HOME'
|
||||
alias grep='grep --colour=auto'
|
||||
alias diff='diff --color=auto'
|
||||
alias ls='ls --color=auto'
|
||||
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 nmap='/mnt/c/Program\ Files\ \(x86\)/Nmap/nmap.exe'
|
||||
alias sudo='sudo '
|
||||
@ -66,18 +63,15 @@ if [[ "$(command -v nvim)" ]]; then
|
||||
export EDITOR='nvim'
|
||||
export MANPAGER='nvim +Man!'
|
||||
export MANWIDTH=999
|
||||
alias vi='nvim'
|
||||
alias vim='vi'
|
||||
else
|
||||
export EDITOR='vim'
|
||||
fi
|
||||
|
||||
# jump to man flag
|
||||
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
|
||||
function cheat() {
|
||||
bat -l md -p ~/cheat/"$1"
|
||||
@ -85,11 +79,10 @@ function cheat() {
|
||||
compdef '_files -W "/home/panki/cheat"' cheat
|
||||
|
||||
# tokens etc
|
||||
source ~/.exports
|
||||
test -f "$HOME/.exports" && source "$HOME/.exports"
|
||||
|
||||
# wezterm
|
||||
source ~/.zsh/wezterm.sh
|
||||
# This will set the default prompt to the fade theme
|
||||
source "$HOME/.zsh/wezterm.sh"
|
||||
if [[ $UID -eq 0 ]]; then
|
||||
HISTFILE="${HISTFILE%_history}_root_history"
|
||||
prompt fade red
|
||||
@ -97,6 +90,11 @@ else
|
||||
HISTFILE=~/.histfile
|
||||
prompt pure
|
||||
fi
|
||||
|
||||
ICONS=(😈 💀 🤡 👻 👽 👾 🤖 😺 💋 💥 🦥 🐣 🐧 🐸 🐢 🐍 🐳 🌴 🍉 🍎 🍒 🥝 🥥 🥨 🍕 ☕ 🚨 🚀 🛸 🪐 🌠 🌙 🌞 🌈 ⚡ 🔥 💧 ✨ 🎉 💎 💾 📎 💣 📡 )
|
||||
export PURE_PROMPT_SYMBOL="$(shuf -n1 -e "${ICONS[@]}")"
|
||||
__wezterm_set_user_var "ICON" $PURE_PROMPT_SYMBOL
|
||||
|
||||
# local specific
|
||||
local_conf="$HOME/.zsh/$(hostname).zsh"
|
||||
test -f $local_conf && source $local_conf
|
||||
|
Loading…
Reference in New Issue
Block a user