aboutsummaryrefslogtreecommitdiffstats
path: root/basics/.local/bin/locate-config
blob: 2f8dc3de19d02257fa28723b60de77d94eb20506 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh

set -e

config_dir="$HOME/.local/share/dotfiles/edit-config.d"

p="Config:"

sel=$(find "$config_dir" -writable -type l | cut -d "/" -f 8- | sort -d | dmenu -p "$p" -l 20)
ec=$?
[ "$ec" -ne 0 ] && exit $ec

target=$(readlink -f "${config_dir}/${sel}")

echo "$target"