mirror of
https://codeberg.org/hyperreal/dotfiles
synced 2024-11-01 08:43:08 +01:00
Update zsh
This commit is contained in:
parent
c81ed8912c
commit
ca1f089850
@ -87,7 +87,7 @@ zplug load
|
||||
# -----------------------------------------------------------------------------
|
||||
export SHELL=/usr/bin/zsh
|
||||
export DOOMDIR="${HOME}/sync/doom"
|
||||
export LS_COLORS=$(cat ~/.lscolors.sh)
|
||||
export LS_COLORS=$(vivid generate catppuccin-mocha)
|
||||
export PAGER="less -X"
|
||||
export MANWIDTH="88"
|
||||
export MANROFFOPT="-c"
|
||||
|
@ -1,6 +1,3 @@
|
||||
# Execute bash on host (ostree-based)
|
||||
alias hostexec='distrobox-host-exec bash'
|
||||
|
||||
# Get top 10 shell commands
|
||||
alias top10='print -l ${(o)history%% *} | uniq -c | sort -nr | head -n 10'
|
||||
|
||||
|
@ -1,3 +1,47 @@
|
||||
## Nushell and jc functions
|
||||
|
||||
# nushell: df
|
||||
function nudf() {
|
||||
nu -c 'jc df | from json'
|
||||
}
|
||||
|
||||
# nushell: free
|
||||
function numem() {
|
||||
nu -c 'jc free | from json'
|
||||
}
|
||||
|
||||
# nushell: lsof -i
|
||||
function nunetcons() {
|
||||
nu -c 'jc lsof -i | from json'
|
||||
}
|
||||
|
||||
# nushell: nutulp
|
||||
function nutulp() {
|
||||
nu -c 'jc ss -tulp | from json'
|
||||
}
|
||||
|
||||
# nushell: openports
|
||||
function nuopenports() {
|
||||
nu -c 'sudo jc lsof -i | from json | find "LISTEN"'
|
||||
}
|
||||
|
||||
# nushell: timestamp Z
|
||||
function nutsz() {
|
||||
nu -c 'date now | format date "%FT%T%:z"'
|
||||
}
|
||||
|
||||
# watch directory listing, update every 0.1s
|
||||
function watchdir() {
|
||||
watch -n0,1 "ls -lh $1/ | tail"
|
||||
}
|
||||
|
||||
# get time in timezone
|
||||
function timein() {
|
||||
continent=$(find /usr/share/zoneinfo -maxdepth 1 -mindepth 1 -type d -not -name "posix" -not -name "right" -exec basename {} \; | gum choose --limit=1)
|
||||
city=$(find "/usr/share/zoneinfo/$continent" -type f -exec basename {} \; | gum choose --limit=1)
|
||||
TZ="$continent/$city" date
|
||||
}
|
||||
|
||||
# Generate a pseudo-random 16-character string.
|
||||
function genrand() {
|
||||
openssl rand -base64 16
|
||||
|
Loading…
Reference in New Issue
Block a user