Browse Source

heads-welcome: Add a subshell that sets window borders.

parazyd 1 year ago
parent
commit
2e76fd19fc
1 changed files with 12 additions and 0 deletions
  1. 12 0
      usr/local/lib/heads/heads-welcome

+ 12 - 0
usr/local/lib/heads/heads-welcome

@@ -8,6 +8,15 @@
8 8
 
9 9
 rm -f /etc/sudoers.d/heads-welcome
10 10
 
11
+# this subshell adds borders to the windows since this is
12
+# started before our window manager. uses wmutils.
13
+( while true; do
14
+	for i in $(lsw); do
15
+		chwb -s 2 -c 0x000000 $i
16
+		sleep 0.1
17
+	done
18
+done & )
19
+
11 20
 data="$(yad \
12 21
 	--title="Welcome to heads!" \
13 22
 	--text="<big><b>Welcome to heads!</b></big>
@@ -73,3 +82,6 @@ echo "$data" | tr ':' '\n' | while read val; do
73 82
 			;;
74 83
 	esac
75 84
 done
85
+
86
+# here we kill it because of the subshell
87
+pgrep heads-welcome | xargs kill