Add vi-cursor zo zsh
This commit is contained in:
@@ -110,6 +110,7 @@ profiles:
|
|||||||
- scripts
|
- scripts
|
||||||
dev:
|
dev:
|
||||||
include:
|
include:
|
||||||
|
- zsh
|
||||||
- vim
|
- vim
|
||||||
- tmux
|
- tmux
|
||||||
|
|
||||||
|
|||||||
2
dotdrop
2
dotdrop
Submodule dotdrop updated: 2a67c49edd...f1ce2eb198
@@ -73,7 +73,7 @@
|
|||||||
# * foreground: use the same color as the foreground;
|
# * foreground: use the same color as the foreground;
|
||||||
# * frame: use the same color as the frame;
|
# * frame: use the same color as the frame;
|
||||||
# * anything else will be interpreted as a X color.
|
# * anything else will be interpreted as a X color.
|
||||||
separator_color = frame
|
separator_color = auto
|
||||||
|
|
||||||
# Sort messages by urgency.
|
# Sort messages by urgency.
|
||||||
sort = yes
|
sort = yes
|
||||||
@@ -247,25 +247,25 @@
|
|||||||
[urgency_low]
|
[urgency_low]
|
||||||
# IMPORTANT: colors have to be defined in quotation marks.
|
# IMPORTANT: colors have to be defined in quotation marks.
|
||||||
# Otherwise the "#" and following would be interpreted as a comment.
|
# Otherwise the "#" and following would be interpreted as a comment.
|
||||||
background = "#A3BE8C"
|
background = "#2E3440"
|
||||||
foreground = "#2E3440"
|
foreground = "#ECEFF4"
|
||||||
frame_color = "#A3BE8C"
|
frame_color = "#A3BE8C"
|
||||||
timeout = 10
|
timeout = 10
|
||||||
# Icon for notifications with low urgency, uncomment to enable
|
# Icon for notifications with low urgency, uncomment to enable
|
||||||
#icon = /path/to/icon
|
#icon = /path/to/icon
|
||||||
|
|
||||||
[urgency_normal]
|
[urgency_normal]
|
||||||
background = "#A3BE8C"
|
background = "#2E3440"
|
||||||
foreground = "#2E3440"
|
foreground = "#ECEFF4"
|
||||||
frame_color = "#A3BE8C"
|
frame_color = "#A3BE8C"
|
||||||
timeout = 10
|
timeout = 10
|
||||||
# Icon for notifications with normal urgency, uncomment to enable
|
# Icon for notifications with normal urgency, uncomment to enable
|
||||||
#icon = /path/to/icon
|
#icon = /path/to/icon
|
||||||
|
|
||||||
[urgency_critical]
|
[urgency_critical]
|
||||||
background = "#A3BE8C"
|
background = "#2E3440"
|
||||||
foreground = "#2E3440"
|
foreground = "#ECEFF4"
|
||||||
frame_color = "#A3BE8C"
|
frame_color = "#BF616A"
|
||||||
timeout = 0
|
timeout = 0
|
||||||
# Icon for notifications with critical urgency, uncomment to enable
|
# Icon for notifications with critical urgency, uncomment to enable
|
||||||
#icon = /path/to/icon
|
#icon = /path/to/icon
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ module-margin = 1
|
|||||||
|
|
||||||
modules-left = i3tabs title
|
modules-left = i3tabs title
|
||||||
modules-center = spotify_current
|
modules-center = spotify_current
|
||||||
modules-right = firefox spotify discord pipe backlight volume battery pipe network pipe date time pipe
|
modules-right = firefox spotify discord pipe backlight volume battery pipe date time pipe
|
||||||
separator =
|
separator =
|
||||||
|
|
||||||
wm-name = i3
|
wm-name = i3
|
||||||
@@ -81,7 +81,7 @@ monitor = ${env:MONITOR:}
|
|||||||
|
|
||||||
modules-left = i3tabs title
|
modules-left = i3tabs title
|
||||||
modules-center = spotify_current
|
modules-center = spotify_current
|
||||||
modules-right = firefox spotify discord pipe volume battery pipe network pipe date time
|
modules-right = firefox spotify discord pipe volume battery pipe date time
|
||||||
separator =
|
separator =
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ configuration {
|
|||||||
hide-scrollbar: true;
|
hide-scrollbar: true;
|
||||||
separator-style: none;
|
separator-style: none;
|
||||||
show-icons: true;
|
show-icons: true;
|
||||||
terminal: "xterm";
|
terminal: "alacritty";
|
||||||
font: "Inconsolata 13";
|
font: "Inconsolata 13";
|
||||||
lines: 7;
|
lines: 7;
|
||||||
display-drun: "理";
|
display-drun: "理";
|
||||||
|
|||||||
@@ -49,6 +49,9 @@ if [ -f ~/.zshrc_local ]; then
|
|||||||
source ~/.zshrc_local
|
source ~/.zshrc_local
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
## Keybinds
|
||||||
|
bindkey -s "^e" "ranger\n"
|
||||||
|
|
||||||
## Completion
|
## Completion
|
||||||
unsetopt menu_complete # do not autoselect the first completion entry
|
unsetopt menu_complete # do not autoselect the first completion entry
|
||||||
unsetopt flowcontrol
|
unsetopt flowcontrol
|
||||||
@@ -94,6 +97,29 @@ fi
|
|||||||
bindkey -v
|
bindkey -v
|
||||||
export KEYTIMEOUT=1
|
export KEYTIMEOUT=1
|
||||||
|
|
||||||
|
# Change cursor shape for different vi modes.
|
||||||
|
function zle-keymap-select {
|
||||||
|
if [[ ${KEYMAP} == vicmd ]] ||
|
||||||
|
[[ $1 = 'block' ]]; then
|
||||||
|
echo -ne '\e[1 q'
|
||||||
|
elif [[ ${KEYMAP} == main ]] ||
|
||||||
|
[[ ${KEYMAP} == viins ]] ||
|
||||||
|
[[ ${KEYMAP} = '' ]] ||
|
||||||
|
[[ $1 = 'beam' ]]; then
|
||||||
|
echo -ne '\e[5 q'
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
zle -N zle-keymap-select
|
||||||
|
|
||||||
|
zle-line-init() {
|
||||||
|
zle -K viins # initiate `vi insert` as keymap (can be removed if `bindkey -V` has been set elsewhere)
|
||||||
|
echo -ne "\e[5 q"
|
||||||
|
}
|
||||||
|
zle -N zle-line-init
|
||||||
|
|
||||||
|
echo -ne '\e[5 q' # Use beam shape cursor on startup.
|
||||||
|
precmd() { echo -ne '\e[5 q' ;} # Use beam shape cursor for each new prompt.
|
||||||
|
|
||||||
# Enable backspace to delete in vi-mode
|
# Enable backspace to delete in vi-mode
|
||||||
bindkey -v '^?' backward-delete-char
|
bindkey -v '^?' backward-delete-char
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user