Compare commits

...

9 commits

10 changed files with 65 additions and 18 deletions

5
bash/kitty Normal file
View file

@ -0,0 +1,5 @@
if test -n "$KITTY_INSTALLATION_DIR"; then
export KITTY_SHELL_INTEGRATION="enabled"
source "$KITTY_INSTALLATION_DIR/shell-integration/bash/kitty.bash"
fi

View file

@ -57,8 +57,17 @@ set_prompt() {
local buffer="" local buffer=""
local hostname=""
if [[ -n $HOST ]]; then
hostname="${HOST%.local}"
elif [[ -n $HOSTNAME ]]; then
hostname="${HOSTNAME}"
else
hostname="$(hostname -s)"
fi
if [[ -n $SSH_CLIENT ]]; then if [[ -n $SSH_CLIENT ]]; then
buffer="${buffer}${HOST%.local} " buffer="${buffer}${hostname} "
fi fi
if [[ -n $STY ]]; then if [[ -n $STY ]]; then
@ -105,16 +114,16 @@ set_prompt() {
local rbuffer="" local rbuffer=""
CMD_DURATION=${CMD_DURATION:-0} # CMD_DURATION=${CMD_DURATION:-0}
local duration="${CMD_DURATION%.*}" # local duration="${CMD_DURATION%.*}"
if [[ ${duration:-0} -gt 0 ]]; then # if [[ ${duration:-0} -gt 0 ]]; then
printf -v formatted_duration "%.3f" "${CMD_DURATION}" # printf -v formatted_duration "%.3f" "${CMD_DURATION}"
rbuffer=" %F{yellow}${formatted_duration}s${rbuffer}" # rbuffer=" %F{yellow}${formatted_duration}s${rbuffer}"
fi # fi
[[ ${CMD_RC} -ne 0 ]] && rbuffer=" %F{red}${CMD_RC}${rbuffer}" # [[ ${CMD_RC} -ne 0 ]] && rbuffer=" %F{red}${CMD_RC}${rbuffer}"
if [[ -n "${rbuffer}" ]]; then if [[ -n "${rbuffer}" ]]; then
RPROMPT="${rbuffer}%f" RPROMPT="${rbuffer}%f"

15
bash/rc
View file

@ -12,6 +12,9 @@ source $DOTFILES_BASH_DIR/completion
source $DOTFILES_SHELL_DIR/go source $DOTFILES_SHELL_DIR/go
source $DOTFILES_SHELL_DIR/chruby source $DOTFILES_SHELL_DIR/chruby
source $DOTFILES_BASH_DIR/fzf source $DOTFILES_BASH_DIR/fzf
source $DOTFILES_SHELL_DIR/direnv
source $DOTFILES_SHELL_DIR/kd
source $DOTFILES_BASH_DIR/kitty
source $DOTFILES_SHELL_DIR/git_prompt_info source $DOTFILES_SHELL_DIR/git_prompt_info
GIT_PS1_SHOWDIRTYSTATE=1 GIT_PS1_SHOWDIRTYSTATE=1
@ -21,12 +24,12 @@ GIT_PS1_SHOWUNTRACKEDFILES=1
precmd() { precmd() {
CMD_RC=$? CMD_RC=$?
if [[ -n ${CMD_START} ]]; then # if [[ -n ${CMD_START} ]]; then
CMD_END="${EPOCHREALTIME}" # CMD_END="${EPOCHREALTIME}"
CMD_DURATION=$(bc <<<"${CMD_END} - ${CMD_START}") # CMD_DURATION=$(bc <<<"${CMD_END} - ${CMD_START}")
unset CMD_START # unset CMD_START
unset CMD_END # unset CMD_END
fi # fi
_direnv_hook _direnv_hook
#clear_incomplete_line #clear_incomplete_line

View file

@ -38,6 +38,10 @@ Xft.rgba: rgb
Xft.hinting: true Xft.hinting: true
Xft.hintstyle: hintslight Xft.hintstyle: hintslight
!---- cursor ----
Xcursor.size: 48
Xcursor.theme: DMZ-Black
!---- xterm ---- !---- xterm ----
@ -94,7 +98,7 @@ xterm*color15: #ffffff
!---- urxvt ---- !---- urxvt ----
urxvt*geometry: 90x33 urxvt*geometry: 80x24
urxvt*font: xft:Menlo:pixelsize=14,xft:AquaKana:pixelsize:14 urxvt*font: xft:Menlo:pixelsize=14,xft:AquaKana:pixelsize:14
urxvt*letterSpace: -2 urxvt*letterSpace: -2
urxvt*saveLines: 10240 urxvt*saveLines: 10240

View file

@ -5,12 +5,12 @@ case "$OSTYPE" in
alias top="top -o cpu -s 5" alias top="top -o cpu -s 5"
;; ;;
*linux*) *linux*)
alias ls="ls --color" alias ls="ls --color=no"
;; ;;
esac esac
alias ll="ls -l" alias ll="ls -l"
alias tree="tree -C" alias tree="tree -n"
if command -v colordiff 2>&1 >/dev/null; then if command -v colordiff 2>&1 >/dev/null; then
alias diff="colordiff" alias diff="colordiff"
fi fi

View file

@ -2,4 +2,9 @@
#export GPG_TTY #export GPG_TTY
#gpg-connect-agent updatestartuptty /bye >/dev/null #gpg-connect-agent updatestartuptty /bye >/dev/null
if ps -u "${USER}" | grep -v grep | grep -q gpg-agent; then
:
elif type pinentry-rofi >/dev/null 2>&1; then
gpg-agent --homedir /home/lloeki/.gnupg --use-standard-socket --daemon --pinentry-program=/etc/profiles/per-user/lloeki/bin/pinentry-rofi
fi
# vim: ft=bash # vim: ft=bash

View file

@ -18,6 +18,11 @@ if [[ -n "${SSH_AUTH_SOCK}" ]]; then
case "${OSTYPE}" in case "${OSTYPE}" in
linux*) linux*)
# TODO: unsure yet # TODO: unsure yet
# maybe:
# ssh-add ~/.ssh/id_*[!.pub]
# or on demand:
# see ssh_config(5) AddKeysToAgent yes or ask
# see ssh(1) SSH_ASKPASS=/path/to/ask / SSH_ASKPASS_REQUIRE=prefer
: :
;; ;;
darwin*) darwin*)

