commit c7a62b66baac71e42a6d63fabdd2d0a0982508fb parent eb799678084cc262526b1996b5c3ba67c11b5409 Author: Anders Damsgaard <anders@adamsgaard.dk> Date: Mon, 4 Mar 2019 19:03:41 +0100 Read dmenu_themed colors from ~/.Xresources Diffstat:
M | links/bin/dmenu_themed | | | 10 | +++++++++- |
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/links/bin/dmenu_themed b/links/bin/dmenu_themed @@ -1,6 +1,14 @@ #!/bin/bash -dmenuopts="-nb #222222 -nf #888888 -sb #333333 -sf #ffffff -fn PragmataPro-10" +function get_xresources_color { + rg "\*color$1:" ~/.Xresources | awk ' {print $2 }' +} + +dmenuopts="-nb $(get_xresources_color 0)\ + -nf $(get_xresources_color 15) \ + -sb $(get_xresources_color 12) \ + -sf $(get_xresources_color 15) \ + -fn PragmataPro-10" if [[ "$1" = "run" ]]; then dmenu_run $dmenuopts