{"action":"closed","issue":{"url":"https://api.github.com/repos/luminousmen/xkblang/issues/1","repository_url":"https://api.github.com/repos/luminousmen/xkblang","labels_url":"https://api.github.com/repos/luminousmen/xkblang/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/luminousmen/xkblang/issues/1/comments","events_url":"https://api.github.com/repos/luminousmen/xkblang/issues/1/events","html_url":"https://github.com/luminousmen/xkblang/issues/1","id":149105838,"number":1,"title":"[feature request] Add formatting option","user":{"login":"un-def","id":2131407,"avatar_url":"https://avatars.githubusercontent.com/u/2131407?v=3","gravatar_id":"","url":"https://api.github.com/users/un-def","html_url":"https://github.com/un-def","followers_url":"https://api.github.com/users/un-def/followers","following_url":"https://api.github.com/users/un-def/following{/other_user}","gists_url":"https://api.github.com/users/un-def/gists{/gist_id}","starred_url":"https://api.github.com/users/un-def/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/un-def/subscriptions","organizations_url":"https://api.github.com/users/un-def/orgs","repos_url":"https://api.github.com/users/un-def/repos","events_url":"https://api.github.com/users/un-def/events{/privacy}","received_events_url":"https://api.github.com/users/un-def/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-18T10:07:22Z","updated_at":"2016-04-25T09:40:35Z","closed_at":"2016-04-25T09:40:35Z","body":"It would be nice to have formatting options, something like this (from `xkblayout-state` help):\r\n\r\n```\r\n  %c -> current layout number\r\n  %n -> current layout name\r\n  %s -> current layout symbol\r\n  %v -> current layout variant\r\n  %e -> current layout variant (equals to %s if %v is empty)\r\n  %C -> layout count\r\n  %N -> layout names (one per line)\r\n  %S -> layout symbols (one per line)\r\n  %V -> layout variants (one per line)\r\n  %E -> layout variants (one per line; layout symbol is used if variant is empty)\r\n  %% -> A literal '%'\r\n```\r\n\r\nUsage:\r\n\r\n```\r\n$ xkblang\r\nEnglish (US)\r\n\r\n$ xkblang 'layout: %n [%s]'\r\nlayout: English [us]\r\n\r\n$ xkblang '%s\\n%s\\n#FFFFFF'\r\nus\r\nus\r\n#FFFFFF\r\n```\r\n\r\nThe latter example can be used as blocklet without any external wrapper — just add this string as `command` block property to your i3blocks config."}}