Skip to content

Instantly share code, notes, and snippets.

@fzerorubigd
Last active June 22, 2021 23:16
Show Gist options
  • Select an option

  • Save fzerorubigd/fe28b4863f188469ddb5b423bdc8de29 to your computer and use it in GitHub Desktop.

Select an option

Save fzerorubigd/fe28b4863f188469ddb5b423bdc8de29 to your computer and use it in GitHub Desktop.
#!/bin/bash
case $BLOCK_BUTTON in
1) xkblayout-state set +1 ;; # left click
3) xkblayout-state set +1 ;; # right click
esac
LAYOUT=$(xkblayout-state print " %s")
# i3blocks ignores the output if you miss the \n
echo -e "${LAYOUT^^}\n"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment