diff --git a/i3/desktop.conf b/i3/desktop.conf index d7c1373..ebc1f64 100644 --- a/i3/desktop.conf +++ b/i3/desktop.conf @@ -14,7 +14,6 @@ workspace $ws8 output DVI-D-0 workspace $ws9 output HDMI-0 workspace $ws10 output HDMI-0 -exec --no-startup-id MONITOR=DVI-D-0 polybar aqua & exec --no-startup-id compton & exec --no-startup-id feh --bg-scale ~/Pictures/desktop/0001.jpg diff --git a/i3/shared.conf b/i3/shared.conf index 06452a1..55a0a76 100644 --- a/i3/shared.conf +++ b/i3/shared.conf @@ -19,8 +19,7 @@ bindsym $mod+Return exec alacritty # kill focused window bindsym $mod+q kill -# start dmenu (a program launcher) -#bindsym $mod+d exec --no-startup-id dmenu_run -i -nb '#000000' -nf $blue -sb $pink -sf $lpink -fn 'SF Pro Display:semibold:fixed:pixelsize=18' +# start program launcher bindsym $mod+d exec --no-startup-id rofi -show combi -theme ~/.config/rofi/themes/aqua # change focus bindsym $mod+j focus left @@ -173,6 +172,7 @@ exec_always --no-startup-id setxkbmap -option 'caps:super' # Startup scripts exec --no-startup-id sh ~/.config/scripts/connect-nas.sh +exec --no-startup-id systemctl --user start polybar # class border backgr. text indicator child_border client.focused $pink $pink $pink $pink $pink @@ -185,7 +185,8 @@ client.background $blue # Removes border and title bar for_window [class="^.*"] border pixel 4 -new_window 1pixel +#new_window 1pixel +new_float normal 4 #new_window normal 0 px # Screenshots diff --git a/i3/w530.conf b/i3/w530.conf index 33f009e..3999eab 100644 --- a/i3/w530.conf +++ b/i3/w530.conf @@ -1,6 +1,3 @@ -# Polybar -exec --no-startup-id MONITOR=LVDS-1 polybar aqua - # Screen brightness controls bindsym XF86MonBrightnessUp exec light -A 5 # increase screen brightness bindsym XF86MonBrightnessDown exec light -U 5 # decrease screen brightness diff --git a/scripts/audio/system-start-audio.sh b/scripts/audio/system-start-audio.sh index 48f4e22..01035bd 100644 --- a/scripts/audio/system-start-audio.sh +++ b/scripts/audio/system-start-audio.sh @@ -58,3 +58,4 @@ sh ~/.config/scripts/audio/es8start.sh sh ~/.config/scripts/audio/es9start.sh launchi3 +systemctl --user restart polybar diff --git a/scripts/desktop/polybar-start.sh b/scripts/desktop/polybar-start.sh new file mode 100755 index 0000000..39115a3 --- /dev/null +++ b/scripts/desktop/polybar-start.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +# Stop all polybar instances +killall -q polybar +while pgrep -x polybar >/dev/null; do sleep 0.1; done + +for monitor in $(xrandr -q | grep -e "\sconnected\s" | cut -d' ' -f1); do + if [ $monitor == 'DVI-D-0' ] || [ $monitor == 'LVDS-1' ]; then + MONITOR=$monitor polybar aqua & + fi +done + + diff --git a/systemd/user/polybar.service b/systemd/user/polybar.service new file mode 100644 index 0000000..f3a20a9 --- /dev/null +++ b/systemd/user/polybar.service @@ -0,0 +1,8 @@ +[Unit] +Description=Polybar + +[Service] +Type=oneshot +RemainAfterExit=true +ExecStart=%h/.config/scripts/desktop/polybar-start.sh +ExecStop=killall -q polybar \ No newline at end of file