Update
This commit is contained in:
parent
771b32ef53
commit
03b7e4a6a9
1 changed files with 13 additions and 23 deletions
36
.zshrc
36
.zshrc
|
@ -22,12 +22,6 @@ compinit
|
|||
|
||||
#. ~/.zsh_plugins.zsh
|
||||
|
||||
### KiTTY completion
|
||||
|
||||
if which kitty > /dev/null; then
|
||||
kitty + complete setup zsh | source /dev/stdin
|
||||
fi
|
||||
|
||||
### fasd
|
||||
|
||||
if which fasd > /dev/null; then
|
||||
|
@ -158,7 +152,7 @@ export PATH=/opt/tor-browser_en-US:$PATH
|
|||
export PATH=/opt/android-sdk/platform-tools:$PATH
|
||||
|
||||
## Custom functions
|
||||
function lookhosts {
|
||||
function ,lookhosts {
|
||||
if which rg 2>&1 > /dev/null; then
|
||||
GREP=rg
|
||||
else
|
||||
|
@ -167,11 +161,7 @@ function lookhosts {
|
|||
${GREP} $@ /etc/hosts
|
||||
}
|
||||
|
||||
function reload_work_gpg {
|
||||
kill -9 $(ps aux|egrep "gpg-agent.*work"|grep -v grep|awk '{print $2}')
|
||||
}
|
||||
|
||||
function sway-screens {
|
||||
function ,sway-screens {
|
||||
local screens=$(swaymsg -t get_outputs -r)
|
||||
local show_active
|
||||
local show_inactive
|
||||
|
@ -250,7 +240,7 @@ function sway-screens {
|
|||
fi
|
||||
}
|
||||
|
||||
urlencode() {
|
||||
function ,urlencode() {
|
||||
# urlencode <string>
|
||||
|
||||
old_lc_collate=$LC_COLLATE
|
||||
|
@ -380,7 +370,7 @@ function _godocenum() {
|
|||
done
|
||||
}
|
||||
|
||||
function godoc() {
|
||||
function ,godoc() {
|
||||
if [ $# -eq 0 ]; then
|
||||
if which bat > /dev/null; then
|
||||
OBJ=$(_godocenum|fzf --height=80% --info=inline --reverse --border --margin=1 --padding=1 --preview="go doc {1}|bat --color always -p -l go")
|
||||
|
@ -395,40 +385,40 @@ function godoc() {
|
|||
|
||||
### paste.sr.ht
|
||||
|
||||
function pasteit() {
|
||||
function ,pasteit() {
|
||||
hut paste create ${@}
|
||||
}
|
||||
|
||||
### piknik
|
||||
|
||||
# pko <content> : copy <content> to the clipboard
|
||||
function pko() {
|
||||
function ,pko() {
|
||||
echo "$*" | piknik -copy
|
||||
}
|
||||
|
||||
# pkf <file> : copy the content of <file> to the clipboard
|
||||
function pkf() {
|
||||
function ,pkf() {
|
||||
piknik -copy < $1
|
||||
}
|
||||
|
||||
# pkc : read the content to copy to the clipboard from STDIN
|
||||
alias pkc='piknik -copy'
|
||||
alias ,pkc='piknik -copy'
|
||||
|
||||
# pkp : paste the clipboard content
|
||||
alias pkp='piknik -paste'
|
||||
alias ,pkp='piknik -paste'
|
||||
|
||||
# pkm : move the clipboard content
|
||||
alias pkm='piknik -move'
|
||||
alias ,pkm='piknik -move'
|
||||
|
||||
# pkz : delete the clipboard content
|
||||
alias pkz='piknik -copy < /dev/null'
|
||||
alias ,pkz='piknik -copy < /dev/null'
|
||||
|
||||
# pkfr [<dir>] : send a whole directory to the clipboard, as a tar archive
|
||||
function pkfr() {
|
||||
function ,pkfr() {
|
||||
tar czpvf - ${1:-.} | piknik -copy
|
||||
}
|
||||
|
||||
# pkpr : extract clipboard content sent using the pkfr command
|
||||
alias pkpr='piknik -paste | tar xzpvf -'
|
||||
alias ,pkpr='piknik -paste | tar xzpvf -'
|
||||
|
||||
# vim: set ft=zsh et sw=0 ts=2 sts=0:
|
||||
|
|
Loading…
Reference in a new issue