Improve configs
This commit is contained in:
parent
cc1c39d20d
commit
54c3bc1744
7 changed files with 43 additions and 30 deletions
19
.bin/.e
19
.bin/.e
|
@ -33,6 +33,18 @@ declare -A mapper=(
|
|||
["zsh"]="$HOME/.config/zsh/.zshrc"
|
||||
)
|
||||
|
||||
declare -A directory=(
|
||||
["bspwm"]="$HOME/.config/bspwm/"
|
||||
["env.d"]="$HOME/.config/env.d/"
|
||||
["home-manager"]="$HOME/.config/home-manager/"
|
||||
["hyprland"]="$HOME/.config/hypr/"
|
||||
["nvim"]="$HOME/.config/astronvim/lua/user/"
|
||||
["polybar"]="$HOME/.config/polybar/"
|
||||
["qutebrowser"]="$HOME/.config/qutebrowser/"
|
||||
["waybar"]="$HOME/.config/waybar/"
|
||||
["zsh"]="$HOME/.config/zsh/"
|
||||
)
|
||||
|
||||
declare -A hooks=(
|
||||
["qutebrowser"]="qutebrowser :config-source"
|
||||
["qutebrowser-kiosk"]="qutebrowser-kiosk :config-source" # broken due to qutebrowser-kiosk being an alias
|
||||
|
@ -58,6 +70,13 @@ then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
working_dir="${directory["$1"]}"
|
||||
if [ -n "$working_dir" ]
|
||||
then
|
||||
# shellcheck disable=SC2164
|
||||
cd "$working_dir"
|
||||
fi
|
||||
|
||||
$EDITOR "$target"
|
||||
|
||||
hook="${hooks["$1"]}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue