Fix crappy auto dpi stuff

This commit is contained in:
Daniel Flanagan 2019-03-13 22:12:37 -05:00
parent b96b536218
commit c340bbd9c3
6 changed files with 17 additions and 10 deletions

View file

@ -10,7 +10,7 @@ MONITOR_WIDTH=$(xrandr | grep "$BAR_MONITOR" | grep -Po ' \d+' | head -n 1)
export BAR_FONT="${BAR_FONT:-$(xrdb -query | sed -ne 's/.*font:\s*xft:\([^:]*\)\:.*$/\1/p' | head -n 1)}" export BAR_FONT="${BAR_FONT:-$(xrdb -query | sed -ne 's/.*font:\s*xft:\([^:]*\)\:.*$/\1/p' | head -n 1)}"
export BAR_ICON_FONT="${BAR_ICON_FONT:-"Font Awesome 5 Free"}" export BAR_ICON_FONT="${BAR_ICON_FONT:-"Font Awesome 5 Free"}"
export BAR_FONT_SIZE="${BAR_FONT_SIZE:-$(xrdb -query | sed -ne 's/.*font:\s*xft:[^-]*\=\([0-9]*\).*$/\1/p' | head -n 1)}" export BAR_FONT_SIZE="${BAR_FONT_SIZE:-$(xrdb -query | sed -ne 's/.*font:\s*xft:[^-,]*\=\([0-9]*\).*$/\1/p' | head -n 1)}"
export BAR_ICON_FONT_SIZE="${BAR_ICON_FONT_SIZE:-$((BAR_FONT_SIZE))}" export BAR_ICON_FONT_SIZE="${BAR_ICON_FONT_SIZE:-$((BAR_FONT_SIZE))}"
export GAP=$(bspc wm -d | grep -Po '(windowGap.*?,)' | grep -Po '\-?\d*' | head -n 1) export GAP=$(bspc wm -d | grep -Po '(windowGap.*?,)' | grep -Po '\-?\d*' | head -n 1)

View file

@ -38,9 +38,9 @@ if command -v sxhkd >/dev/null 2>&1; then
sxhkd -m -1 & sxhkd -m -1 &
fi fi
# if [ -f "$DOTFILES_PATH/de/x/loadresources" ]; then if [ -f "$DOTFILES_PATH/de/x/loadresources" ]; then
# source "$DOTFILES_PATH/de/x/loadresources" "$DOTFILES_PATH/de/x/loadresources"
# fi fi
if [ -f "$HOME/.fehbg" ]; then if [ -f "$HOME/.fehbg" ]; then
"$HOME/.fehbg" & "$HOME/.fehbg" &

View file

@ -23,6 +23,7 @@ if [ -f "$HOME/.xmodmap" ]; then
fi fi
echo "a" > ~/.xinitrc.log echo "a" > ~/.xinitrc.log
echo "initrc" > ~/.xstartup_log
eval $(/usr/bin/gnome-keyring-daemon --start --components=pkcs11,secrets,ssh) eval $(/usr/bin/gnome-keyring-daemon --start --components=pkcs11,secrets,ssh)
export SSH_AUTH_SOCK export SSH_AUTH_SOCK

View file

@ -7,6 +7,8 @@ ENV_TYPE="${1}"
if [[ "$ENV_TYPE" = "auto" ]]; then if [[ "$ENV_TYPE" = "auto" ]]; then
if [[ "$(xrandr --listmonitors | grep 'Monitors:' | awk '{print $2}')" -gt 1 ]]; then if [[ "$(xrandr --listmonitors | grep 'Monitors:' | awk '{print $2}')" -gt 1 ]]; then
ENV_TYPE="lodpi" ENV_TYPE="lodpi"
else
ENV_TYPE=""
fi fi
echo "xloadresources auto env: $ENV_TYPE" >> "$HOME/.xstartup_log" echo "xloadresources auto env: $ENV_TYPE" >> "$HOME/.xstartup_log"
fi fi
@ -24,6 +26,8 @@ usercolors="$HOME/.Xresources.colors"
userenv="$HOME/.Xresources${ENV_TYPE}.env" userenv="$HOME/.Xresources${ENV_TYPE}.env"
usermodmap="$HOME/.Xmodmap" usermodmap="$HOME/.Xmodmap"
echo "userenv: $userenv" >> "$HOME/.xstartup_log"
if [ -f "$sysresources" ]; then if [ -f "$sysresources" ]; then
xrdb -merge "$sysresources" >/dev/null 2>&1 xrdb -merge "$sysresources" >/dev/null 2>&1
fi fi
@ -41,6 +45,7 @@ if [ -f "$usercolors" ]; then
fi fi
if [ -f "$userenv" ]; then if [ -f "$userenv" ]; then
echo "Merging env Xresources: $userenv" >> ~/.xstartup_log
xrdb -merge "$userenv" >/dev/null 2>&1 xrdb -merge "$userenv" >/dev/null 2>&1
fi fi

View file

@ -13,10 +13,6 @@ fi
echo "xprofile ($DOTFILES_PATH)" >> "$HOME/.xstartup_log" echo "xprofile ($DOTFILES_PATH)" >> "$HOME/.xstartup_log"
if [ -f "$DOTFILES_PATH/de/x/loadresources" ]; then
"$DOTFILES_PATH/de/x/loadresources" auto
fi
# keyrepeat settings # keyrepeat settings
xset r rate 250 80 & xset r rate 250 80 &
@ -40,8 +36,8 @@ if [ -f "$HOME/.xmodmap" ]; then
xmodmap "$HOME/.xmodmap" xmodmap "$HOME/.xmodmap"
fi fi
if [ -f "$HOME/.env_xprofile" ]; then if [ -f "$DOTFILES_PATH/de/x/loadresources" ]; then
source "$HOME/.env_xprofile" "$DOTFILES_PATH/de/x/loadresources"
fi fi
if command -v xcape >/dev/null 2>&1; then if command -v xcape >/dev/null 2>&1; then
@ -52,3 +48,7 @@ if command -v autocutsel >/dev/null 2>&1; then
autocutsel -fork & autocutsel -fork &
autocutsel -selection PRIMARY -fork & autocutsel -selection PRIMARY -fork &
fi fi
if [ -f "$HOME/.env_xprofile" ]; then
source "$HOME/.env_xprofile"
fi

View file

@ -45,6 +45,7 @@ Xcursor.theme: human
## DPI config ## DPI config
dpi: 92 dpi: 92
.dpi: 92 .dpi: 92
*dpi: 92
Xft.dpi: 92 Xft.dpi: 92
*autohint: 0 *autohint: 0
*lcdfilter: lcddefault *lcdfilter: lcddefault