diff --git a/i3/config b/i3/config index de29d19..eec621a 100644 --- a/i3/config +++ b/i3/config @@ -228,6 +228,7 @@ client.background #ffffff # Start i3bar to display a workspace bar (plus the system information i3status # finds out, if available) bar { + id 1 position top status_command exec /home/pierre/.config/i3status/mytopbar.sh workspace_buttons no @@ -235,6 +236,7 @@ bar { } bar { + id 2 position bottom status_command exec /home/pierre/.config/i3status/mybottombar.sh tray_output none diff --git a/i3status/click_vpn.sh b/i3status/click_vpn.sh index 1a5290e..a729bde 100755 --- a/i3status/click_vpn.sh +++ b/i3status/click_vpn.sh @@ -10,3 +10,5 @@ else echo "Connect VPN" sudo wg-quick up wg0 fi +kill -9 $(ps faux | grep [b]ar_id=2 | awk '{print $2}') +i3-msg -t command 'exec --no-startup-id i3bar --bar_id=2' diff --git a/i3status/mybottombar.sh b/i3status/mybottombar.sh index 781f3ce..67db767 100755 --- a/i3status/mybottombar.sh +++ b/i3status/mybottombar.sh @@ -144,8 +144,8 @@ echo '[' # Begin the endless array. echo '[]' # We send an empty first array of blocks to make the loop simpler: # Now send blocks with information forever: -(while :; -do +#(while :; +#do echo -n ",[" myip_public_text myip_public @@ -155,8 +155,8 @@ do vpn_text myvpn_on echo "]" - sleep 5 -done) & +# sleep 5 +#done) & # click events while read line; @@ -166,6 +166,6 @@ do # VPN click if [[ $line == *"name"*"id_vpn"* ]]; then - mate-terminal -e /home/pierre/.config/i3status/click_vpn.sh & + wezterm -e --class term_date /home/pierre/.config/i3status/click_vpn.sh & fi done