diff options
| author | Maksymilian Jopek <maks@jopek.eu> | 2025-03-15 14:46:54 +0100 |
|---|---|---|
| committer | Maksymilian Jopek <maks@jopek.eu> | 2025-03-15 14:46:54 +0100 |
| commit | d7c8b912e63c9a112d75f6b9e2e3f5d3c6975240 (patch) | |
| tree | 8731b82a7d16240d3fea1175d02f55dd15e2abf2 /.local/bin/shortcuts | |
| parent | 5f385da9f686ffb9ab61c194a46539cbe53357ea (diff) | |
| download | eibhear-d7c8b912e63c9a112d75f6b9e2e3f5d3c6975240.tar.gz eibhear-d7c8b912e63c9a112d75f6b9e2e3f5d3c6975240.tar.zst eibhear-d7c8b912e63c9a112d75f6b9e2e3f5d3c6975240.zip | |
Eibhear: Initial commit
Some file deletion, small changes, some addition
Diffstat (limited to '.local/bin/shortcuts')
| -rwxr-xr-x | .local/bin/shortcuts | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/.local/bin/shortcuts b/.local/bin/shortcuts index 08a2f57..3311349 100755 --- a/.local/bin/shortcuts +++ b/.local/bin/shortcuts @@ -1,7 +1,9 @@ #!/bin/sh bmdirs="${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs" +bmdirs_eibhear="${XDG_CONFIG_HOME:-$HOME/.config}/shell/eibhear/bm-dirs" bmfiles="${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-files" +bmfiles_eibhear="${XDG_CONFIG_HOME:-$HOME/.config}/shell/eibhear/bm-files" # Output locations. Unactivated progs should go to /dev/null. shell_shortcuts="${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc" @@ -20,8 +22,14 @@ printf "# vim: filetype=sh\\nalias " > "$shell_shortcuts" printf "# vim: filetype=sh\\n" > "$shell_env_shortcuts" printf "\" vim: filetype=vim\\n" > "$vifm_shortcuts" +# Enable nesting +eval "echo \"$(cat "$bmdirs" "$bmdirs_eibhear"")\"" | \ +awk "!/^\s*#/ && !/^\s*\$/ {gsub(\"\\\s*#.*$\",\"\"); + printf(\"[ -n \42%s\42 ] && export %s=\42%s\42 \n\",\$1,\$1,\$2) >> \"$shell_env_shortcuts\" ;" +source "$shell_env_shortcuts" + # Format the `directories` file in the correct syntax and sent it to all three configs. -eval "echo \"$(cat "$bmdirs")\"" | \ +eval "echo \"$(cat "$bmdirs" "$bmdirs_eibhear")\"" | \ awk "!/^\s*#/ && !/^\s*\$/ {gsub(\"\\\s*#.*$\",\"\"); printf(\"%s=\42cd %s && ls -A\42 \\\\\n\",\$1,\$2) >> \"$shell_shortcuts\" ; printf(\"[ -n \42%s\42 ] && export %s=\42%s\42 \n\",\$1,\$1,\$2) >> \"$shell_env_shortcuts\" ; @@ -33,7 +41,7 @@ awk "!/^\s*#/ && !/^\s*\$/ {gsub(\"\\\s*#.*$\",\"\"); printf(\"cmap ;%s %s\n\",\$1,\$2) >> \"$vim_shortcuts\" }" # Format the `files` file in the correct syntax and sent it to both configs. -eval "echo \"$(cat "$bmfiles")\"" | \ +eval "echo \"$(cat "$bmfiles" "$bmfiles_eibhear")\"" | \ awk "!/^\s*#/ && !/^\s*\$/ {gsub(\"\\\s*#.*$\",\"\"); printf(\"%s=\42\$EDITOR %s\42 \\\\\n\",\$1,\$2) >> \"$shell_shortcuts\" ; printf(\"[ -n \42%s\42 ] && export %s=\42%s\42 \n\",\$1,\$1,\$2) >> \"$shell_env_shortcuts\" ; |
