summaryrefslogtreecommitdiff
path: root/.local/bin/lemonbar/modules/language.py
diff options
context:
space:
mode:
authorAndrew Guschin <saintruler@gmail.com>2021-05-10 14:44:07 +0400
committerAndrew Guschin <saintruler@gmail.com>2021-05-10 14:44:07 +0400
commit40ce35bd2f379f2c30e51173752926f8c620ffd6 (patch)
treed8bb4e1651758edd2af52e4b0a4b40c3c0f13c0e /.local/bin/lemonbar/modules/language.py
parent2f6db370d4086eca956279ea41cd305b474f9caf (diff)
Changed window manager to bspwm and added custom config for lemonbar
Diffstat (limited to '.local/bin/lemonbar/modules/language.py')
-rw-r--r--.local/bin/lemonbar/modules/language.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/.local/bin/lemonbar/modules/language.py b/.local/bin/lemonbar/modules/language.py
new file mode 100644
index 0000000..50058c8
--- /dev/null
+++ b/.local/bin/lemonbar/modules/language.py
@@ -0,0 +1,10 @@
+from subprocess import run as _run
+
+
+def run(command):
+ return _run(command.split(), capture_output=True).stdout.decode().strip()
+
+
+def callback():
+ name = run('xkblayout-state print "%s"').strip('"')
+ return f"LNG: {name.upper()}"