More config options for ordering bspwm desktops/monitors and fix laptop dock script

This commit is contained in:
Daniel Flanagan 2020-01-28 10:12:29 -06:00
parent bfc0293edd
commit 67b51e8acc
Signed by: lytedev
GPG key ID: 5B2020A0F9921EF4
6 changed files with 18 additions and 28 deletions

View file

@ -2,11 +2,14 @@
NUM_DESKTOPS="$(xrq bspwm.num_desktops)" NUM_DESKTOPS="$(xrq bspwm.num_desktops)"
REVERSE_DESKTOP_ORDERING="$(xrq bspwm.reverse_desktop_ordering)" REVERSE_DESKTOP_ORDERING="$(xrq bspwm.reverse_desktop_ordering)"
BSPWM_MONITORS=$(bspc query -M | tac) REVERSE_MONITOR_DESKTOPS="$(xrq bspwm.reverse_monitor_desktops)"
BSPWM_MONITORS=$(bspc query -M)
MONITOR_COUNT=$(<<< "$BSPWM_MONITORS" wc -w | awk '{ printf $1 }') MONITOR_COUNT=$(<<< "$BSPWM_MONITORS" wc -w | awk '{ printf $1 }')
PER_MONITOR=$((NUM_DESKTOPS / MONITOR_COUNT)) PER_MONITOR=$((NUM_DESKTOPS / MONITOR_COUNT))
DESKTOPS=$(seq "$NUM_DESKTOPS") DESKTOPS=$(seq "$NUM_DESKTOPS")
[ $REVERSE_MONITOR_DESKTOPS -eq 1 ] && BSPWM_MONITORS=$(<<< "$BSPWM_MONITORS" tac)
bspc config normal_border_color "$(xrq bspwm.normal_border_color)" bspc config normal_border_color "$(xrq bspwm.normal_border_color)"
bspc config focused_border_color "$(xrq bspwm.focused_border_color)" bspc config focused_border_color "$(xrq bspwm.focused_border_color)"
bspc config active_border_color "$(xrq bspwm.active_border_color)" bspc config active_border_color "$(xrq bspwm.active_border_color)"

View file

@ -10,7 +10,6 @@ fi
. "$DOTFILES_PATH/apps/de/bspwm/config" . "$DOTFILES_PATH/apps/de/bspwm/config"
[ -f "$DOTFILES_PATH/apps/de/x/loadresources" ] && "$DOTFILES_PATH/apps/de/x/loadresources"
[ -f "$HOME/.fehbg" ] && "$HOME/.fehbg" & [ -f "$HOME/.fehbg" ] && "$HOME/.fehbg" &
[ "$(xrq bspwm.start_compton)" = "true" ] && has_command compton && compton & [ "$(xrq bspwm.start_compton)" = "true" ] && has_command compton && compton &
[ "$(xrq bspwm.start_bar)" = "true" ] && has_command "${BAR_COMMAND}" && "${BAR_COMMAND}" & [ "$(xrq bspwm.start_bar)" = "true" ] && has_command "${BAR_COMMAND}" && "${BAR_COMMAND}" &

View file

@ -1,8 +1,8 @@
! font ! font
#define mono_font iosevka-lyte #define mono_font iosevka-lyte
#define mono_font_size 14 #define mono_font_size 14
#define mono_font_letterspace 0 #define mono_font_letterspace 0
#define icon_font Font Awesome 5 Free Solid #define icon_font Font Awesome 5 Free Solid
#define icon_font_size 12 #define icon_font_size 12
#define bold_mono_font iosevka-lyte Semibold #define bold_mono_font iosevka-lyte Semibold
#define emoji_font Noto Emoji #define emoji_font Noto Emoji
@ -68,6 +68,7 @@ bspwm.window_gap: window_margin
bspwm.border_width: window_border bspwm.border_width: window_border
bspwm.num_desktops: 10 bspwm.num_desktops: 10
bspwm.reverse_desktop_ordering: 0 bspwm.reverse_desktop_ordering: 0
bspwm.reverse_monitor_desktops: 0
bspwm.split_ratio: 0.5 bspwm.split_ratio: 0.5
bspwm.start_compton: false bspwm.start_compton: false
bspwm.start_bar: true bspwm.start_bar: true

View file

@ -1,16 +1,8 @@
#!/usr/bin/env bash #!/usr/bin/env sh
resrc
export OVERRIDE_BAR_MONITOR="DP1"
export OVERRIDE_BAR_HEIGHT="24"
export BAR_ICON_FONT_SIZE="9"
"${DOTFILES_PATH}/apps/de/x/loadresources" lodpi
autorandr --change autorandr --change
"${DOTFILES_PATH}/apps/de/bspwm/bspwmrc" xrandr --output eDP1 --scale-from 1600x900 --filter nearest --mode 3200x1800
xrdb -merge "$ENV_PATH/x/docked.resources"
"${DOTFILES_PATH}/apps/de/bspwm/rc"
restartbar restartbar
"${HOME}/.fehbg" "${HOME}/.fehbg"
"${DOTFILES_PATH}/apps/de/x/loadresources" lodpi
xrdb -merge "$ENV_PATH/lodpi-resource"
xrandr --output eDP1 --scale-from 1600x900 --filter nearest --mode 3200x1800

7
env/laptop/x/docked.resources vendored Executable file
View file

@ -0,0 +1,7 @@
dpi: 92
.dpi: 92
*dpi: 92
Xft.dpi: 92
polybar.display_monitor: DP1
polybar.height: 40

View file

@ -1,12 +0,0 @@
*.font: xft:curie:pixelsize=11,xft:Iosevka Nerd Font Mono:pixelsize=12,xft:Noto Emoji,xft:Font Awesome 5 Free:pixelsize=8,xft:FreeSans:pixelsize=12
*.boldFont: xft:curie:pixelsize=11,xft:Iosevka Nerd Font Mono:style=bold:pixelsize=12,xft:Font Awesome 5 Free:pixelsize=8,xft:FreeSans:pixelsize=12
URxvt.font: xft:curie:pixelsize=11,xft:Iosevka Nerd Font Mono:pixelsize=12,xft:Noto Emoji,xft:Font Awesome 5 Free:pixelsize=8,xft:FreeSans:pixelsize=12
URxvt.boldFont: xft:curie:pixelsize=11,xft:Iosevka Nerd Font Mono:style=bold:pixelsize=12,xft:Font Awesome 5 Free:pixelsize=8,xft:FreeSans:pixelsize=12
dpi: 92
.dpi: 92
*dpi: 92
Xft.dpi: 92
polybar.display_monitor: DP1