diff --git a/Module:-i3.md b/Module:-i3.md index e166ba0..a727f84 100644 --- a/Module:-i3.md +++ b/Module:-i3.md @@ -119,3 +119,12 @@ label-urgent-foreground = #000000 label-urgent-background = #bd2c40 label-urgent-padding = 4 ~~~ + +### Generate ws-icon list +~~~ bash +#!/bin/bash +counter=0 +i3-msg -t get_workspaces | tr ',' '\n' | sed -nr 's/"name":"([^"]+)"/\1/p' | while read -r name; do + printf 'ws-icon-%i = "%s;"\n' $((counter++)) $name +done +~~~ \ No newline at end of file