1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
- This patch changes keybindings to Emacs like.
- ---
- --- a/pulsemixer 1970-01-01 03:00:01.000000000 +0300
- +++ b/pulsemixer 2018-01-23 03:10:21.279134194 +0300
- @@ -1565,7 +1565,7 @@
- if side is Bar.NONE:
- continue
-
- - if c == curses.KEY_UP or c == ord('k'):
- + if c == curses.KEY_UP or c == ord('p'):
- if bar.locked:
- if self.data[focus][1] == 0:
- n = 1
- @@ -1576,7 +1576,7 @@
- self.scroll(self.UP)
- if not self.data[self.top_line_num + self.focus_line_num][0]:
- self.scroll(self.UP)
- - elif c == curses.KEY_DOWN or c == ord('j'):
- + elif c == curses.KEY_DOWN or c == ord('n'):
- if bar.locked:
- if self.data[focus][1] == self.data[focus][3] - 1:
- n = 1
- @@ -1592,13 +1592,13 @@
- bar.mute_toggle()
- elif c == self.SPACE_KEY:
- bar.lock_toggle()
- - elif c == curses.KEY_LEFT or c == ord('h') or any([c & i for i in self.SCROLL_DOWN]):
- + elif c == curses.KEY_LEFT or c == ord('b') or any([c & i for i in self.SCROLL_DOWN]):
- bar.move(-1, side)
- - elif c == curses.KEY_RIGHT or c == ord('l') or any([c & i for i in self.SCROLL_UP]):
- + elif c == curses.KEY_RIGHT or c == ord('f') or any([c & i for i in self.SCROLL_UP]):
- bar.move(1, side)
- - elif c == curses.KEY_SLEFT or c == ord('H'):
- + elif c == curses.KEY_SLEFT or c == ord('B'):
- bar.move(-10, side)
- - elif c == curses.KEY_SRIGHT or c == ord('L'):
- + elif c == curses.KEY_SRIGHT or c == ord('F'):
- bar.move(10, side)
- elif c in self.DIGITS:
- percent = int(chr(c)) * 10
- @@ -1610,9 +1610,9 @@
- self.submenu_show = False
- self.focus_line_num = self.modes[5][1]
- self.top_line_num = self.modes[5][2]
- - elif c == curses.KEY_UP or c == ord('k'):
- + elif c == curses.KEY_UP or c == ord('p'):
- self.scroll(self.UP)
- - elif c == curses.KEY_DOWN or c == ord('j'):
- + elif c == curses.KEY_DOWN or c == ord('n'):
- self.scroll(self.DOWN)
- elif c == ord('\n'):
- focus = self.focus_line_num + self.top_line_num
- @@ -1847,8 +1847,8 @@
- self.screen.refresh()
-
- def display_helpwin(self):
- - '''h/j/k/l, arrows navigation, volume change
- - H/L, Shift+Left/Shift+Right change volume by 10
- + '''b/n/p/f, arrows navigation, volume change
- + B/F, Shift+Left/Shift+Right change volume by 10
- 1/2/3/4/5/6/7/8/9/0 set volume to 10%-100%
- m mute/unmute
- Space lock/unlock channels together
|