6
zsh/kitty Normal file
View file

@ -0,0 +1,6 @@
if test -n "$KITTY_INSTALLATION_DIR"; then
export KITTY_SHELL_INTEGRATION="enabled"
autoload -Uz -- "$KITTY_INSTALLATION_DIR"/shell-integration/zsh/kitty-integration
kitty-integration
unfunction kitty-integration
fi

View file

@ -131,8 +131,17 @@ set_prompt() {
local buffer="" local buffer=""
local hostname=""
if [[ -n $HOST ]]; then
hostname="${HOST%.local}"
elif [[ -n $HOSTNAME ]]; then
hostname="${HOSTNAME}"
else
hostname="$(hostname -s)"
fi
if [[ -n $SSH_CLIENT ]]; then if [[ -n $SSH_CLIENT ]]; then
buffer="${buffer}${HOST%.local} " buffer="${buffer}${hostname} "
fi fi
if [[ -n $STY ]]; then if [[ -n $STY ]]; then

1
zsh/rc
View file

@ -14,6 +14,7 @@ source $DOTFILES_ZSH_DIR/prompt
source $DOTFILES_ZSH_DIR/fzf source $DOTFILES_ZSH_DIR/fzf
source $DOTFILES_SHELL_DIR/go source $DOTFILES_SHELL_DIR/go
source $DOTFILES_SHELL_DIR/direnv source $DOTFILES_SHELL_DIR/direnv
source $DOTFILES_ZSH_DIR/kitty
set -o ignoreeof set -o ignoreeof
unsetopt BEEP unsetopt BEEP