summaryrefslogtreecommitdiff
path: root/.config/emacs/modules/mm-tetris.el
blob: 06fae582c98c8c00e891a03e57a7175a05e33c9d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
;;; mm-tetris.el --- Emacs configurations for ‘tetris’  -*- lexical-binding: t; -*-

(defun mm-tetris-rotate-mirror ()
  "Rotate the current piece by 180°."
  (declare (modes tetris-mode))
  (interactive)
  (tetris-rotate-next)
  (tetris-rotate-next))

(use-package tetris
  :bind (:map tetris-mode-map
         ("a"   . tetris-move-left)
         ("d"   . tetris-move-right)
         ("k"   . tetris-rotate-next)
         (";"   . tetris-rotate-prev)
         ("l"   . tetris-move-down)
         ("o"   . mm-tetris-rotate-mirror)
         ("SPC" . tetris-move-bottom)))

(provide 'mm-tetris)