This repository has been archived on 2024-04-07. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles/dotfiles/scripts/_sway_get-layout
2021-03-23 12:27:51 -03:00

9 lines
188 B
Bash
Executable file

#!/bin/sh
swaymsg -t get_inputs |
jq -r '..|
select(.type? == "keyboard")
.xkb_active_layout_name' |
head -n 1 |
sd '\b(..)[\w\s]*' '$1' |
sd '$' '\n'