2022-08-01 13:59:07 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
declare -A mapper=(
|
2022-10-04 21:17:16 +00:00
|
|
|
[".e"]="$HOME/.bin/.e"
|
2022-08-13 11:23:01 +00:00
|
|
|
["alacritty"]="$HOME/.config/alacritty/alacritty.yml"
|
|
|
|
["astronvim"]="$HOME/.config/astronvim/lua/user/init.lua"
|
2022-08-01 13:59:07 +00:00
|
|
|
["bash"]="$HOME/.bashrc"
|
|
|
|
["bspwm"]="$HOME/.config/bspwm/bspwmrc"
|
2022-08-13 11:23:01 +00:00
|
|
|
["environment"]="$HOME/.config/environment"
|
2022-10-04 21:17:16 +00:00
|
|
|
["environment.local"]="$HOME/.config/environment.local"
|
2022-08-13 11:23:01 +00:00
|
|
|
["git"]="$HOME/.config/git/config"
|
2022-10-04 20:23:22 +00:00
|
|
|
["git-ignore"]="$HOME/.config/git/ignore"
|
2022-12-20 00:09:47 +00:00
|
|
|
["home-manager"]="$HOME/.config/nixpkgs/home.nix"
|
2023-01-03 01:15:35 +00:00
|
|
|
["polybar"]="$HOME/.config/polybar"
|
2022-08-30 21:03:21 +00:00
|
|
|
["qutebrowser"]="$HOME/.config/qutebrowser/common.py"
|
2022-08-13 11:23:01 +00:00
|
|
|
["starship"]="$HOME/.config/starship.toml"
|
2022-08-01 13:59:07 +00:00
|
|
|
["sxhkd"]="$HOME/.config/sxhkd/sxhkdrc"
|
|
|
|
["vim"]="$HOME/.config/vim/vimrc"
|
2022-10-21 22:58:24 +00:00
|
|
|
["wakatime"]="$HOME/.config/wakatime/.wakatime.cfg.tpl"
|
2022-10-13 12:43:07 +00:00
|
|
|
["xprofile"]="$HOME/.xprofile"
|
2022-08-01 13:59:07 +00:00
|
|
|
["zsh"]="$HOME/.config/zsh/.zshrc"
|
|
|
|
)
|
|
|
|
|
2022-10-17 16:49:58 +00:00
|
|
|
if [ -z "$1" ]
|
2022-08-01 13:59:07 +00:00
|
|
|
then
|
|
|
|
echo "No argument given. Use --list (-l) to show all options."
|
|
|
|
exit
|
|
|
|
fi
|
2022-10-17 16:49:58 +00:00
|
|
|
if [ "$1" = "-l" ] || [ "$1" = "--list" ]
|
2022-08-01 13:59:07 +00:00
|
|
|
then
|
|
|
|
echo "${!mapper[@]}"
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
|
|
|
target="${mapper["$1"]}"
|
2022-10-17 16:49:58 +00:00
|
|
|
if [ -n "$target" ]
|
2022-08-01 13:59:07 +00:00
|
|
|
then
|
|
|
|
$EDITOR "$target"
|
|
|
|
else
|
|
|
|
echo "Dotfile not found. Use --list (-l) to show all options."
|
|
|
|
fi
|