diff --git a/bash/kitty b/bash/kitty new file mode 100644 index 0000000..f0b6b07 --- /dev/null +++ b/bash/kitty @@ -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 + diff --git a/bash/prompt b/bash/prompt index 5a22a6e..ef9008f 100644 --- a/bash/prompt +++ b/bash/prompt @@ -57,8 +57,17 @@ set_prompt() { 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 - buffer="${buffer}${HOST%.local} " + buffer="${buffer}${hostname} " fi if [[ -n $STY ]]; then @@ -105,16 +114,16 @@ set_prompt() { local rbuffer="" - CMD_DURATION=${CMD_DURATION:-0} - local duration="${CMD_DURATION%.*}" + # CMD_DURATION=${CMD_DURATION:-0} + # local duration="${CMD_DURATION%.*}" - if [[ ${duration:-0} -gt 0 ]]; then - printf -v formatted_duration "%.3f" "${CMD_DURATION}" + # if [[ ${duration:-0} -gt 0 ]]; then + # printf -v formatted_duration "%.3f" "${CMD_DURATION}" - rbuffer=" %F{yellow}${formatted_duration}s${rbuffer}" - fi + # rbuffer=" %F{yellow}${formatted_duration}s${rbuffer}" + # 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 RPROMPT="${rbuffer}%f" diff --git a/bash/rc b/bash/rc index e10420b..dbfe45e 100644 --- a/bash/rc +++ b/bash/rc @@ -12,6 +12,9 @@ source $DOTFILES_BASH_DIR/completion source $DOTFILES_SHELL_DIR/go source $DOTFILES_SHELL_DIR/chruby 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 GIT_PS1_SHOWDIRTYSTATE=1 @@ -21,12 +24,12 @@ GIT_PS1_SHOWUNTRACKEDFILES=1 precmd() { CMD_RC=$? - if [[ -n ${CMD_START} ]]; then - CMD_END="${EPOCHREALTIME}" - CMD_DURATION=$(bc <<<"${CMD_END} - ${CMD_START}") - unset CMD_START - unset CMD_END - fi + # if [[ -n ${CMD_START} ]]; then + # CMD_END="${EPOCHREALTIME}" + # CMD_DURATION=$(bc <<<"${CMD_END} - ${CMD_START}") + # unset CMD_START + # unset CMD_END + # fi _direnv_hook #clear_incomplete_line diff --git a/home/Xresources b/home/Xresources index 7de0fe6..0877466 100644 --- a/home/Xresources +++ b/home/Xresources @@ -38,6 +38,10 @@ Xft.rgba: rgb Xft.hinting: true Xft.hintstyle: hintslight +!---- cursor ---- +Xcursor.size: 48 +Xcursor.theme: DMZ-Black + !---- xterm ---- @@ -94,7 +98,7 @@ xterm*color15: #ffffff !---- urxvt ---- -urxvt*geometry: 90x33 +urxvt*geometry: 80x24 urxvt*font: xft:Menlo:pixelsize=14,xft:AquaKana:pixelsize:14 urxvt*letterSpace: -2 urxvt*saveLines: 10240 diff --git a/shell/aliases b/shell/aliases index 79cbe0c..a46c1cf 100644 --- a/shell/aliases +++ b/shell/aliases @@ -5,12 +5,12 @@ case "$OSTYPE" in alias top="top -o cpu -s 5" ;; *linux*) - alias ls="ls --color" + alias ls="ls --color=no" ;; esac alias ll="ls -l" -alias tree="tree -C" +alias tree="tree -n" if command -v colordiff 2>&1 >/dev/null; then alias diff="colordiff" fi diff --git a/shell/gpg b/shell/gpg index 3e20921..a4bc470 100755 --- a/shell/gpg +++ b/shell/gpg @@ -2,4 +2,9 @@ #export GPG_TTY #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 diff --git a/shell/ssh b/shell/ssh index 5a9af10..be2a477 100755 --- a/shell/ssh +++ b/shell/ssh @@ -18,6 +18,11 @@ if [[ -n "${SSH_AUTH_SOCK}" ]]; then case "${OSTYPE}" in linux*) # 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*) diff --git a/zsh/kitty b/zsh/kitty new file mode 100644 index 0000000..5b9ae5f --- /dev/null +++ b/zsh/kitty @@ -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 diff --git a/zsh/prompt b/zsh/prompt index 1a9f56b..804ecce 100644 --- a/zsh/prompt +++ b/zsh/prompt @@ -131,8 +131,17 @@ set_prompt() { 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 - buffer="${buffer}${HOST%.local} " + buffer="${buffer}${hostname} " fi if [[ -n $STY ]]; then diff --git a/zsh/rc b/zsh/rc index 12206d4..97deea4 100644 --- a/zsh/rc +++ b/zsh/rc @@ -14,6 +14,7 @@ source $DOTFILES_ZSH_DIR/prompt source $DOTFILES_ZSH_DIR/fzf source $DOTFILES_SHELL_DIR/go source $DOTFILES_SHELL_DIR/direnv +source $DOTFILES_ZSH_DIR/kitty set -o ignoreeof unsetopt BEEP