From 9c41754fee87066ed9455e928f1c84e1454f7257 Mon Sep 17 00:00:00 2001 From: Michael Carlberg Date: Thu, 26 Jan 2017 18:31:45 +0100 Subject: [PATCH] Updated Module: i3 (markdown) --- Module:-i3.md | 9 +++++++++ 1 file changed, 9 insertions(+) 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