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/_get-sway-layout

10 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'