summaryrefslogtreecommitdiffstats
path: root/sxhkd/.local/bin/toggle-layout
blob: cb259b461b4d2c5d2719945c01317d6714de86cb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
#!/bin/bash

lang="$(setxkbmap -print | grep xkb_symbols | cut -d'+' -f 2)"

if [ "$lang" = "us" ]; then
    setxkbmap ir
else
    setxkbmap us
    xmodmap $HOME/.Xmodmap
fi