mirror of
https://github.com/kristoferssolo/solorice.git
synced 2025-10-21 20:10:34 +00:00
Merge branch 'master' of github.com:kristoferssolo/config
This commit is contained in:
commit
62035b9b7b
@ -758,54 +758,54 @@ key_bindings:
|
|||||||
# - { key: Key9, mods: Control|Shift, action: CreateNewWindow, }
|
# - { key: Key9, mods: Control|Shift, action: CreateNewWindow, }
|
||||||
|
|
||||||
# Vi Mode
|
# Vi Mode
|
||||||
- { key: Space, mods: Shift|Control, mode: ~Search, action: ToggleViMode }
|
# - { key: Space, mods: Shift|Control, mode: ~Search, action: ToggleViMode }
|
||||||
- { key: Space, mods: Shift|Control, mode: Vi|~Search, action: ScrollToBottom }
|
# - { key: Space, mods: Shift|Control, mode: Vi|~Search, action: ScrollToBottom }
|
||||||
# - { key: Escape, mode: ~Search, action: ToggleViMode }
|
# - { key: Escape, mode: ~Search, action: ToggleViMode }
|
||||||
- { key: Escape, mode: Vi|~Search, action: ClearSelection }
|
# - { key: Escape, mode: Vi|~Search, action: ClearSelection }
|
||||||
- { key: I, mode: Vi|~Search, action: ToggleViMode }
|
# - { key: I, mode: Vi|~Search, action: ToggleViMode }
|
||||||
- { key: I, mode: Vi|~Search, action: ScrollToBottom }
|
# - { key: I, mode: Vi|~Search, action: ScrollToBottom }
|
||||||
- { key: C, mods: Control, mode: Vi|~Search, action: ToggleViMode }
|
# - { key: C, mods: Control, mode: Vi|~Search, action: ToggleViMode }
|
||||||
- { key: Y, mods: Control, mode: Vi|~Search, action: ScrollLineUp }
|
# - { key: Y, mods: Control, mode: Vi|~Search, action: ScrollLineUp }
|
||||||
- { key: E, mods: Control, mode: Vi|~Search, action: ScrollLineDown }
|
# - { key: E, mods: Control, mode: Vi|~Search, action: ScrollLineDown }
|
||||||
- { key: G, mode: Vi|~Search, action: ScrollToTop }
|
# - { key: G, mode: Vi|~Search, action: ScrollToTop }
|
||||||
- { key: G, mods: Shift, mode: Vi|~Search, action: ScrollToBottom }
|
# - { key: G, mods: Shift, mode: Vi|~Search, action: ScrollToBottom }
|
||||||
- { key: B, mods: Control, mode: Vi|~Search, action: ScrollPageUp }
|
# - { key: B, mods: Control, mode: Vi|~Search, action: ScrollPageUp }
|
||||||
- { key: F, mods: Control, mode: Vi|~Search, action: ScrollPageDown }
|
# - { key: F, mods: Control, mode: Vi|~Search, action: ScrollPageDown }
|
||||||
- { key: U, mods: Control, mode: Vi|~Search, action: ScrollHalfPageUp }
|
# - { key: U, mods: Control, mode: Vi|~Search, action: ScrollHalfPageUp }
|
||||||
- { key: D, mods: Control, mode: Vi|~Search, action: ScrollHalfPageDown }
|
# - { key: D, mods: Control, mode: Vi|~Search, action: ScrollHalfPageDown }
|
||||||
- { key: Y, mode: Vi|~Search, action: Copy }
|
# - { key: Y, mode: Vi|~Search, action: Copy }
|
||||||
- { key: Y, mode: Vi|~Search, action: ClearSelection }
|
# - { key: Y, mode: Vi|~Search, action: ClearSelection }
|
||||||
- { key: Copy, mode: Vi|~Search, action: ClearSelection }
|
# - { key: Copy, mode: Vi|~Search, action: ClearSelection }
|
||||||
- { key: V, mode: Vi|~Search, action: ToggleNormalSelection }
|
# - { key: V, mode: Vi|~Search, action: ToggleNormalSelection }
|
||||||
- { key: V, mods: Shift, mode: Vi|~Search, action: ToggleLineSelection }
|
# - { key: V, mods: Shift, mode: Vi|~Search, action: ToggleLineSelection }
|
||||||
- { key: V, mods: Control, mode: Vi|~Search, action: ToggleBlockSelection }
|
# - { key: V, mods: Control, mode: Vi|~Search, action: ToggleBlockSelection }
|
||||||
- { key: V, mods: Alt, mode: Vi|~Search, action: ToggleSemanticSelection }
|
# - { key: V, mods: Alt, mode: Vi|~Search, action: ToggleSemanticSelection }
|
||||||
- { key: Return, mode: Vi|~Search, action: Open }
|
# - { key: Return, mode: Vi|~Search, action: Open }
|
||||||
- { key: K, mode: Vi|~Search, action: Up }
|
# - { key: K, mode: Vi|~Search, action: Up }
|
||||||
- { key: J, mode: Vi|~Search, action: Down }
|
# - { key: J, mode: Vi|~Search, action: Down }
|
||||||
- { key: H, mode: Vi|~Search, action: Left }
|
# - { key: H, mode: Vi|~Search, action: Left }
|
||||||
- { key: L, mode: Vi|~Search, action: Right }
|
# - { key: L, mode: Vi|~Search, action: Right }
|
||||||
- { key: Up, mode: Vi|~Search, action: Up }
|
# - { key: Up, mode: Vi|~Search, action: Up }
|
||||||
- { key: Down, mode: Vi|~Search, action: Down }
|
# - { key: Down, mode: Vi|~Search, action: Down }
|
||||||
- { key: Left, mode: Vi|~Search, action: Left }
|
# - { key: Left, mode: Vi|~Search, action: Left }
|
||||||
- { key: Right, mode: Vi|~Search, action: Right }
|
# - { key: Right, mode: Vi|~Search, action: Right }
|
||||||
- { key: Key0, mode: Vi|~Search, action: First }
|
# - { key: Key0, mode: Vi|~Search, action: First }
|
||||||
- { key: Key4, mods: Shift, mode: Vi|~Search, action: Last }
|
# - { key: Key4, mods: Shift, mode: Vi|~Search, action: Last }
|
||||||
- { key: Key6, mods: Shift, mode: Vi|~Search, action: FirstOccupied }
|
# - { key: Key6, mods: Shift, mode: Vi|~Search, action: FirstOccupied }
|
||||||
- { key: H, mods: Shift, mode: Vi|~Search, action: High }
|
# - { key: H, mods: Shift, mode: Vi|~Search, action: High }
|
||||||
- { key: M, mods: Shift, mode: Vi|~Search, action: Middle }
|
# - { key: M, mods: Shift, mode: Vi|~Search, action: Middle }
|
||||||
- { key: L, mods: Shift, mode: Vi|~Search, action: Low }
|
# - { key: L, mods: Shift, mode: Vi|~Search, action: Low }
|
||||||
- { key: B, mode: Vi|~Search, action: SemanticLeft }
|
# - { key: B, mode: Vi|~Search, action: SemanticLeft }
|
||||||
- { key: W, mode: Vi|~Search, action: SemanticRight }
|
# - { key: W, mode: Vi|~Search, action: SemanticRight }
|
||||||
- { key: E, mode: Vi|~Search, action: SemanticRightEnd }
|
# - { key: E, mode: Vi|~Search, action: SemanticRightEnd }
|
||||||
- { key: B, mods: Shift, mode: Vi|~Search, action: WordLeft }
|
# - { key: B, mods: Shift, mode: Vi|~Search, action: WordLeft }
|
||||||
- { key: W, mods: Shift, mode: Vi|~Search, action: WordRight }
|
# - { key: W, mods: Shift, mode: Vi|~Search, action: WordRight }
|
||||||
- { key: E, mods: Shift, mode: Vi|~Search, action: WordRightEnd }
|
# - { key: E, mods: Shift, mode: Vi|~Search, action: WordRightEnd }
|
||||||
- { key: Key5, mods: Shift, mode: Vi|~Search, action: Bracket }
|
# - { key: Key5, mods: Shift, mode: Vi|~Search, action: Bracket }
|
||||||
- { key: Slash, mode: Vi|~Search, action: SearchForward }
|
# - { key: Slash, mode: Vi|~Search, action: SearchForward }
|
||||||
- { key: Slash, mods: Shift, mode: Vi|~Search, action: SearchBackward }
|
# - { key: Slash, mods: Shift, mode: Vi|~Search, action: SearchBackward }
|
||||||
- { key: N, mode: Vi|~Search, action: SearchNext }
|
# - { key: N, mode: Vi|~Search, action: SearchNext }
|
||||||
- { key: N, mods: Shift, mode: Vi|~Search, action: SearchPrevious }
|
# - { key: N, mods: Shift, mode: Vi|~Search, action: SearchPrevious }
|
||||||
|
|
||||||
# Search Mode
|
# Search Mode
|
||||||
#- { key: Return, mode: Search|Vi, action: SearchConfirm }
|
#- { key: Return, mode: Search|Vi, action: SearchConfirm }
|
||||||
|
|||||||
@ -357,17 +357,17 @@ globalkeys = gears.table.join(
|
|||||||
awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(-1) end,
|
awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(-1) end,
|
||||||
{description = "select previous", group = "layout"}),
|
{description = "select previous", group = "layout"}),
|
||||||
|
|
||||||
awful.key({ modkey, "Control" }, "n",
|
-- awful.key({ modkey, "Control" }, "n",
|
||||||
function ()
|
-- function ()
|
||||||
local c = awful.client.restore()
|
-- local c = awful.client.restore()
|
||||||
-- Focus restored client
|
-- -- Focus restored client
|
||||||
if c then
|
-- if c then
|
||||||
c:emit_signal(
|
-- c:emit_signal(
|
||||||
"request::activate", "key.unminimize", {raise = true}
|
-- "request::activate", "key.unminimize", {raise = true}
|
||||||
)
|
-- )
|
||||||
end
|
-- end
|
||||||
end,
|
-- end,
|
||||||
{description = "restore minimized", group = "client"}),
|
-- {description = "restore minimized", group = "client"}),
|
||||||
|
|
||||||
-- Prompt
|
-- Prompt
|
||||||
awful.key({ modkey }, "r", function () awful.screen.focused().mypromptbox:run() end,
|
awful.key({ modkey }, "r", function () awful.screen.focused().mypromptbox:run() end,
|
||||||
@ -404,32 +404,32 @@ clientkeys = gears.table.join(
|
|||||||
awful.key({ modkey, }, "o", function (c) c:move_to_screen() end,
|
awful.key({ modkey, }, "o", function (c) c:move_to_screen() end,
|
||||||
{description = "move to screen", group = "client"}),
|
{description = "move to screen", group = "client"}),
|
||||||
awful.key({ modkey, }, "t", function (c) c.ontop = not c.ontop end,
|
awful.key({ modkey, }, "t", function (c) c.ontop = not c.ontop end,
|
||||||
{description = "toggle keep on top", group = "client"}),
|
{description = "toggle keep on top", group = "client"})
|
||||||
awful.key({ modkey, }, "n",
|
-- awful.key({ modkey, }, "n",
|
||||||
function (c)
|
-- function (c)
|
||||||
-- The client currently has the input focus, so it cannot be
|
-- -- The client currently has the input focus, so it cannot be
|
||||||
-- minimized, since minimized clients can't have the focus.
|
-- -- minimized, since minimized clients can't have the focus.
|
||||||
c.minimized = true
|
-- c.minimized = true
|
||||||
end ,
|
-- end ,
|
||||||
{description = "minimize", group = "client"}),
|
-- {description = "minimize", group = "client"}),
|
||||||
awful.key({ modkey, }, "m",
|
-- awful.key({ modkey, }, "m",
|
||||||
function (c)
|
-- function (c)
|
||||||
c.maximized = not c.maximized
|
-- c.maximized = not c.maximized
|
||||||
c:raise()
|
-- c:raise()
|
||||||
end ,
|
-- end ,
|
||||||
{description = "(un)maximize", group = "client"}),
|
-- {description = "(un)maximize", group = "client"}),
|
||||||
awful.key({ modkey, "Control" }, "m",
|
-- awful.key({ modkey, "Control" }, "m",
|
||||||
function (c)
|
-- function (c)
|
||||||
c.maximized_vertical = not c.maximized_vertical
|
-- c.maximized_vertical = not c.maximized_vertical
|
||||||
c:raise()
|
-- c:raise()
|
||||||
end ,
|
-- end ,
|
||||||
{description = "(un)maximize vertically", group = "client"}),
|
-- {description = "(un)maximize vertically", group = "client"}),
|
||||||
awful.key({ modkey, "Shift" }, "m",
|
-- awful.key({ modkey, "Shift" }, "m",
|
||||||
function (c)
|
-- function (c)
|
||||||
c.maximized_horizontal = not c.maximized_horizontal
|
-- c.maximized_horizontal = not c.maximized_horizontal
|
||||||
c:raise()
|
-- c:raise()
|
||||||
end ,
|
-- end ,
|
||||||
{description = "(un)maximize horizontally", group = "client"})
|
-- {description = "(un)maximize horizontally", group = "client"})
|
||||||
)
|
)
|
||||||
|
|
||||||
-- Bind all key numbers to tags.
|
-- Bind all key numbers to tags.
|
||||||
|
|||||||
@ -47,14 +47,14 @@ graph_symbol_net = "default"
|
|||||||
graph_symbol_proc = "default"
|
graph_symbol_proc = "default"
|
||||||
|
|
||||||
#* Manually set which boxes to show. Available values are "cpu mem net proc", separate values with whitespace.
|
#* Manually set which boxes to show. Available values are "cpu mem net proc", separate values with whitespace.
|
||||||
shown_boxes = "cpu mem net proc"
|
shown_boxes = "cpu mem proc net"
|
||||||
|
|
||||||
#* Update time in milliseconds, recommended 2000 ms or above for better sample times for graphs.
|
#* Update time in milliseconds, recommended 2000 ms or above for better sample times for graphs.
|
||||||
update_ms = 1000
|
update_ms = 1000
|
||||||
|
|
||||||
#* Processes sorting, "pid" "program" "arguments" "threads" "user" "memory" "cpu lazy" "cpu direct",
|
#* Processes sorting, "pid" "program" "arguments" "threads" "user" "memory" "cpu lazy" "cpu direct",
|
||||||
#* "cpu lazy" sorts top process over time (easier to follow), "cpu direct" updates top process directly.
|
#* "cpu lazy" sorts top process over time (easier to follow), "cpu direct" updates top process directly.
|
||||||
proc_sorting = "memory"
|
proc_sorting = "cpu direct"
|
||||||
|
|
||||||
#* Reverse sorting order, True or False.
|
#* Reverse sorting order, True or False.
|
||||||
proc_reversed = False
|
proc_reversed = False
|
||||||
|
|||||||
@ -19,4 +19,3 @@ UpgradeMenu
|
|||||||
#
|
#
|
||||||
[bin]
|
[bin]
|
||||||
FileManager = lfrun
|
FileManager = lfrun
|
||||||
Sudo = /bin/doas
|
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
[{"analyzerName":"intellisense-members-lstm-pylance","languageName":"python","identity":{"modelId":"E61945A9A512ED5E1A3EE3F1A2365B88F8FE","outputId":"E4E9EADA96734F01970E616FAB2FAC19","modifiedTimeUtc":"2020-08-11T14:06:50.811Z"},"filePath":"/home/kristofers/.vscode/extensions/visualstudioexptteam.vscodeintellicode-1.2.20/cache/E61945A9A512ED5E1A3EE3F1A2365B88F8FE_E4E9EADA96734F01970E616FAB2FAC19","lastAccessTimeUtc":"2022-04-28T19:18:31.015Z"}]
|
[{"analyzerName":"intellisense-members-lstm-pylance","languageName":"python","identity":{"modelId":"E61945A9A512ED5E1A3EE3F1A2365B88F8FE","outputId":"E4E9EADA96734F01970E616FAB2FAC19","modifiedTimeUtc":"2020-08-11T14:06:50.811Z"},"filePath":"/home/kristofers/.vscode/extensions/visualstudioexptteam.vscodeintellicode-1.2.20/cache/E61945A9A512ED5E1A3EE3F1A2365B88F8FE_E4E9EADA96734F01970E616FAB2FAC19","lastAccessTimeUtc":"2022-04-28T20:51:11.821Z"}]
|
||||||
@ -67,12 +67,51 @@
|
|||||||
"workbench.iconTheme": "material-icon-theme",
|
"workbench.iconTheme": "material-icon-theme",
|
||||||
"json.schemas": [],
|
"json.schemas": [],
|
||||||
"workbench.enableExperiments": false,
|
"workbench.enableExperiments": false,
|
||||||
"workbench.colorTheme": "Sweet Dracula",
|
|
||||||
"editor.fontFamily": "JetBrainsMono NF",
|
"editor.fontFamily": "JetBrainsMono NF",
|
||||||
"markdown.extension.print.theme": "dark",
|
"markdown.extension.print.theme": "dark",
|
||||||
"editor.fontLigatures": true,
|
"editor.fontLigatures": true,
|
||||||
"editor.formatOnSave": true,
|
"editor.formatOnSave": true,
|
||||||
"code-runner.saveFileBeforeRun": true,
|
"code-runner.saveFileBeforeRun": true,
|
||||||
"code-runner.saveAllFilesBeforeRun": true,
|
"code-runner.saveAllFilesBeforeRun": true,
|
||||||
"task.saveBeforeRun": "prompt"
|
"task.saveBeforeRun": "prompt",
|
||||||
|
"tabnine.experimentalAutoImports": true,
|
||||||
|
"editor.tokenColorCustomizations": {
|
||||||
|
"textMateRules": [
|
||||||
|
{
|
||||||
|
"name": "One Dark italic",
|
||||||
|
"scope": [
|
||||||
|
"comment",
|
||||||
|
"entity.other.attribute-name",
|
||||||
|
"keyword",
|
||||||
|
"markup.underline.link",
|
||||||
|
"storage.modifier",
|
||||||
|
"storage.type",
|
||||||
|
"string.url",
|
||||||
|
"variable.language.super",
|
||||||
|
"variable.language.this"
|
||||||
|
],
|
||||||
|
"settings": {
|
||||||
|
"fontStyle": "italic"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "One Dark italic reset",
|
||||||
|
"scope": [
|
||||||
|
"keyword.operator",
|
||||||
|
"keyword.other.type",
|
||||||
|
"storage.modifier.import",
|
||||||
|
"storage.modifier.package",
|
||||||
|
"storage.type.built-in",
|
||||||
|
"storage.type.function.arrow",
|
||||||
|
"storage.type.generic",
|
||||||
|
"storage.type.java",
|
||||||
|
"storage.type.primitive"
|
||||||
|
],
|
||||||
|
"settings": {
|
||||||
|
"fontStyle": ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"workbench.colorTheme": "Sweet Dracula"
|
||||||
}
|
}
|
||||||
93
zsh/.zshrc
93
zsh/.zshrc
@ -1,4 +1,3 @@
|
|||||||
# Clear terminal
|
|
||||||
# clear
|
# clear
|
||||||
# cd ~
|
# cd ~
|
||||||
|
|
||||||
@ -7,28 +6,34 @@ fastfetch
|
|||||||
# pfetch
|
# pfetch
|
||||||
|
|
||||||
# Options
|
# Options
|
||||||
# setopt correct # Auto correct mistakes
|
# setopt correct # Auto correct mistakes
|
||||||
setopt extendedglob # Extended globaling. Allows using regular expressions with *
|
setopt extendedglob # Extended globaling. Allows using regular expressions with *
|
||||||
setopt nocaseglob # Case insensative globbing
|
setopt nocaseglob # Case insensative globbing
|
||||||
setopt numericglobsort # Sort filenames numeracally when it makse sense
|
setopt numericglobsort # Sort filenames numeracally when it makse sense
|
||||||
setopt nobeep # No beep
|
setopt nobeep # No beep
|
||||||
setopt appendhistory # Immediately append history instead of overwriting
|
setopt appendhistory # Immediately append history instead of overwriting
|
||||||
setopt histignorealldups # If a new command is a duplicate, remove older one
|
setopt histignorealldups # If a new command is a duplicate, remove older one
|
||||||
setopt autocd # If only directory path is entered, cd there
|
setopt autocd # If only directory path is entered, cd there
|
||||||
setopt inc_append_history # Save commands are addded to the history immediately
|
setopt inc_append_history # Save commands are addded to the history immediately
|
||||||
setopt histignorespace # Don't save commands that start with space
|
setopt histignorespace # Don't save commands that start with space
|
||||||
|
|
||||||
autoload -U select-word-style
|
autoload -U select-word-style
|
||||||
|
|
||||||
|
# Themeing
|
||||||
|
autoload -U colors && colors
|
||||||
|
|
||||||
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' # Case sensetive TAB completions
|
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' # Case sensetive TAB completions
|
||||||
zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}" # Colored completion (different colors fr dirs/files/etc)
|
zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}" # Colored completion (different colors fr dirs/files/etc)
|
||||||
zstyle ':completion:*' rehash true # Automaticly find new executables in path
|
zstyle ':completion:*' rehash true # Automaticly find new executables in path
|
||||||
# Speed up completions
|
# Speed up completions
|
||||||
zstyle ':completion:*' accept-exact '*(N)'
|
zstyle ':completion:*' accept-exact '*(N)'
|
||||||
zstyle ':completion:*' use-cache on
|
zstyle ':completion:*' use-cache on
|
||||||
zstyle ':completion:*' cache-path ~/.config/zsh/cache
|
zstyle ':completion:*' cache-path ~/.config/zsh/cache
|
||||||
zstyle ':completion:*' menu select
|
zstyle ':completion:*' menu select
|
||||||
|
autoload -U compinit
|
||||||
|
zmodload zsh/complist
|
||||||
|
compinit
|
||||||
|
_comp_options+=(globdots) # Include hidden files
|
||||||
|
|
||||||
HISTFILE=~/.config/zsh/.zshistory
|
HISTFILE=~/.config/zsh/.zshistory
|
||||||
HISTSIZE=10000
|
HISTSIZE=10000
|
||||||
@ -37,40 +42,24 @@ WORDCHARS=${WORDCHARS//\/[&.;]} # Don't consider certain part of the word
|
|||||||
|
|
||||||
|
|
||||||
# theme/plugins
|
# theme/plugins
|
||||||
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh 2>/dev/null
|
||||||
source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
|
source /usr/share/zsh/plugins/zsh-history-substring-search/zsh-history-substring-search.zsh 2>/dev/null
|
||||||
source /usr/share/zsh/plugins/zsh-history-substring-search/zsh-history-substring-search.zsh
|
|
||||||
zmodload zsh/terminfo
|
zmodload zsh/terminfo
|
||||||
|
|
||||||
|
|
||||||
# Keybindings
|
# Keybindings
|
||||||
bindkey -e
|
bindkey -e
|
||||||
|
# vi mode
|
||||||
bindkey -v
|
bindkey -v
|
||||||
export KEYTIMEOUT=1
|
export KEYTIMEOUT=1
|
||||||
|
|
||||||
# Navigate words with CTRL+ARROW keys
|
|
||||||
bindkey '^[Oc' forward-word #
|
|
||||||
bindkey '^[Od' backward-word #
|
|
||||||
bindkey '^[[1;5C' forward-word #
|
|
||||||
bindkey '^[[1;5D' backward-word #
|
|
||||||
bindkey '^H' backward-kill-word # delete previous word with CTRL+BACKSPACE
|
|
||||||
bindkey '^[[Z' undo # SHIFT+TAB undo last action
|
|
||||||
bindkey "^[[3~" delete-char
|
|
||||||
|
|
||||||
bindkey '^[[A' history-substring-search-up
|
|
||||||
bindkey '^[[B' history-substring-search-down
|
|
||||||
|
|
||||||
# Change cursor shape for different vi modes.
|
# Change cursor shape for different vi modes.
|
||||||
function zle-keymap-select {
|
function zle-keymap-select {
|
||||||
if [[ ${KEYMAP} == vicmd ]] ||
|
case $KEYMAP in
|
||||||
[[ $1 = 'block' ]]; then
|
vicmd) echo -ne "\e[1 q";; # block
|
||||||
echo -ne '\e[1 q'
|
viins|main) echo -ne "\e[5 q";; # beam
|
||||||
elif [[ ${KEYMAP} == main ]] ||
|
esac
|
||||||
[[ ${KEYMAP} == viins ]] ||
|
|
||||||
[[ ${KEYMAP} = '' ]] ||
|
|
||||||
[[ $1 = 'beam' ]]; then
|
|
||||||
echo -ne '\e[5 q'
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
zle -N zle-keymap-select
|
zle -N zle-keymap-select
|
||||||
zle-line-init() {
|
zle-line-init() {
|
||||||
@ -78,8 +67,8 @@ zle-line-init() {
|
|||||||
echo -ne "\e[5 q"
|
echo -ne "\e[5 q"
|
||||||
}
|
}
|
||||||
zle -N zle-line-init
|
zle -N zle-line-init
|
||||||
echo -ne '\e[5 q' # Use beam shape cursor on startup.
|
echo -ne "\e[5 q" # Use beam shape cursor on startup.
|
||||||
preexec() { echo -ne '\e[5 q' ;} # Use beam shape cursor for each new prompt.
|
preexec() { echo -ne "\e[5 q" ;} # Use beam shape cursor for each new prompt.
|
||||||
|
|
||||||
|
|
||||||
function cd() {
|
function cd() {
|
||||||
@ -101,7 +90,36 @@ lfcd () {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
bindkey -s '^o' 'lfcd\n'
|
|
||||||
|
# Navigate words with CTRL+ARROW keys
|
||||||
|
bindkey '^[Oc' forward-word
|
||||||
|
bindkey '^[Od' backward-word
|
||||||
|
bindkey '^[[1;5C' forward-word
|
||||||
|
bindkey '^[[1;5D' backward-word
|
||||||
|
bindkey '^H' backward-kill-word # delete previous word with CTRL+BACKSPACE
|
||||||
|
bindkey '^[[Z' undo # SHIFT+TAB undo last action
|
||||||
|
bindkey "^[[3~" delete-char
|
||||||
|
|
||||||
|
bindkey '^[[A' history-substring-search-up
|
||||||
|
bindkey '^[[B' history-substring-search-down
|
||||||
|
|
||||||
|
# Use vim keys in tab complete menu
|
||||||
|
bindkey -M menuselect 'h' vi-backward-char
|
||||||
|
bindkey -M menuselect 'k' vi-up-line-or-history
|
||||||
|
bindkey -M menuselect 'l' vi-forward-char
|
||||||
|
bindkey -M menuselect 'j' vi-down-line-or-history
|
||||||
|
bindkey -v '^?' backward-delete-char
|
||||||
|
|
||||||
|
bindkey -s "^o" "^ulfcd\n"
|
||||||
|
bindkey -s "^a" "ubc -lq\n"
|
||||||
|
bindkey "^[[P" delete-char
|
||||||
|
|
||||||
|
# Edit line in vim with ctrl-e
|
||||||
|
autoload edit-command-line; zle -N edit-command-line
|
||||||
|
bindkey "^e" edit-command-line
|
||||||
|
bindkey -M vicmd "^[[P" vi-delete-char
|
||||||
|
bindkey -M vicmd "^e" edit-command-line
|
||||||
|
bindkey -M visual "^[[P" vi-delete
|
||||||
|
|
||||||
# Aliases
|
# Aliases
|
||||||
alias cp='cp -iv' # Confirm before overwriting something
|
alias cp='cp -iv' # Confirm before overwriting something
|
||||||
@ -114,7 +132,7 @@ alias gitu='git add . && git commit && git push'
|
|||||||
alias ls='exa -a --icons --group-directories-first'
|
alias ls='exa -a --icons --group-directories-first'
|
||||||
alias lf='lfrun'
|
alias lf='lfrun'
|
||||||
alias v='nvim'
|
alias v='nvim'
|
||||||
alias dv='doas nvim'
|
alias sv='sudoedit'
|
||||||
alias matrix='unimatrix -s 95'
|
alias matrix='unimatrix -s 95'
|
||||||
alias p='sudo pacman'
|
alias p='sudo pacman'
|
||||||
alias battery='acpi'
|
alias battery='acpi'
|
||||||
@ -128,11 +146,8 @@ alias ip="ip -color=auto"
|
|||||||
alias grep="rg"
|
alias grep="rg"
|
||||||
alias code="vscodium"
|
alias code="vscodium"
|
||||||
|
|
||||||
# Themeing
|
|
||||||
autoload -U compinit colors zcalc
|
|
||||||
compinit -d
|
|
||||||
colors
|
|
||||||
|
|
||||||
|
source /usr/share/zsh/plugins/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh 2>/dev/null
|
||||||
|
|
||||||
autoload -U promptinit; promptinit
|
autoload -U promptinit; promptinit
|
||||||
prompt spaceship
|
prompt spaceship
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user