Update for dual monitor system

This commit is contained in:
Andrew Scott 2023-01-10 16:25:06 -05:00
parent d3007e7919
commit 8ca9a58345
Signed by: a
GPG key ID: 7CD5A5977E4931C1
6 changed files with 58 additions and 14 deletions

View file

@ -9,7 +9,7 @@ alias ls='ls --color=auto'
PS1='[\u@\h \W]\$ '
export GPG_TTY=$(tty)
export EDITOR=emacs
export EDITOR=nvim
alias nv=nvim
alias r="urxvt -name Ranger -e ranger & disown"

View file

@ -1,8 +1,7 @@
#!/bin/bash
{{ if (or (eq .chezmoi.hostname "helix") (eq .chezmoi.hostname "triangulum")) }}
{{ if ne .chezmoi.hostname "hydrus" }}
bspc monitor eDP-1 -d 1 2 3 4 5 6 7 8 9 10
{{- end }}
{{ if eq .chezmoi.hostname "hydrus"}}
{{ else }}
bspc monitor DP-0 -d 1 2 3 4 5
bspc monitor DVI-I-1 -d 6 7 8 9 10
{{ end }}
@ -10,11 +9,17 @@ bspc config border_width 2
{{- if eq .chezmoi.hostname "helix" }}
bspc config window_gap 10
bspc config top_padding 70
{{ else }}
bspc config window_gap 5
bspc config top_padding 38
{{- end}}
bspc config bottom_padding 0
{{ else if eq .chezmoi.hostname "hydrus"}}
bspc config window_gap 5
bspc config top_padding 0
bspc config bottom_padding 32
{{ else }}
bspc config window_gap 5
bspc config top_padding 38
bspc config bottom_padding 0
{{- end}}
bspc config split_ratio 0.50
bspc config borderless_monocle true
bspc config gapless_monocle true

View file

@ -7,19 +7,27 @@ margin-bottom = 0
margin-top = 0
[bar/one]
{{- if eq .chezmoi.hostname "hydrus"}}
monitor = DP-0
height = 32
bottom = true
{{- else }}
monitor = eDP-1
height = 72
bottom = false
{{- end}}
monitor-fallback =
monitor-strict = false
enable-ipc = true
override-redirect = true
bottom = false
fixed-center = true
width = 100%
height = 72
offset-x = 0%
offset-y = 0%
{{- if eq .chezmoi.hostname "helix" }}
dpi-x = 216
dpi-y = 216
{{- end }}
background = ${color.background}
foreground = ${color.foreground}
radius-top = 0.0
@ -42,11 +50,18 @@ font-3 = Font Awesome 6 Brands:style=Regular:size=12;3
modules-left = workspaces sep title
modules-center = spotify
{{- if eq .chezmoi.hostname "helix"}}
modules-right = keyboard sep pulseaudio-control sep battery0 sep date sep powermenu
{{- else }}
modules-right = keyboard sep pulseaudio-control sep date sep powermenu
{{- end}}
tray-position = right
tray-detached = false
{{- if eq .chezmoi.hostname "helix" }}
tray-maxsize = 40
{{- else }}
tray-maxsize = 16
{{- end }}
tray-background = ${color.background}
tray-offset-x = 0
tray-offset-y = 0
@ -69,7 +84,11 @@ cursor-click =
cursor-scroll =
[bar/two]
{{- if eq .chezmoi.hostname "hydrus"}}
monitor = DVI-I-1
{{- else }}
monitor = eDP-1
{{- end}}
monitor-fallback =
monitor-strict = false
enable-ipc = true
@ -96,9 +115,9 @@ dim-value = 1.0
locale = en_US.UTF-8
font-0 = Hack:size=10;3
font-1 = Font Awesome 5 Free:style=Solid:size=12;3
font-2 = Font Awesome 5 Free:style=Regular:size=12;3
font-3 = Font Awesome 5 Brands:style=Regular:size=12;3
font-1 = Font Awesome 6 Free:style=Solid:size=12;3
font-2 = Font Awesome 6 Free:style=Regular:size=12;3
font-3 = Font Awesome 6 Brands:style=Regular:size=12;3
modules-left = workspaces sep title
modules-center = spotify

View file

@ -0,0 +1,13 @@
#!/bin/bash
# Terminate already running bar instances
killall -q polybar
# Wait until the processes have been shut down
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
# Launch Polybar, using default config location ~/.config/polybar/config
polybar one -r --config=~/.config/polybar/config.ini &
polybar two -r --config=~/.config/polybar/config.ini &
echo "Polybar launched..."

View file

@ -1,6 +1,10 @@
#!/bin/bash
## Simple script to mirror all connected displays for presentations
{{- if eq .chezmoi.hostname "helix" }}
RESOLUTION=3840x2160
{{ else }}
RESOLUTION=1920x1080
{{- end }}
xrandr --listmonitors | sed -n '1!p' | sed -e 's/\s[0-9].*\s\([a-zA-Z0-9\-]*\)$/\1/g' | xargs -n 1 -- bash -xc 'xrandr --output $0 --mode '$RESOLUTION' --pos 0x0 --rotate normal'

View file

@ -37,6 +37,9 @@ fi
xinput set-prop 13 312 .8 &
{{ else if eq .chezmoi.hostname "triangulum" -}}
xinput set-prop 10 306 1 &
{{ else if eq .chezmoi.hostname "hydrus" -}}
xset m 10/10 100 r rate 500 30 b on &
numlockx on &
{{- end }}
xsetroot -cursor_name left_ptr &
exec bspwm