laptop fixes

This commit is contained in:
Daniel Flanagan 2017-02-11 14:00:54 -06:00
parent 12747759af
commit 2fbcbe8a24
5 changed files with 63 additions and 17 deletions

View file

@ -1,12 +1,14 @@
#!/usr/bin/env bash #!/usr/bin/env bash
export BAR_MONITOR="DVI-I-2" export BAR_MONITOR="$(polybar --list-monitors | tail -n 1 | sed -n 's/^\s*\(.*\):.*$/\1/p')"
export BAR_HEIGHT=25 export BAR_HEIGHT=25
export BAR_ON_TOP=0 export BAR_ON_TOP=0
export BAR_SIDE_MARGIN=200 export BAR_SIDE_MARGIN=200
echo "$BAR_MONITOR"
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)
MONITOR_WIDTH=$(xrandr | grep DVI-I-2 | grep -Po ' \d+' | head -n 1) MONITOR_WIDTH=$(xrandr | grep "$BAR_MONITOR" | grep -Po ' \d+' | head -n 1)
export BAR_WIDTH=$((MONITOR_WIDTH - GAP - GAP - BAR_SIDE_MARGIN - BAR_SIDE_MARGIN)) export BAR_WIDTH=$((MONITOR_WIDTH - GAP - GAP - BAR_SIDE_MARGIN - BAR_SIDE_MARGIN))
export BAR_FONT=$(xrdb -query | sed -ne 's/.*font:\s*xft:\(.*\)\-.*$/\1/p' | head -n 1) export BAR_FONT=$(xrdb -query | sed -ne 's/.*font:\s*xft:\(.*\)\-.*$/\1/p' | head -n 1)
export BAR_FONT_SIZE=$(xrdb -query | sed -ne 's/.*font:\s*xft:.*\-\(.*\)$/\1/p' | head -n 1) export BAR_FONT_SIZE=$(xrdb -query | sed -ne 's/.*font:\s*xft:.*\-\(.*\)$/\1/p' | head -n 1)

View file

@ -34,6 +34,20 @@ if command -v sxhkd >/dev/null 2>&1; then
sxhkd & sxhkd &
fi fi
if [ -f "$HOME/.fehbg" ]; then
"$HOME/.fehbg" &
fi
# launch optional and helpful apps
if command -v unclutter >/dev/null 2>&1; then
unclutter &
fi
if command -v compton >/dev/null 2>&1; then
compton &
fi
# launch bar
if [[ $START_BAR -eq 1 ]]; then if [[ $START_BAR -eq 1 ]]; then
${BAR_COMMAND} & ${BAR_COMMAND} &
fi fi

View file

@ -11,23 +11,10 @@ if [ -f "$HOME/.xprofile" ]; then
source "$HOME/.xprofile" source "$HOME/.xprofile"
fi fi
if [ -f "$HOME/.fehbg" ]; then
"$HOME/.fehbg" &
fi
# allow a per-device config to override options # allow a per-device config to override options
if [ -f "$HOME/.env_xinitrc" ]; then if [ -f "$HOME/.env_xinitrc" ]; then
source "$HOME/.env_xinitrc" source "$HOME/.env_xinitrc"
fi fi
# launch optional and helpful apps
if command -v unclutter >/dev/null 2>&1; then
unclutter &
fi
if command -v compton >/dev/null 2>&1; then
compton &
fi
# fire up wm # fire up wm
exec "$DOTFILES_PATH/de/wmstart" exec "$DOTFILES_PATH/de/wmstart"

42
env/x/xresources vendored Executable file
View file

@ -0,0 +1,42 @@
#define primaryfont xft:Terminus-9
#define secondaryfont xft:Open Sans-9
#define iconfont xft:stlarch-9
#define primaryletterspace 0
#define emacspfont Monaco 9
! I like this font on my desktop (use in `~/.Xresources.env`!)
!#define primaryfont xft:lemon-11
!#define primaryletterspace 0
! I like this font on my desktop for code streaming
!#define primaryfont xft:Monaco-9
!#define primaryletterspace -2
! I like this font on my laptop
!#define primaryfont xft:Monaco-11
!#define primaryletterspace -1
URxvt.font: xft:xos4 Terminus-10
URxvt.faceName: xft:xos4 Terminus-10
URxvt.boldFont: xft:xos4 Terminus-10
URxvt.letterSpace: 0
URxvt.scrollBar: false
URxvt.cursorUnderline: true
URxvt.cursorBlink: true
URxvt.termName: rxvt-unicode
URxvt.intensityStyles: true
*utf8: 2
URxvt.scaleHeight: 1
URxvt.depth: 32
URxvt.internalBorder: 24
Xcursor.theme: human
URxvt.perl-ext-common: default,matcher,keyboard-select
URxvt.keysym.M-Escape: perl:keyboard-select:activate
URxvt.url-launcher: /usr/bin/xdg-open
URxvt.matcher.button: 1
URxvt.iso14755: False

View file

@ -8,8 +8,9 @@ export -f calc
stopbar() { stopbar() {
# TODO: get the proper monitor! # TODO: get the proper monitor!
bspc config -m "DVI-I-2" bottom_padding "0" BAR_MONITOR="$(polybar --list-monitors | tail -n 1 | sed -n 's/^\s*\(.*\):.*$/\1/p')"
bspc config -m "DVI-I-2" top_padding "0" bspc config -m "$BAR_MONITOR" bottom_padding "0"
bspc config -m "$BAR_MONITOR" top_padding "0"
killall -q polybar killall -q polybar
while pgrep -x polybar >/dev/null; do sleep 1; done while pgrep -x polybar >/dev/null; do sleep 1; done
} }