summaryrefslogtreecommitdiffstats
path: root/clerk
diff options
context:
space:
mode:
authorRasmus Steinke <rasi@xssn.at>2016-01-03 15:32:43 +0100
committerRasmus Steinke <rasi@xssn.at>2016-01-03 15:32:43 +0100
commit79a7dc91f8c905b49c39994314dbd411b3203bc5 (patch)
tree7ab5b8677a0b57474b2aeb0854829cbcbda95b27 /clerk
parent6032e265d452548686bdb51009f7e6b90afa130b (diff)
downloadperl-app-clerk-79a7dc91f8c905b49c39994314dbd411b3203bc5.tar.gz
perl-app-clerk-79a7dc91f8c905b49c39994314dbd411b3203bc5.tar.xz
reuse dmenu_t command for color detection
Diffstat (limited to 'clerk')
-rwxr-xr-xclerk11
1 files changed, 6 insertions, 5 deletions
diff --git a/clerk b/clerk
index 6c8a7aa..6017489 100755
--- a/clerk
+++ b/clerk
@@ -2,6 +2,10 @@
shopt -s globstar
+function dmenu_t () {
+ rofi -dmenu $(echo "$rofiopts") "$@"
+}
+
# load default settings
# custom rofi settings (rofi reads settings from ~/.Xresources)
# but you can override settings here.
@@ -116,8 +120,8 @@ fi
# set help color
if [[ $help_color == "" ]]; then
- help_color=$(rofi -dump-xresources | grep 'rofi.color.normal' | awk -F ', ' '{ print $2 }')
- help_separator_color=$(rofi -dump-xresources | grep 'rofi.color.normal' | awk -F ', ' '{ print $2 }')
+ help_color=$(dmenu_t -dump-xresources | grep -P '^rofi.color.normal' | awk -F ',' '{ print $2 }')
+ help_separator_color=$(dmenu_t -dump-xresources | grep -P 'rofi.color.normal' | awk -F ',' '{ print $2 }')
fi
fix_date_format() {
@@ -1879,9 +1883,6 @@ getAlbumsFromPlaylist () {
################################################################################
-function dmenu_t () {
- rofi -dmenu $(echo "$rofiopts") "$@"
-}
while :; do
case $1 in