From c940777406364e5eb2be539bd21e11d27eed71ed Mon Sep 17 00:00:00 2001 From: Blaster4385 Date: Sun, 3 Mar 2024 18:17:27 +0530 Subject: [PATCH] feat: added support for two monitors --- conky/start.sh | 5 +++++ i3/config | 16 +++++++++++++++- polybar/config.ini | 1 + polybar/launch.sh | 4 +++- 4 files changed, 24 insertions(+), 2 deletions(-) create mode 100755 conky/start.sh diff --git a/conky/start.sh b/conky/start.sh new file mode 100755 index 0000000..e2984cc --- /dev/null +++ b/conky/start.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +killall conky +conky & +conky -y -1440 & diff --git a/i3/config b/i3/config index 452df9d..1331276 100644 --- a/i3/config +++ b/i3/config @@ -12,9 +12,22 @@ exec --no-startup-id numlockx exec --no-startup-id nm-applet exec_always --no-startup-id feh --bg-scale ~/Pictures/Wallpapers/wall.png exec_always --no-startup-id ~/.config/polybar/launch.sh -exec --no-startup-id conky exec --no-startup-id picom exec --no-startup-id xset r rate 250 25 +exec --no-startup-id xrandr --output DP-0 --auto --above DP-2 +exec --no-startup-id xrdb -load ~/.Xdefaults +exec --no-startup-id ~/.config/conky/start.sh + +workspace 1 output DP-2 +workspace 2 output DP-2 +workspace 3 output DP-2 +workspace 4 output DP-2 +workspace 5 output DP-2 +workspace 6 output DP-0 +workspace 7 output DP-0 +workspace 8 output DP-0 +workspace 9 output DP-0 +workspace 10 output DP-0 # Lockscreen. bindsym $mod+Shift+x exec --no-startup-id ~/scripts/lock.sh @@ -164,6 +177,7 @@ mode "resize" { bindsym $mod+r mode "resize" default_border pixel 0 +for_window [all] border pixel 0 # set primary gruvbox colorscheme colors set $bg #1d2021 diff --git a/polybar/config.ini b/polybar/config.ini index b2352b6..7b90932 100644 --- a/polybar/config.ini +++ b/polybar/config.ini @@ -17,6 +17,7 @@ secondary = #e60053 alert = #bd2c40 [bar/top] +monitor = ${env:MONITOR:} width = 100% height = 30 offset-x = 0% diff --git a/polybar/launch.sh b/polybar/launch.sh index e39b321..11e6018 100755 --- a/polybar/launch.sh +++ b/polybar/launch.sh @@ -2,4 +2,6 @@ killall -q polybar -polybar --config=$HOME/.config/polybar/config.ini top +MONITOR=DP-2 polybar --config=$HOME/.config/polybar/config.ini top +sleep 1 +MONITOR=DP-0 polybar --config=$HOME/.config/polybar/config.ini top