mirror of
https://github.com/vale981/dotfiles
synced 2025-03-05 09:31:43 -05:00
make bspwm config ready for the main desktop
This commit is contained in:
parent
9df431461f
commit
e4e04bc7cf
5 changed files with 59 additions and 5 deletions
|
@ -3,8 +3,9 @@ ETH_DEV="enp3s0"
|
||||||
|
|
||||||
MAIN_NET=$ETH_DEV
|
MAIN_NET=$ETH_DEV
|
||||||
MAIN_FONT="Source Code Pro 8"
|
MAIN_FONT="Source Code Pro 8"
|
||||||
MAIN_MONITOR=DisplayPort-0
|
MONITORS=($(xrandr | rg -i "\sconnected" | rg -v eDP | cut -d" " -f1))
|
||||||
MONITORS=(DVI-I-0 DisplayPort-2)
|
MAIN_MONITOR=${MONITORS[2]}
|
||||||
|
SIDE_MONITORS=($(xrandr | rg -i "\sconnected" | rg -v eDP | cut -d" " -f1 | grep -v $MAIN_MONITOR))
|
||||||
RYGEL="true"
|
RYGEL="true"
|
||||||
BAR_POS="bottom"
|
BAR_POS="bottom"
|
||||||
DPI=91
|
DPI=91
|
||||||
|
|
|
@ -33,5 +33,12 @@ bspc config remove_unplugged_monitors true
|
||||||
# Scripts #
|
# Scripts #
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
|
{{ #laptop }}
|
||||||
~/.config/bspwm/monitor_laptop.sh
|
~/.config/bspwm/monitor_laptop.sh
|
||||||
|
{{ /laptop }}
|
||||||
|
|
||||||
|
{{ ^laptop }}
|
||||||
|
~/.config/bspwm/monitor_desktop.sh
|
||||||
|
{{ /laptop }}
|
||||||
|
|
||||||
~/.config/polybar/launch.sh
|
~/.config/polybar/launch.sh
|
23
dots/bspwm/monitor_desktop.sh.template
Executable file
23
dots/bspwm/monitor_desktop.sh.template
Executable file
|
@ -0,0 +1,23 @@
|
||||||
|
###############################################################################
|
||||||
|
# External Monitor #
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
declare -A workspaces
|
||||||
|
workspaces[2]="I V VI VIII IX X"
|
||||||
|
workspaces[0]="II IV VII"
|
||||||
|
workspaces[1]="III IX"
|
||||||
|
|
||||||
|
MONITORS=({{ MONITORS[@] }})
|
||||||
|
|
||||||
|
move_to_monitor() {
|
||||||
|
for D in $(echo $1 | tr " " "\n"); do
|
||||||
|
bspc desktop $D --to-monitor $2
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
I=0
|
||||||
|
for MONITOR in $MONITORS; do
|
||||||
|
bspc monitor $MONITOR -d ${workspaces[${I}]}
|
||||||
|
((I=I+1))
|
||||||
|
# move_to_monitor "${workspaces[${I}]}" $MONITOR
|
||||||
|
done
|
|
@ -26,15 +26,23 @@ border-bottom-color = ${colors.bordercolor}
|
||||||
font-0 = Fira Code:size=10;2
|
font-0 = Fira Code:size=10;2
|
||||||
font-1 = FontAwesome:size=10;2
|
font-1 = FontAwesome:size=10;2
|
||||||
|
|
||||||
|
{{ #LAPTOP }}
|
||||||
[bar/ext]
|
[bar/ext]
|
||||||
inherit = bar/base
|
inherit = bar/base
|
||||||
|
monitor = {{.}}
|
||||||
monitor = HDMI-2
|
|
||||||
modules-left = bspwm
|
modules-left = bspwm
|
||||||
|
{{ /LAPTOP }}
|
||||||
|
|
||||||
|
{{#SIDE_MONITORS}}
|
||||||
|
[bar/ext__{{.}}]
|
||||||
|
inherit = bar/base
|
||||||
|
monitor = {{.}}
|
||||||
|
modules-left = bspwm
|
||||||
|
{{/SIDE_MONITORS}}
|
||||||
|
|
||||||
[bar/main]
|
[bar/main]
|
||||||
inherit = bar/base
|
inherit = bar/base
|
||||||
monitor = eDP-1
|
monitor = {{ MAIN_MONITOR }}
|
||||||
|
|
||||||
spacing = 3
|
spacing = 3
|
||||||
lineheight = 2
|
lineheight = 2
|
||||||
|
@ -45,7 +53,14 @@ module-margin-right = 1
|
||||||
separator = |
|
separator = |
|
||||||
|
|
||||||
modules-left = bspwm
|
modules-left = bspwm
|
||||||
|
|
||||||
|
{{ #LAPTOP }}
|
||||||
modules-right = battery clock
|
modules-right = battery clock
|
||||||
|
{{ /LAPTOP }}
|
||||||
|
|
||||||
|
{{ ^LAPTOP }}
|
||||||
|
modules-right = clock
|
||||||
|
{{ /LAPTOP }}
|
||||||
|
|
||||||
tray-position = center
|
tray-position = center
|
||||||
|
|
|
@ -1,5 +1,13 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
polybar-msg cmd quit
|
polybar-msg cmd quit
|
||||||
polybar main & disown
|
polybar main & disown
|
||||||
|
|
||||||
|
{{ #LAPTOP }}
|
||||||
polybar ext & disown
|
polybar ext & disown
|
||||||
|
{{ /LAPTOP }}
|
||||||
|
|
||||||
|
{{#SIDE_MONITORS}}
|
||||||
|
polybar ext__{{.}} & disown
|
||||||
|
{{/SIDE_MONITORS}}
|
||||||
|
|
||||||
xdo id -m -N Polybar && polybar-msg cmd hide
|
xdo id -m -N Polybar && polybar-msg cmd hide
|
Loading…
Add table
Reference in a new issue