summaryrefslogtreecommitdiff
path: root/.config/scripts/config.sh
blob: bce4e29f096255216f5ad002ba7a992583842e4c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash

declare -A configs=(
    ["hypr"]="$HOME/.config/hypr/"
    ["waybar"]="$HOME/.config/waybar/config"
    ["waybar-style"]="$HOME/.config/waybar/style.css"
    ["kitty"]="$HOME/.config/kitty/kitty.conf"
    ["fuzzel"]="$HOME/.config/fuzzel/fuzzel.ini"
    ["dunst"]="$HOME/.config/dunst/dunstrc"
    ["bashrc"]="$HOME/.bashrc"
    ["scripts"]="$HOME/.config/scripts/"
)

choice=$(printf "%s\n" "${!configs[@]}" | fuzzel -d -p "> ")

[[ -z "$choice" ]] && exit

path="${configs[$choice]}"

if [ -e "$path" ]; then
    zeditor "$path"
else
    notify-send "error" "file not found: $path"
fi