Hi folks,
I'm trying to subclass the Prompt widget, so that Ctrl-a goes to the
beginning of line. Here's my first stab - need some help to finish. thanks
from libqtile import layout, bar, widget, hook, xkeysyms
class Prompt2(widget.Prompt):
def _beginning_of_line(self):
if self.cursor_position:
self.cursor_position = 0
def __init__(self, *args, **config):
super(Prompt2, self).__init__(*args, **config)
# Not sure how one would use both keysyms: ('Control_L'+'a')
self.keyhandlers[xkeysyms.keysyms['a']] =
self._beginning_of_line()
screens = [
Screen(
bottom=bar.Bar(
[
widget.GroupBox(),
Prompt2(prompt='cmd: '),
--
You received this message because you are subscribed to the Google Groups
"qtile-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.