📝 Add keyboard indecator for qtile, dmne theme for rofi. Update nvim, ranger

This commit is contained in:
Smirnov Olexandr 2020-12-11 19:39:37 +02:00
parent 4f3a929be0
commit 917b69171d
18 changed files with 195 additions and 88 deletions

23
config/qtile/kblayout.py Normal file
View file

@ -0,0 +1,23 @@
from libqtile.widget import base
import os
class KBLayout(base.InLoopPollText):
"""Widget for displaying the current keyboard layout
It requires setxkbmap and xkblayout"""
orientations = base.ORIENTATION_HORIZONTAL
defaults = [
("background", "#000000", "Backbround color"),
("foreground", "#ffffff", "Foreground color"),
]
def __init__(self, **config):
base.InLoopPollText.__init__(self, **config)
def get_keyboard(self):
kb = os.popen("xkblayout").read().rstrip("\n")
return kb
def poll(self):
kb = os.popen(".config/qtile/kblay.sh").read().rstrip('\n').encode('utf-8').decode('utf-8')
return kb