Update shortcuts

This commit is contained in:
2026-07-21 21:11:31 +01:00
parent 02ac673d4c
commit dcd46eafb9
6 changed files with 18 additions and 15 deletions
+2
View File
@@ -1,6 +1,8 @@
cac ${XDG_CACHE_HOME:-$HOME/.cache} cac ${XDG_CACHE_HOME:-$HOME/.cache}
cf ${XDG_CONFIG_HOME:-$HOME/.config} cf ${XDG_CONFIG_HOME:-$HOME/.config}
nv ${XDG_CONFIG_HOME:-$HOME/.config}/nvim/lua nv ${XDG_CONFIG_HOME:-$HOME/.config}/nvim/lua
hy ${XDG_CONFIG_HOME:-$HOME/.config}/hypr
nx ${XDG_CONFIG_HOME:-$HOME/.config}/nixos
D ${XDG_DOWNLOAD_DIR:-$HOME/Downloads} D ${XDG_DOWNLOAD_DIR:-$HOME/Downloads}
d ${XDG_DOCUMENTS_DIR:-$HOME/Tower/Documents} d ${XDG_DOCUMENTS_DIR:-$HOME/Tower/Documents}
dt ${XDG_DATA_HOME:-$HOME/.local/share} dt ${XDG_DATA_HOME:-$HOME/.local/share}
+2
View File
@@ -2,6 +2,8 @@
alias cac="cd /home/chris/.cache && ls" \ alias cac="cd /home/chris/.cache && ls" \
cf="cd /home/chris/.config && ls" \ cf="cd /home/chris/.config && ls" \
nv="cd /home/chris/.config/nvim/lua && ls" \ nv="cd /home/chris/.config/nvim/lua && ls" \
hy="cd /home/chris/.config/hypr && ls" \
nx="cd /home/chris/.config/nixos && ls" \
D="cd /home/chris/Downloads && ls" \ D="cd /home/chris/Downloads && ls" \
d="cd /home/chris/Tower/Documents && ls" \ d="cd /home/chris/Tower/Documents && ls" \
dt="cd /home/chris/.local/share && ls" \ dt="cd /home/chris/.local/share && ls" \
+2
View File
@@ -1,6 +1,8 @@
hash -d cac=/home/chris/.cache hash -d cac=/home/chris/.cache
hash -d cf=/home/chris/.config hash -d cf=/home/chris/.config
hash -d nv=/home/chris/.config/nvim/lua hash -d nv=/home/chris/.config/nvim/lua
hash -d hy=/home/chris/.config/hypr
hash -d nx=/home/chris/.config/nixos
hash -d D=/home/chris/Downloads hash -d D=/home/chris/Downloads
hash -d d=/home/chris/Tower/Documents hash -d d=/home/chris/Tower/Documents
hash -d dt=/home/chris/.local/share hash -d dt=/home/chris/.local/share
+4 -4
View File
@@ -2,11 +2,11 @@
show_hidden = true show_hidden = true
[[plugin.prepend_fetchers]] [[plugin.prepend_fetchers]]
id = "git" url = "*"
name = "*"
run = "git" run = "git"
group = "git"
[[plugin.prepend_fetchers]] [[plugin.prepend_fetchers]]
id = "git" url = "*/"
name = "*/"
run = "git" run = "git"
group = "git"
@@ -6,22 +6,19 @@ bmfiles="${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-files"
# Output locations. Unactivated progs should go to /dev/null. # Output locations. Unactivated progs should go to /dev/null.
shell_shortcuts="${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc" shell_shortcuts="${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc"
zsh_named_dirs="${XDG_CONFIG_HOME:-$HOME/.config}/shell/zshnameddirrc" zsh_named_dirs="${XDG_CONFIG_HOME:-$HOME/.config}/shell/zshnameddirrc"
lf_shortcuts="${XDG_CONFIG_HOME:-$HOME/.config}/lf/shortcutrc"
# Remove, prepare files # Remove, prepare files
rm -f "$lf_shortcuts" "$zsh_named_dirs" 2>/dev/null rm -f "$zsh_named_dirs" 2>/dev/null
printf "# vim: filetype=sh\\nalias " > "$shell_shortcuts" printf "# vim: filetype=sh\\nalias " > "$shell_shortcuts"
# Format the `directories` file in the correct syntax and sent it to all three configs. # Format the `directories` file in the correct syntax and sent it to all three configs.
eval "echo \"$(cat "$bmdirs")\"" | \ eval "echo \"$(cat "$bmdirs")\"" | \
awk "!/^\s*#/ && !/^\s*\$/ {gsub(\"\\\s*#.*$\",\"\"); awk "!/^\s*#/ && !/^\s*\$/ {gsub(\"\\\s*#.*$\",\"\");
printf(\"%s=\42cd %s && ls\42 \\\\\n\",\$1,\$2) >> \"$shell_shortcuts\" ; printf(\"%s=\42cd %s && ls\42 \\\\\n\",\$1,\$2) >> \"$shell_shortcuts\" ;
printf(\"hash -d %s=%s \n\",\$1,\$2) >> \"$zsh_named_dirs\" ; printf(\"hash -d %s=%s \n\",\$1,\$2) >> \"$zsh_named_dirs\"}"
printf(\"map C%s cd \42%s\42 \n\",\$1,\$2) >> \"$lf_shortcuts\" }"
# Format the `files` file in the correct syntax and sent it to both configs. # Format the `files` file in the correct syntax and sent it to both configs.
eval "echo \"$(cat "$bmfiles")\"" | \ eval "echo \"$(cat "$bmfiles")\"" | \
awk "!/^\s*#/ && !/^\s*\$/ {gsub(\"\\\s*#.*$\",\"\"); awk "!/^\s*#/ && !/^\s*\$/ {gsub(\"\\\s*#.*$\",\"\");
printf(\"%s=\42\$EDITOR %s\42 \\\\\n\",\$1,\$2) >> \"$shell_shortcuts\" ; printf(\"%s=\42\$EDITOR %s\42 \\\\\n\",\$1,\$2) >> \"$shell_shortcuts\" ;
printf(\"hash -d %s=%s \n\",\$1,\$2) >> \"$zsh_named_dirs\" ; printf(\"hash -d %s=%s \n\",\$1,\$2) >> \"$zsh_named_dirs\"}"
printf(\"map E%s \$\$EDITOR \42%s\42 \n\",\$1,\$2) >> \"$lf_shortcuts\" }"