Skip to content

Commit

Permalink
Add Pacmacs to games layer
Browse files Browse the repository at this point in the history
  • Loading branch information
CestDiego authored and syl20bnr committed Oct 14, 2015
1 parent 101f57f commit 8296b81
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
10 changes: 10 additions & 0 deletions layers/+fun/games/README.org
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ This layer allows you to play evilified games in spacemacs.

The games available now are:
- 2048-game
- Pacmacs (Pacman for Emacs)
- Tetris

* Install
Expand Down Expand Up @@ -47,6 +48,15 @@ Possible helm actions:
| ~k~ | Move the tiles up |
| ~l~ | Move the tiles right |

** Pacmacs

| Key Binding | Description |
|-------------+-------------------|
| ~h~ | Move left |
| ~j~ | Move down |
| ~k~ | Move up |
| ~l~ | Move right |
| | |
** Tetris

| Key Binding | Description |
Expand Down
17 changes: 16 additions & 1 deletion layers/+fun/games/packages.el
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@
;;
;;; License: GPLv3

(defvar games-packages '(2048-game))
(defvar games-packages '(
2048-game
pacmacs
))

(defun games/init-2048-game ()
(use-package 2048-mode
Expand All @@ -24,3 +27,15 @@
"k" '2048-up
"h" '2048-left
"l" '2048-right))))

(defun games/init-pacmacs ()
(use-package pacmacs
:defer t
:init
(push '("pacmacs" . (pacmacs-start :quit (kill-buffer-ask (get-buffer "*Pacmacs*"))
:reset pacmacs-start)) helm-games-list)
(evilify pacmacs-mode pacmacs-mode-map
"h" 'pacmacs-left
"j" 'pacmacs-down
"k" 'pacmacs-up
"l" 'pacmacs-right)))

0 comments on commit 8296b81

Please sign in to comment.