42 lines
1.1 KiB
Bash
Executable file
42 lines
1.1 KiB
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
declare -A mapper=(
|
|
[".e"]="$HOME/.bin/.e"
|
|
["alacritty"]="$HOME/.config/alacritty/alacritty.yml"
|
|
["astronvim"]="$HOME/.config/astronvim/lua/user/init.lua"
|
|
["autostart"]="$HOME/.bin/autostart-manage"
|
|
["bash"]="$HOME/.bashrc"
|
|
["bspwm"]="$HOME/.config/bspwm/bspwmrc"
|
|
["environment"]="$HOME/.config/environment"
|
|
["environment.local"]="$HOME/.config/environment.local"
|
|
["git"]="$HOME/.config/git/config"
|
|
["git-ignore"]="$HOME/.config/git/ignore"
|
|
["home-manager"]="$HOME/.config/nixpkgs/home.nix"
|
|
["polybar"]="$HOME/.config/polybar"
|
|
["qutebrowser"]="$HOME/.config/qutebrowser/common.py"
|
|
["starship"]="$HOME/.config/starship.toml"
|
|
["sxhkd"]="$HOME/.config/sxhkd/sxhkdrc"
|
|
["vim"]="$HOME/.config/vim/vimrc"
|
|
["wakatime"]="$HOME/.config/wakatime/.wakatime.cfg.tpl"
|
|
["xprofile"]="$HOME/.xprofile"
|
|
["zsh"]="$HOME/.config/zsh/.zshrc"
|
|
)
|
|
|
|
if [ -z "$1" ]
|
|
then
|
|
echo "No argument given. Use --list (-l) to show all options."
|
|
exit
|
|
fi
|
|
if [ "$1" = "-l" ] || [ "$1" = "--list" ]
|
|
then
|
|
echo "${!mapper[@]}"
|
|
exit
|
|
fi
|
|
|
|
target="${mapper["$1"]}"
|
|
if [ -n "$target" ]
|
|
then
|
|
$EDITOR "$target"
|
|
else
|
|
echo "Dotfile not found. Use --list (-l) to show all options."
|
|
fi
|