From bb72c0f5896a2b6904e54de4717d31988d6c4a3f Mon Sep 17 00:00:00 2001
From: JiriKalvoda <jirik.kalvoda@seznam.cz>
Date: Mon, 30 Dec 2019 11:04:27 +0100
Subject: [PATCH] I3 Add toggle-border and floating WUI.

---
 i3/config        | 7 +++++++
 i3/init.sh       | 2 ++
 i3/toggle-border | 8 ++++++++
 3 files changed, 17 insertions(+)
 create mode 100755 i3/toggle-border

diff --git a/i3/config b/i3/config
index 234d723..48591de 100644
--- a/i3/config
+++ b/i3/config
@@ -188,6 +188,7 @@ bindsym $mod+c exec chromium-browser --password-store=gnome
 bindsym $mod+z exec zathura
 bindsym $mod+Shift+comma workspace WUI;exec ~/dev/runWUI/run.sh
 bindsym $mod+comma workspace WUI
+for_window [title="WebUpdatingIndicator compare"] floating enable 
 bindsym $mod+Shift+m workspace MAIL,exec mailspring
 bindsym $mod+m workspace MAIL
 bindsym $mod+n exec nemo
@@ -198,6 +199,7 @@ exec numlockx on
 floating_modifier $mod
 
 
+
 bindsym $outmod+w exec light - 0.9 ; exec lightGUI
 bindsym $outmod+e exec light - 0.15; exec lightGUI
 bindsym $outmod+r exec light + 0.15; exec lightGUI
@@ -216,3 +218,8 @@ bindsym $outmod+m exec xrandr --auto; exec  xrandr --output HDMI-1 --pos 0x0 --o
  
 
 bindsym Control+Print exec gnome-screenshot -i
+exec --no-startup-id /usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1 &
+
+
+for_window [class=".*"] border pixel 1
+bindsym $mod+p exec ~/.config/i3/i3-toggle-border
diff --git a/i3/init.sh b/i3/init.sh
index b1babae..50ca1ac 100644
--- a/i3/init.sh
+++ b/i3/init.sh
@@ -1,3 +1,5 @@
 if [[ $(id -u) -ne 0 ]] ; then echo "Please run as root" ; exit 1 ; fi
 apt install numlockx
+apt install jq
 cp config ~/.config/i3/config 
+cp toggle-border ~/.config/i3/i3-toggle-border
diff --git a/i3/toggle-border b/i3/toggle-border
new file mode 100755
index 0000000..d84215b
--- /dev/null
+++ b/i3/toggle-border
@@ -0,0 +1,8 @@
+#!/bin/bash
+MODE=$(i3-msg -t get_tree | jq -r '.. | .nodes? | .[]? | select(.window!=null and .focused==true).border')
+
+if [ $MODE = "normal" ]; then
+  i3-msg border pixel 1
+else
+  i3-msg border normal 1
+fi
-- 
GitLab