diff --git a/i3/conf/workspaces.conf b/i3/conf/workspaces.conf index d5b83c1..7aabba1 100644 --- a/i3/conf/workspaces.conf +++ b/i3/conf/workspaces.conf @@ -22,10 +22,13 @@ set $ws10 "10" # Bind Workspaces to Screens workspace $ws1 output $monitor1 workspace $ws2 output $monitor1 + workspace $ws3 output $monitor2 workspace $ws4 output $monitor2 -workspace $ws5 output $monitor3 +workspace $ws5 output $monitor2 + workspace $ws6 output $monitor3 +workspace $ws7 output $monitor3 # switch to workspace bindsym $mod+1 workspace number $ws1 diff --git a/polybar/bars/main.ini b/polybar/bars/main.ini index 52c6047..e1a740c 100644 --- a/polybar/bars/main.ini +++ b/polybar/bars/main.ini @@ -2,7 +2,7 @@ inherit = base/bar modules-left = cpm space-invert sep-b -modules-center = xworkspaces +modules-center = single-xworkspaces modules-right = pulseaudio space sep-a space-invert dunst-snooze space-invert sep-b space time space sep-a date space-invert tray-position = left diff --git a/polybar/bars/single.ini b/polybar/bars/single.ini new file mode 100644 index 0000000..4e24ed4 --- /dev/null +++ b/polybar/bars/single.ini @@ -0,0 +1,13 @@ +[bar/single] +inherit = base/bar + +modules-left = cpm space-invert sep-b +modules-center = xworkspaces +modules-right = pulseaudio space sep-a space-invert dunst-snooze space-invert sep-b space time space sep-a date space-invert + +tray-position = left +tray-detached = true +tray-scale = 0.9 + +tray-offset-x = 130 +tray-offset-y = 3 diff --git a/polybar/bars/workspaces.ini b/polybar/bars/workspaces.ini new file mode 100644 index 0000000..5ff84f5 --- /dev/null +++ b/polybar/bars/workspaces.ini @@ -0,0 +1,17 @@ +[bar/workspaces] +inherit = base/bar + +modules-center = single-xworkspaces + +bottom = true + +width = 12% +offset-x = ${style.double-gaps} +offset-y = ${style.double-gaps} + +border-size = ${style.border-thickness} +border-bottom-size = ${style.border-thickness} +border-color = ${colors.primary-accent} + +override-redirect = true +wm-restack = ${env:RESTACK:} diff --git a/polybar/modules/single-xworspaces.ini b/polybar/modules/single-xworspaces.ini new file mode 100644 index 0000000..3899ad1 --- /dev/null +++ b/polybar/modules/single-xworspaces.ini @@ -0,0 +1,48 @@ +[module/single-xworkspaces] +type = internal/xworkspaces + +#Icons +#  Consoles +# ﭮ Discord +#  Firefox +#  Music +#  Code +#  Steam +#  Files + +icon-default = "" +icon-0 = "1;" +icon-1 = "2;" + +icon-2 = "3;" +icon-3 = "4;" +icon-4 = "5;" + +icon-5 = "6;ﭮ" +icon-9 = "10;" + +icon-6 = "7" +icon-7 = "8" +icon-8 = "9" + +label-active = "%icon%" +label-active-background = ${colors.primary-accent} +label-active-foreground = ${colors.primary-background} +label-active-underline = ${colors.primary-accent} +label-active-padding = 0 +label-active-font = 2 + +label-occupied = %icon% +label-occupied-padding = 1 +label-occupied-font = 2 + +label-urgent = %icon% +label-urgent-foreground = ${colors.warn} +label-urgent-padding = 1 +label-urgent-font = 2 + +label-empty = %icon% +label-empty-padding = 1 +label-empty-font = 2 + +pin-workspaces = true diff --git a/polybar/scripts/launch.sh b/polybar/scripts/launch.sh index e58526d..7a27194 100755 --- a/polybar/scripts/launch.sh +++ b/polybar/scripts/launch.sh @@ -2,5 +2,17 @@ killall -q polybar -echo "---" | tee -a /tmp/polybar1.log /tmp/polybar2.log -polybar main 2>&1 | tee -a /tmp/polybar1.log & disown \ No newline at end of file +restack_list=('' 'i3' '') + +i=0 +while read bar; do + if [[ $i -eq 0 ]]; then + # Launch Main Bar + MONITOR=$bar polybar main 2>&1 | tee -a /tmp/polybar_$bar.log & disown + else + # Launch Sub Bar + MONITOR=$bar RESTACK=${restack_list[$i]} polybar workspaces 2>&1 | tee -a /tmp/polybar_$bar.log & disown + fi + + i=$((i + 1)) +done < <(polybar -M | cut -d ':' -f 1) diff --git a/rice-bowl/scripts/generators/generate_polybar_config.sh b/rice-bowl/scripts/generators/generate_polybar_config.sh index 4002405..e1a5da5 100755 --- a/rice-bowl/scripts/generators/generate_polybar_config.sh +++ b/rice-bowl/scripts/generators/generate_polybar_config.sh @@ -54,6 +54,8 @@ dunst-snooze = $RICE_POLYBAR_PATH/scripts/dunst-snooze.sh \"$RICE_COLOR_SECONDAR echo "# $RICE_GENERATED_HEADER [style] gaps = $RICE_GAPS +double-gaps = $(($RICE_GAPS * 2)) +border-thickness = $RICE_BORDER_THICKNESS border-radius = $RICE_BORDER_RADIUS " > $RICE_POLYBAR_CONFIG_PATH/style.nogit.ini