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