qtile: change from yad to less to view keybinds

This commit is contained in:
Guilherme Rugai Freire 2021-08-20 11:57:20 -03:00
parent bc9b8f4c71
commit 39a37c5189
No known key found for this signature in database
GPG Key ID: 0F9FE41723A8A297
2 changed files with 4 additions and 3 deletions

View File

@ -33,7 +33,7 @@ WEB_QUICK_OPEN = os.path.expanduser(
EMOJI_LAUNCHER = os.path.expanduser( EMOJI_LAUNCHER = os.path.expanduser(
"~/.scripts/bin/clip-moji" "~/.scripts/bin/clip-moji"
) )
SHOW_KEYBINDS = "python3 /home/grfreire/.config/qtile/list_keybinds.py" SHOW_KEYBINDS = f"{TERMINAL} -t Keybinds -e python3 /home/grfreire/.config/qtile/list_keybinds.py"
MEDIA_CONTROL = os.path.expanduser("~/.config/qtile/media_control.sh") MEDIA_CONTROL = os.path.expanduser("~/.config/qtile/media_control.sh")
keys = [ keys = [
@ -366,6 +366,7 @@ floating_layout = layout.Floating(
Match(wm_class="pavucontrol"), # Audio mixer Match(wm_class="pavucontrol"), # Audio mixer
Match(wm_class="gnome-calendar"), # Calendar Match(wm_class="gnome-calendar"), # Calendar
Match(wm_class="yad"), # Yad Match(wm_class="yad"), # Yad
Match(title="Keybinds"), # Keybinds window
] ]
) )

View File

@ -12,10 +12,10 @@ def columnate(matrix):
return "\n".join(_columnate(matrix)) return "\n".join(_columnate(matrix))
matrix = [] matrix = [["Key", "Command"]]
for key in c.keys: for key in c.keys:
keys = ' + '.join((key.modifiers + [key.key])) keys = ' + '.join((key.modifiers + [key.key]))
desc = key.desc desc = key.desc
matrix.append([keys, desc]) matrix.append([keys, desc])
os.system(f"echo \"{columnate(matrix)}\" | yad --text-info --geometry=1200x700") os.system(f"echo \"{columnate(matrix)}\" | col -bx | less")