summaryrefslogtreecommitdiff
path: root/ar
diff options
context:
space:
mode:
authorTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-12-08 14:24:19 +0900
committerTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-12-08 14:24:19 +0900
commit40938145d53e27a0ddca0a0a7270f8311869b995 (patch)
treea70eb5732fbf99d597e60758599eb9332382f665 /ar
parentab41273077623b077ff5d2d5a2dec046df0701c4 (diff)
updates
Diffstat (limited to 'ar')
-rw-r--r--ar/.config/shell/bm-files6
-rw-r--r--ar/.config/vim/vimrc3
-rwxr-xr-xar/.local/bin/shortcuts22
3 files changed, 17 insertions, 14 deletions
diff --git a/ar/.config/shell/bm-files b/ar/.config/shell/bm-files
index 200cedd..fc8bce1 100644
--- a/ar/.config/shell/bm-files
+++ b/ar/.config/shell/bm-files
@@ -26,10 +26,12 @@ vns ${XDG_CONFIG_HOME:-${HOME}/.config}/newsboat/config
vnu ${XDG_CONFIG_HOME:-${HOME}/.config}/newsboat/urls # Newsboat url (RSS reader)
vqt ${XDG_CONFIG_HOME:-${HOME}/.config}/qutebrowser/config.py # Qutebrowser config
Vsm /etc/samba/smb.conf # Samba config
+vsa ${XDG_CONFIG_HOME:-${HOME}/.config}/shell/aliasrc # Aliases used by shell (and potentially other shells)
vse ${XDG_CONFIG_HOME:-${HOME}/.config}/sesh/sesh.toml # Sesh config
vsf ${XDG_SOURCES_HOME:-${HOME}/.local/src}/suckless/surf/config.def.h # Surf: a simple browser
vsl ${XDG_SOURCES_HOME:-${HOME}/.local/src}/suckless/slock/config.def.h # Slock: lock screen
-vsp ${XDG_DATA_HOME:-${HOME}/.local/share}/thesiah/snippets # Snippets
+vsn ${XDG_DATA_HOME:-${HOME}/.local/share}/thesiah/snippets # Snippets
+vsp ${XDG_CONFIG_HOME:-${HOME}/.config}/shell/profile # Shell profile used for system
vss ${XDG_CONFIG_HOME:-${HOME}/.config}/starship/starship.toml # Starship
vst ${XDG_SOURCES_HOME:-${HOME}/.local/src}/suckless/st/config.def.h # St: a simple terminal
vsx ${XDG_CONFIG_HOME:-${HOME}/.config}/nsxiv/exec/key-handler # Nsxiv (image viewer) key/script handler
@@ -47,8 +49,6 @@ vxp ${XDG_CONFIG_HOME:-${HOME}/.config}/x11/xprofile
vxr ${XDG_CONFIG_HOME:-${HOME}/.config}/x11/xresources # Colors, themes and variables for X11
vyk ${XDG_CONFIG_HOME:-${HOME}/.config}/yazi/keymap-default.toml # Yazi keymap
vyz ${XDG_CONFIG_HOME:-${HOME}/.config}/yazi/yazi.toml # Yazi config
-vza ${XDG_CONFIG_HOME:-${HOME}/.config}/shell/aliasrc # Aliases used by zsh (and potentially other shells)
vzc ${ZDOTDIR:-${XDG_CONFIG_HOME:-${HOME}/.config}/zsh}/.zshrc # Zsh config
vzk ${ZDOTDIR:-${XDG_CONFIG_HOME:-${HOME}/.config}/zsh}/keymaps.zsh # Zsh keymaps
-vzp ${XDG_CONFIG_HOME:-${HOME}/.config}/shell/profile # Zsh profile used for system
vzs ${ZDOTDIR:-${XDG_CONFIG_HOME:-${HOME}/.config}/zsh}/scripts.zsh # Zsh scripts
diff --git a/ar/.config/vim/vimrc b/ar/.config/vim/vimrc
index 0535aec..0a76953 100644
--- a/ar/.config/vim/vimrc
+++ b/ar/.config/vim/vimrc
@@ -367,9 +367,6 @@ set title
set timeoutlen=300 " Time (in milliseconds) to wait for a mapping
set ttimeoutlen=10 " Time (in milliseconds) to wait for terminal key codes
-" Esc
-set noesckeys
-
" Set the commands to save in history default number is 20.
set history=1000
diff --git a/ar/.local/bin/shortcuts b/ar/.local/bin/shortcuts
index ab5e69d..af4ad58 100755
--- a/ar/.local/bin/shortcuts
+++ b/ar/.local/bin/shortcuts
@@ -10,9 +10,15 @@ zsh_named_dirs="${XDG_CONFIG_HOME:-${HOME}/.config}/shell/zshnameddirrc"
command -v lf && lf_shortcuts="${XDG_CONFIG_HOME:-${HOME}/.config}/lf/shortcutrc" || lf_shortcuts="/dev/null"
command -v vim && vim_shortcuts="${XDG_CONFIG_HOME:-${HOME}/.config}/vim/shortcuts.vim" || vim_shortcuts="/dev/null"
command -v nvim && nvim_shortcuts="${XDG_CONFIG_HOME:-${HOME}/.config}/nvim/shortcuts.lua" || nvim_shortcuts="/dev/null"
-command -v yazi && yazi_shortcuts="${XDG_CONFIG_HOME:-${HOME}/.config}/yazi/keymap.toml" || yazi_shortcuts="/dev/null"
+if command -v yazi; then
+ yazi_shortcuts="${XDG_CONFIG_HOME:-${HOME}/.config}/yazi/keymap.toml"
+ yazi_shortcuts_tmp="$yazi_shortcuts.tmp"
+else
+ yazi_shortcuts="/dev/null"
+ yazi_shortcuts_tmp="/dev/null"
+fi
command -v ranger && ranger_shortcuts="${XDG_CONFIG_HOME:-${HOME}/.config}/ranger/shortcuts.conf" || ranger_shortcuts="/dev/null"
-command -v qutebrowser && qute_shortcuts="${XDG_CONFIG_HOME:-${HOME}/.config}/qutebrowser/shortcuts.py" || qute_shortcuts="/dev/null"
+command -v qutebrowser && qute_shortcuts="$HOME/.qutebrowser/shortcuts.py" || qute_shortcuts="/dev/null"
command -v fish && fish_shortcuts="${XDG_CONFIG_HOME:-${HOME}/.config}/fish/shortcuts.fish" || fish_shortcuts="/dev/null"
command -v vifm && vifm_shortcuts="${XDG_CONFIG_HOME:-${HOME}/.config}/vifm/shortcuts.rc" || vifm_shortcuts="/dev/null"
@@ -22,7 +28,7 @@ printf "# vim: filetype=sh\\n" >"$fish_shortcuts"
printf "# vim: filetype=sh\\nalias " >"$shell_shortcuts"
printf "# vim: filetype=sh\\n" >"$shell_env_shortcuts"
printf "\" vim: filetype=vim\\n" >"$vifm_shortcuts"
-cp "$HOME/.config/yazi/keymap-default.toml" "$yazi_shortcuts"
+[ -f "$HOME/.config/yazi/keymap-default.toml" ] && cp "$HOME/.config/yazi/keymap-default.toml" "$yazi_shortcuts"
# Format the `directories` file in the correct syntax and sent it to all three configs.
eval "echo \"$(cat "$bmdirs")\"" |
@@ -43,7 +49,7 @@ eval "echo \"$(cat "$bmdirs")\"" |
printf(\"vim.keymap.set('n', '<localleader><localleader>%s', function() require('mini.files').open('%s') end, { noremap = true, silent = true, desc = '%s' })\n\", \$1, \$2, desc_path) >> \"$nvim_shortcuts\" ;
desc_path = \$2; gsub(\"^/home/$USER/\",\"~/\",desc_path);
key_array = \"\"; for(i=1; i<=length(\$1); i++) { if(i==1) key_array = \"\\\"\" substr(\$1,i,1) \"\\\"\"; else key_array = key_array \", \\\"\" substr(\$1,i,1) \"\\\"\" }
- printf(\"\\t{ on = [ %s ], run = \\\"cd %s\\\", desc = \\\"Go to %s\\\" },\\n\",key_array,\$2,desc_path) >> \"$yazi_shortcuts.tmp\"}"
+ printf(\"\\t{ on = [ %s ], run = \\\"cd %s\\\", desc = \\\"Go to %s\\\" },\\n\",key_array,\$2,desc_path) >> \"$yazi_shortcuts_tmp\"}"
# Format the `files` file in the correct syntax and sent it to both configs.
eval "echo \"$(cat "$bmfiles")\"" |
@@ -66,10 +72,10 @@ eval "echo \"$(cat "$bmfiles")\"" |
printf(\"vim.keymap.set('n', '<localleader><localleader>%s', '<cmd>e %s<cr>', { noremap = true, silent = true, desc = '%s' })\n\", \$1, \$2, desc_path) >> \"$nvim_shortcuts\" ;
desc_path = \$2; gsub(\"^/home/$USER/\",\"~/\",desc_path);
key_array = \"\"; for(i=1; i<=length(\$1); i++) { if(i==1) key_array = \"\\\"\" substr(\$1,i,1) \"\\\"\"; else key_array = key_array \", \\\"\" substr(\$1,i,1) \"\\\"\" }
- printf(\"\\t{ on = [ %s ], run = [ 'reveal %s', 'open' ], desc = \\\"Open %s\\\" },\\n\", key_array, \$2, desc_path) >> \"$yazi_shortcuts.tmp\" }"
+ printf(\"\\t{ on = [ %s ], run = [ 'reveal %s', 'open' ], desc = \\\"Open %s\\\" },\\n\", key_array, \$2, desc_path) >> \"$yazi_shortcuts_tmp\" }"
# Merge bookmarks into keymap-default.toml
-if [ -f "$yazi_shortcuts.tmp" ]; then
+if [ -f "$yazi_shortcuts_tmp" ]; then
# Find the line with the closing bracket in the [mgr] section
line_num=$(grep -n "^]" "$yazi_shortcuts" | head -1 | cut -d: -f1)
@@ -77,11 +83,11 @@ if [ -f "$yazi_shortcuts.tmp" ]; then
head -n $((line_num - 1)) "$yazi_shortcuts" >"$yazi_shortcuts.new"
echo "" >>"$yazi_shortcuts.new"
echo " # Custom bookmarks" >>"$yazi_shortcuts.new"
- cat "$yazi_shortcuts.tmp" >>"$yazi_shortcuts.new"
+ cat "$yazi_shortcuts_tmp" >>"$yazi_shortcuts.new"
echo "]" >>"$yazi_shortcuts.new"
tail -n +$((line_num + 1)) "$yazi_shortcuts" >>"$yazi_shortcuts.new"
# Replace the original file
mv "$yazi_shortcuts.new" "$yazi_shortcuts"
- rm -f "$yazi_shortcuts.tmp"
+ rm -f "$yazi_shortcuts_tmp"
fi