diff options
author | Guillaume Gérard <1322081+GreatWizard@users.noreply.github.com> | 2020-10-28 18:20:06 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-28 10:20:06 -0700 |
commit | c745cbb77a66a44549ee1ab3b1998c495c1a1ca5 (patch) | |
tree | a947f2215dcda13fac95b2620b70bc095b8d2d14 /users/greatwizard/git.c | |
parent | 6b1ae7e6aa7180b00759b5692d2ea5bd0303c566 (diff) | |
download | qmk_firmware-c745cbb77a66a44549ee1ab3b1998c495c1a1ca5.tar.gz qmk_firmware-c745cbb77a66a44549ee1ab3b1998c495c1a1ca5.zip |
[Keymap] greatwizard userspace and ortho 4x12 and 5x12 keymaps (#9584)
Diffstat (limited to 'users/greatwizard/git.c')
-rw-r--r-- | users/greatwizard/git.c | 127 |
1 files changed, 127 insertions, 0 deletions
diff --git a/users/greatwizard/git.c b/users/greatwizard/git.c new file mode 100644 index 000000000..4bf68fe69 --- /dev/null +++ b/users/greatwizard/git.c | |||
@@ -0,0 +1,127 @@ | |||
1 | /* Copyright 2020 Guillaume Gérard | ||
2 | * | ||
3 | * This program is free software: you can redistribute it and/or modify | ||
4 | * it under the terms of the GNU General Public License as published by | ||
5 | * the Free Software Foundation, either version 2 of the License, or | ||
6 | * (at your option) any later version. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
15 | */ | ||
16 | #include "git.h" | ||
17 | |||
18 | bool process_record_git(uint16_t keycode, keyrecord_t *record) { | ||
19 | switch (keycode) { | ||
20 | case GIT_ADD: | ||
21 | if (record->event.pressed) { | ||
22 | SEND_STRING("git add "); | ||
23 | } | ||
24 | return false; | ||
25 | case GIT_BRANCH: | ||
26 | if (record->event.pressed) { | ||
27 | SEND_STRING("git branch "); | ||
28 | } | ||
29 | return false; | ||
30 | case GIT_CHECKOUT: | ||
31 | if (record->event.pressed) { | ||
32 | SEND_STRING("git checkout "); | ||
33 | } | ||
34 | return false; | ||
35 | case GIT_CHERRYPICK: | ||
36 | if (record->event.pressed) { | ||
37 | SEND_STRING("git cherry-pick "); | ||
38 | } | ||
39 | return false; | ||
40 | case GIT_COMMIT: | ||
41 | if (record->event.pressed) { | ||
42 | SEND_STRING("git commit -m \"\""SS_TAP(X_LEFT)); | ||
43 | } | ||
44 | return false; | ||
45 | case GIT_DIFF: | ||
46 | if (record->event.pressed) { | ||
47 | SEND_STRING("git diff "); | ||
48 | } | ||
49 | return false; | ||
50 | case GIT_FETCH: | ||
51 | if (record->event.pressed) { | ||
52 | SEND_STRING("git fetch "); | ||
53 | } | ||
54 | return false; | ||
55 | case GIT_GREP: | ||
56 | if (record->event.pressed) { | ||
57 | SEND_STRING("git grep "); | ||
58 | } | ||
59 | return false; | ||
60 | case GIT_LOG: | ||
61 | if (record->event.pressed) { | ||
62 | SEND_STRING("git log --decorate --oneline --graph "); | ||
63 | } | ||
64 | return false; | ||
65 | case GIT_INIT: | ||
66 | if (record->event.pressed) { | ||
67 | SEND_STRING("git init "); | ||
68 | } | ||
69 | return false; | ||
70 | case GIT_MV: | ||
71 | if (record->event.pressed) { | ||
72 | SEND_STRING("git mv "); | ||
73 | } | ||
74 | return false; | ||
75 | case GIT_MERGE: | ||
76 | if (record->event.pressed) { | ||
77 | SEND_STRING("git merge "); | ||
78 | } | ||
79 | return false; | ||
80 | case GIT_PUSH: | ||
81 | if (record->event.pressed) { | ||
82 | SEND_STRING("git push "); | ||
83 | } | ||
84 | return false; | ||
85 | case GIT_PULL: | ||
86 | if (record->event.pressed) { | ||
87 | SEND_STRING("git pull "); | ||
88 | } | ||
89 | return false; | ||
90 | case GIT_REBASE: | ||
91 | if (record->event.pressed) { | ||
92 | SEND_STRING("git rebase "); | ||
93 | } | ||
94 | return false; | ||
95 | case GIT_REMOTE: | ||
96 | if (record->event.pressed) { | ||
97 | SEND_STRING("git remote "); | ||
98 | } | ||
99 | return false; | ||
100 | case GIT_RESET: | ||
101 | if (record->event.pressed) { | ||
102 | SEND_STRING("git reset "); | ||
103 | } | ||
104 | return false; | ||
105 | case GIT_SHOW: | ||
106 | if (record->event.pressed) { | ||
107 | SEND_STRING("git show "); | ||
108 | } | ||
109 | return false; | ||
110 | case GIT_STASH: | ||
111 | if (record->event.pressed) { | ||
112 | SEND_STRING("git stash "); | ||
113 | } | ||
114 | return false; | ||
115 | case GIT_STATUS: | ||
116 | if (record->event.pressed) { | ||
117 | SEND_STRING("git status "); | ||
118 | } | ||
119 | return false; | ||
120 | case GIT_TAG: | ||
121 | if (record->event.pressed) { | ||
122 | SEND_STRING("git tag "); | ||
123 | } | ||
124 | return false; | ||
125 | } | ||
126 | return true; | ||
127 | } | ||