diff --git a/.Xresources b/.Xresources index 83fae7a..1a1fe6b 100644 --- a/.Xresources +++ b/.Xresources @@ -19,7 +19,7 @@ *.color13: #FF92D0 *.color14: #9AEDFE *.color15: #E6E6E6 -*.font = "Hack:size=10:antialias=true:autohint=true" +*.font: "Hack:size=10:antialias=true:autohint=true" *.termName: xterm-256color *.shell: /usr/bin/zsh *.tabspaces: 4 diff --git a/.config/dmenu/dmenu_run_with_aliases b/.config/dmenu/dmenu_run_with_aliases index 310b8a2..ebfcdcc 100755 --- a/.config/dmenu/dmenu_run_with_aliases +++ b/.config/dmenu/dmenu_run_with_aliases @@ -4,6 +4,14 @@ if [[ -f $HOME/.zsh_alias ]]; then source $HOME/.zsh_alias fi -command_to_run=$({ alias | awk '{split($0,alias,"="); print alias[1];}' ; dmenu_path ; } | sort | dmenu -i -fn Hack -nb "#282a36" -nf "#f8f8f2" -sb "#44475a" -sf "#f8f8f2" "$@") +fallback_font="Hack:size=10:antialias=true:autohint=true" +font="" +if [ -x $(command -v xgetres) ]; then + font=$(xgetres font || echo $fallback_font); +else + font=$fallback_font; +fi + +command_to_run=$({ alias | awk '{split($0,alias,"="); print alias[1];}' ; dmenu_path ; } | sort | dmenu -i -fn $font -nb "#282a36" -nf "#f8f8f2" -sb "#44475a" -sf "#f8f8f2" "$@") eval ${command_to_run} &