aboutsummaryrefslogtreecommitdiffstats
path: root/basics/.local/bin/locate-config
blob: 26fd2cb396d97c1c8a5f3f133cc3f44f70d0f6bb (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/config-files"

p="Config:"

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

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

echo "$target"