feat: simplify shell config
This commit is contained in:
parent
fceb26bc0b
commit
23f34782a8
@ -223,6 +223,7 @@ static void updatetitle(Client *c);
|
||||
static void updatewindowtype(Client *c);
|
||||
static void updatewmhints(Client *c);
|
||||
static void view(const Arg *arg);
|
||||
static void warp(const Monitor *m);
|
||||
static Client *wintoclient(Window w);
|
||||
static Monitor *wintomon(Window w);
|
||||
static int xerror(Display *dpy, XErrorEvent *ee);
|
||||
@ -820,7 +821,7 @@ focusmon(const Arg *arg)
|
||||
return;
|
||||
unfocus(selmon->sel, 0);
|
||||
selmon = m;
|
||||
focus(NULL);
|
||||
warp(m);
|
||||
}
|
||||
|
||||
void
|
||||
@ -1989,6 +1990,13 @@ view(const Arg *arg)
|
||||
focus(getclientptr());
|
||||
}
|
||||
|
||||
void
|
||||
warp(const Monitor *m)
|
||||
{
|
||||
XWarpPointer(dpy, None, root, 0, 0, 0, 0, selmon->wx + selmon->ww / 2, selmon->wy + selmon->wh / 2);
|
||||
focus(NULL);
|
||||
}
|
||||
|
||||
Client *
|
||||
wintoclient(Window w)
|
||||
{
|
||||
|
@ -33,7 +33,9 @@
|
||||
# os_icon # os identifier
|
||||
dir # current directory
|
||||
vcs # git status
|
||||
prompt_char # prompt symbol
|
||||
command_execution_time # duration of the last command
|
||||
status # exit code of the last command
|
||||
#prompt_char # prompt symbol
|
||||
)
|
||||
|
||||
# The list of segments shown on the right. Fill it with less important segments.
|
||||
@ -41,18 +43,16 @@
|
||||
# automatically hidden when the input line reaches it. Right prompt above the
|
||||
# last prompt line gets hidden if it would overlap with left prompt.
|
||||
typeset -g POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(
|
||||
status # exit code of the last command
|
||||
command_execution_time # duration of the last command
|
||||
background_jobs # presence of background jobs
|
||||
direnv # direnv status (https://direnv.net/)
|
||||
asdf # asdf version manager (https://github.com/asdf-vm/asdf)
|
||||
# direnv # direnv status (https://direnv.net/)
|
||||
# asdf # asdf version manager (https://github.com/asdf-vm/asdf)
|
||||
virtualenv # python virtual environment (https://docs.python.org/3/library/venv.html)
|
||||
anaconda # conda environment (https://conda.io/)
|
||||
pyenv # python environment (https://github.com/pyenv/pyenv)
|
||||
goenv # go environment (https://github.com/syndbg/goenv)
|
||||
nodenv # node.js version from nodenv (https://github.com/nodenv/nodenv)
|
||||
nvm # node.js version from nvm (https://github.com/nvm-sh/nvm)
|
||||
nodeenv # node.js environment (https://github.com/ekalinin/nodeenv)
|
||||
# anaconda # conda environment (https://conda.io/)
|
||||
# pyenv # python environment (https://github.com/pyenv/pyenv)
|
||||
# goenv # go environment (https://github.com/syndbg/goenv)
|
||||
# nodenv # node.js version from nodenv (https://github.com/nodenv/nodenv)
|
||||
# nvm # node.js version from nvm (https://github.com/nvm-sh/nvm)
|
||||
# nodeenv # node.js environment (https://github.com/ekalinin/nodeenv)
|
||||
# node_version # node.js version
|
||||
# go_version # go version (https://golang.org)
|
||||
# rust_version # rustc version (https://www.rust-lang.org)
|
||||
@ -61,44 +61,44 @@
|
||||
# laravel_version # laravel php framework version (https://laravel.com/)
|
||||
# java_version # java version (https://www.java.com/)
|
||||
# package # name@version from package.json (https://docs.npmjs.com/files/package.json)
|
||||
rbenv # ruby version from rbenv (https://github.com/rbenv/rbenv)
|
||||
rvm # ruby version from rvm (https://rvm.io)
|
||||
fvm # flutter version management (https://github.com/leoafarias/fvm)
|
||||
luaenv # lua version from luaenv (https://github.com/cehoffman/luaenv)
|
||||
jenv # java version from jenv (https://github.com/jenv/jenv)
|
||||
plenv # perl version from plenv (https://github.com/tokuhirom/plenv)
|
||||
perlbrew # perl version from perlbrew (https://github.com/gugod/App-perlbrew)
|
||||
phpenv # php version from phpenv (https://github.com/phpenv/phpenv)
|
||||
scalaenv # scala version from scalaenv (https://github.com/scalaenv/scalaenv)
|
||||
haskell_stack # haskell version from stack (https://haskellstack.org/)
|
||||
# rbenv # ruby version from rbenv (https://github.com/rbenv/rbenv)
|
||||
# rvm # ruby version from rvm (https://rvm.io)
|
||||
# fvm # flutter version management (https://github.com/leoafarias/fvm)
|
||||
# luaenv # lua version from luaenv (https://github.com/cehoffman/luaenv)
|
||||
# jenv # java version from jenv (https://github.com/jenv/jenv)
|
||||
# plenv # perl version from plenv (https://github.com/tokuhirom/plenv)
|
||||
# perlbrew # perl version from perlbrew (https://github.com/gugod/App-perlbrew)
|
||||
# phpenv # php version from phpenv (https://github.com/phpenv/phpenv)
|
||||
# scalaenv # scala version from scalaenv (https://github.com/scalaenv/scalaenv)
|
||||
# haskell_stack # haskell version from stack (https://haskellstack.org/)
|
||||
kubecontext # current kubernetes context (https://kubernetes.io/)
|
||||
terraform # terraform workspace (https://www.terraform.io)
|
||||
# terraform # terraform workspace (https://www.terraform.io)
|
||||
# terraform_version # terraform version (https://www.terraform.io)
|
||||
aws # aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html)
|
||||
aws_eb_env # aws elastic beanstalk environment (https://aws.amazon.com/elasticbeanstalk/)
|
||||
azure # azure account name (https://docs.microsoft.com/en-us/cli/azure)
|
||||
gcloud # google cloud cli account and project (https://cloud.google.com/)
|
||||
google_app_cred # google application credentials (https://cloud.google.com/docs/authentication/production)
|
||||
toolbox # toolbox name (https://github.com/containers/toolbox)
|
||||
context # user@hostname
|
||||
nordvpn # nordvpn connection status, linux only (https://nordvpn.com/)
|
||||
# aws # aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html)
|
||||
# aws_eb_env # aws elastic beanstalk environment (https://aws.amazon.com/elasticbeanstalk/)
|
||||
# azure # azure account name (https://docs.microsoft.com/en-us/cli/azure)
|
||||
# gcloud # google cloud cli account and project (https://cloud.google.com/)
|
||||
# google_app_cred # google application credentials (https://cloud.google.com/docs/authentication/production)
|
||||
# toolbox # toolbox name (https://github.com/containers/toolbox)
|
||||
# context # user@hostname
|
||||
# nordvpn # nordvpn connection status, linux only (https://nordvpn.com/)
|
||||
ranger # ranger shell (https://github.com/ranger/ranger)
|
||||
nnn # nnn shell (https://github.com/jarun/nnn)
|
||||
lf # lf shell (https://github.com/gokcehan/lf)
|
||||
xplr # xplr shell (https://github.com/sayanarijit/xplr)
|
||||
# nnn # nnn shell (https://github.com/jarun/nnn)
|
||||
# lf # lf shell (https://github.com/gokcehan/lf)
|
||||
# xplr # xplr shell (https://github.com/sayanarijit/xplr)
|
||||
vim_shell # vim shell indicator (:sh)
|
||||
midnight_commander # midnight commander shell (https://midnight-commander.org/)
|
||||
nix_shell # nix shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html)
|
||||
chezmoi_shell # chezmoi shell (https://www.chezmoi.io/)
|
||||
# midnight_commander # midnight commander shell (https://midnight-commander.org/)
|
||||
# nix_shell # nix shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html)
|
||||
# chezmoi_shell # chezmoi shell (https://www.chezmoi.io/)
|
||||
# vpn_ip # virtual private network indicator
|
||||
# load # CPU load
|
||||
# disk_usage # disk usage
|
||||
# ram # free RAM
|
||||
# swap # used swap
|
||||
todo # todo items (https://github.com/todotxt/todo.txt-cli)
|
||||
timewarrior # timewarrior tracking status (https://timewarrior.net/)
|
||||
taskwarrior # taskwarrior task count (https://taskwarrior.org/)
|
||||
#per_directory_history # Oh My Zsh per-directory-history local/global indicator
|
||||
# todo # todo items (https://github.com/todotxt/todo.txt-cli)
|
||||
# timewarrior # timewarrior tracking status (https://timewarrior.net/)
|
||||
# taskwarrior # taskwarrior task count (https://taskwarrior.org/)
|
||||
# per_directory_history # Oh My Zsh per-directory-history local/global indicator
|
||||
# cpu_arch # CPU architecture
|
||||
# time # current time
|
||||
# ip # ip address and bandwidth usage for a specified network interface
|
||||
|
@ -26,8 +26,8 @@ setopt AUTO_CD
|
||||
|
||||
setopt HIST_IGNORE_DUPS
|
||||
setopt HIST_IGNORE_SPACE
|
||||
#setopt SHARE_HISTORY
|
||||
#setopt EXTENDED_HISTORY
|
||||
setopt SHARE_HISTORY
|
||||
setopt EXTENDED_HISTORY
|
||||
|
||||
export PAGER=less
|
||||
export LESS_TERMCAP_mb="${fg_bold[red]}"
|
||||
|
@ -1,29 +1,25 @@
|
||||
# system
|
||||
alias update='sudo pacman -Syu && flatpak update && config submodule update --remote --recursive --init'
|
||||
alias pac='sudo pacman'
|
||||
alias vi='$EDITOR'
|
||||
alias qcp='qcp -o tabsize=4'
|
||||
alias qmv='qmv -o tabsize=4'
|
||||
alias pac='sudo pacman' \
|
||||
vi='$EDITOR' \
|
||||
qcp='qcp -o tabsize=4' \
|
||||
qmv='qmv -o tabsize=4'
|
||||
|
||||
# conf
|
||||
alias config='git --git-dir="$HOME/.dotfiles/" --work-tree="$HOME"'
|
||||
alias viconf='(cd "$XDG_CONFIG_HOME/nvim" && $EDITOR .)'
|
||||
alias wconf='(cd "$XDG_CONFIG_HOME/sway" && $EDITOR .)'
|
||||
alias zconf='(cd "$ZDOTDIR/" && $EDITOR .) && . "$ZDOTDIR/.zshrc"'
|
||||
alias config='git --git-dir="$HOME/.dotfiles/" --work-tree="$HOME"' \
|
||||
viconf='(cd "$XDG_CONFIG_HOME/nvim" && $EDITOR .)' \
|
||||
wconf='(cd "$XDG_CONFIG_HOME/sway" && $EDITOR .)' \
|
||||
zconf='(cd "$ZDOTDIR/" && $EDITOR .) && . "$ZDOTDIR/.zshrc"'
|
||||
|
||||
# dev
|
||||
alias valgrind='epitest valgrind'
|
||||
alias ssh='TERM=linux ssh'
|
||||
alias valgrind='epitest valgrind' \
|
||||
ssh='TERM=linux ssh'
|
||||
|
||||
# alias
|
||||
function coloralias() {
|
||||
$1 $(echo - "${@:2}" | sed 's/--color=\w\+/--color=always/')
|
||||
}
|
||||
|
||||
alias _='sudo '
|
||||
alias sudo='sudo '
|
||||
alias watch='coloralias watch -c -- '
|
||||
alias xargs='xargs '
|
||||
alias _='sudo ' \
|
||||
sudo='sudo ' \
|
||||
watch='coloralias watch -c -- ' \
|
||||
xargs='xargs '
|
||||
|
||||
function j() {
|
||||
local dests=("${(@f)$(find . -mount -name "$1*" -type d 2> /dev/null)}")
|
||||
@ -37,21 +33,26 @@ function tmp() {
|
||||
cd "$(mktemp -dt "$1"XXX)"
|
||||
}
|
||||
|
||||
alias -g ...='../..'
|
||||
alias -g ....='../../..'
|
||||
alias -g .....='../../../..'
|
||||
alias -g ......='../../../../..'
|
||||
alias -g ...='../..' \
|
||||
....='../../..' \
|
||||
.....='../../../..' \
|
||||
......='../../../../..'
|
||||
|
||||
alias ls='ls --color=tty'
|
||||
alias lsa='ls -lah'
|
||||
alias l='ls -lah'
|
||||
alias ll='ls -lh'
|
||||
alias la='ls -lAh'
|
||||
alias cp="cp -vi" \
|
||||
mv="mv -vi" \
|
||||
rm="rm -v" \
|
||||
mkdir="mkdir -v" \
|
||||
rsync="rsync -P"
|
||||
|
||||
alias ls='ls --color=tty' \
|
||||
l='ls -lah' \
|
||||
ll='ls -lh' \
|
||||
la='ls -lAh'
|
||||
|
||||
alias diff='diff --color'
|
||||
|
||||
alias grep="grep --color=auto --exclude-dir={.bzr,CVS,.git,.hg,.svn,.idea,.tox}"
|
||||
alias egrep="grep -E --color=auto --exclude-dir={.bzr,CVS,.git,.hg,.svn,.idea,.tox}"
|
||||
alias fgrep="grep -F --color=auto --exclude-dir={.bzr,CVS,.git,.hg,.svn,.idea,.tox}"
|
||||
alias grep="grep --color=auto --exclude-dir={.bzr,CVS,.git,.hg,.svn,.idea,.tox}" \
|
||||
egrep="grep -E --color=auto --exclude-dir={.bzr,CVS,.git,.hg,.svn,.idea,.tox}" \
|
||||
fgrep="grep -F --color=auto --exclude-dir={.bzr,CVS,.git,.hg,.svn,.idea,.tox}"
|
||||
|
||||
# vim: ft=zsh
|
||||
|
2
.xinitrc
2
.xinitrc
@ -11,4 +11,4 @@ gammastep 2> /dev/null &
|
||||
sbar &
|
||||
"$HOME/keepass/keepassxc" &
|
||||
|
||||
exec dbus-launch dwm
|
||||
exec dbus-launch .config/suckless/dwm-6.4/dwm
|
||||
|
2
bin/lock
2
bin/lock
@ -1,3 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
i3lock -ftni "$XDG_CONFIG_HOME/wallpapers/lock.png"
|
||||
exec i3lock -ftni "$XDG_CONFIG_HOME/wallpapers/lock.png"
|
||||
|
@ -1,3 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
feh --fullscreen "$XDG_CONFIG_HOME/wallpapers/lock.png"
|
||||
exec feh --fullscreen "$XDG_CONFIG_HOME/wallpapers/lock.png"
|
||||
|
Loading…
Reference in New Issue
Block a user