aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzjpxshade <33698018+zjpxshade@users.noreply.github.com>2018-07-15 13:14:47 -0500
committerJack Humbert <jack.humb@gmail.com>2018-07-15 14:14:47 -0400
commit7f0a205232ed5c4aec71216b1a1d3e14a8c56c6e (patch)
treea63c9cf65d487dea972c835ad59fa7b03db404c0
parent1f5d5e5314841e5379598a7fbeee5d6a91179839 (diff)
downloadqmk_firmware-7f0a205232ed5c4aec71216b1a1d3e14a8c56c6e.tar.gz
qmk_firmware-7f0a205232ed5c4aec71216b1a1d3e14a8c56c6e.zip
Added gentoo to installer (#3272)
* Added gentoo installer * Remove comments * Remove comments * Updating the layout * Revert "Remove comments" This reverts commit e348afa41a470d4b8f1865d92b85acd32ab14074. * Revert "Updating the layout" This reverts commit 181822d195f722f4981825ded7dd85fa268c3c56. * Undo erroneous revert
-rw-r--r--keyboards/iris/keymaps/dvp-zjpxshade/config.h41
-rw-r--r--keyboards/iris/keymaps/dvp-zjpxshade/keymap.c139
-rw-r--r--keyboards/iris/keymaps/dvp-zjpxshade/rules.mk6
-rwxr-xr-xutil/linux_install.sh20
4 files changed, 203 insertions, 3 deletions
diff --git a/keyboards/iris/keymaps/dvp-zjpxshade/config.h b/keyboards/iris/keymaps/dvp-zjpxshade/config.h
new file mode 100644
index 000000000..72e35c472
--- /dev/null
+++ b/keyboards/iris/keymaps/dvp-zjpxshade/config.h
@@ -0,0 +1,41 @@
1/*
2Copyright 2017 Danny Nguyen <danny@keeb.io>
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18#ifndef CONFIG_USER_H
19#define CONFIG_USER_H
20
21#include "config_common.h"
22
23/* Use I2C or Serial, not both */
24
25#define USE_SERIAL
26// #define USE_I2C
27
28/* Select hand configuration */
29
30#define MASTER_LEFT
31// #define MASTER_RIGHT
32// #define EE_HANDS
33
34#undef RGBLED_NUM
35#define RGBLIGHT_ANIMATIONS
36#define RGBLED_NUM 12
37#define RGBLIGHT_HUE_STEP 8
38#define RGBLIGHT_SAT_STEP 8
39#define RGBLIGHT_VAL_STEP 8
40
41#endif
diff --git a/keyboards/iris/keymaps/dvp-zjpxshade/keymap.c b/keyboards/iris/keymaps/dvp-zjpxshade/keymap.c
new file mode 100644
index 000000000..48402e964
--- /dev/null
+++ b/keyboards/iris/keymaps/dvp-zjpxshade/keymap.c
@@ -0,0 +1,139 @@
1#include "iris.h"
2#include "action_layer.h"
3#include "eeconfig.h"
4
5extern keymap_config_t keymap_config;
6
7#define _QWERTY 0
8#define _LOWER 1
9#define _RAISE 2
10#define _ADJUST 16
11
12enum custom_keycodes {
13 QWERTY = SAFE_RANGE,
14 LOWER,
15 RAISE,
16 ADJUST,
17};
18
19#define KC_ KC_TRNS
20#define _______ KC_TRNS
21
22#define KC_LOWR LOWER
23#define KC_RASE RAISE
24#define KC_RST RESET
25#define KC_BL_S BL_STEP
26#define KC_DBUG DEBUG
27#define KC_RTOG RGB_TOG
28#define KC_RMOD RGB_MOD
29#define KC_RHUI RGB_HUI
30#define KC_RHUD RGB_HUD
31#define KC_RSAI RGB_SAI
32#define KC_RSAD RGB_SAD
33#define KC_RVAI RGB_VAI
34#define KC_RVAD RGB_VAD
35
36const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
37
38 [_QWERTY] = LAYOUT_kc(
39 //,----+----+----+----+----+----. ,----+----+----+----+----+----.
40 ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC,
41 //|----+----+----+----+----+----| |----+----+----+----+----+----|
42 TAB , ,COMM,DOT , P , Y , F , G , C , R , L ,DEL ,
43 //|----+----+----+----+----+----| |----+----+----+----+----+----|
44 LSFT, A , O , E , U , I , D , H , T , N , S ,INS ,
45 //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
46 LCTL,QUOT, Q , J , K , X ,HOME, END , B , M , W , V , Z ,RSFT,
47 //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
48 LGUI,LOWR,ENT , SPC ,RASE,LALT
49 // `----+----+----' `----+----+----'
50 ),
51
52 [_LOWER] = LAYOUT_kc(
53 //,----+----+----+----+----+----. ,----+----+----+----+----+----.
54 TILD,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,BSPC,
55 //|----+----+----+----+----+----| |----+----+----+----+----+----|
56 RST , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , ,
57 //|----+----+----+----+----+----| |----+----+----+----+----+----|
58 DEL , ,LEFT,RGHT, UP ,LBRC, RBRC, P4 , P5 , P6 ,PLUS,PIPE,
59 //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
60 BL_S, , , ,DOWN,LCBR,LPRN, RPRN,RCBR, P1 , P2 , P3 ,MINS, ,
61 //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
62 , ,DEL , DEL , , P0
63 // `----+----+----' `----+----+----'
64 ),
65
66 [_RAISE] = LAYOUT_kc(
67 //,----+----+----+----+----+----. ,----+----+----+----+----+----.
68 F12 , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,
69 //|----+----+----+----+----+----| |----+----+----+----+----+----|
70 ,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN, ,
71 //|----+----+----+----+----+----| |----+----+----+----+----+----|
72 ,MPRV,MNXT,VOLU,PGUP,UNDS, EQL ,HOME, , , ,BSLS,
73 //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
74 MUTE,MSTP,MPLY,VOLD,PGDN,MINS, , ,PLUS,END , , , , ,
75 //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
76 , , , , ,
77 // `----+----+----' `----+----+----'
78 ),
79
80 [_ADJUST] = LAYOUT_kc(
81 //,----+----+----+----+----+----. ,----+----+----+----+----+----.
82 , , , , , , , , , , , ,
83 //|----+----+----+----+----+----| |----+----+----+----+----+----|
84 RTOG,RMOD,RHUI,RSAI,RVAI, , , , , , , ,
85 //|----+----+----+----+----+----| |----+----+----+----+----+----|
86 ,DBUG,RHUD,RSAD,RVAD, , , , , , , ,
87 //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
88 BL_S,RST , , , , , , , , , , , , ,
89 //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
90 , , , , ,
91 // `----+----+----' `----+----+----'
92 )
93
94};
95
96void persistent_default_layer_set(uint16_t default_layer) {
97 eeconfig_update_default_layer(default_layer);
98 default_layer_set(default_layer);
99}
100
101bool process_record_user(uint16_t keycode, keyrecord_t *record) {
102 switch (keycode) {
103 case QWERTY:
104 if (record->event.pressed) {
105 persistent_default_layer_set(1UL<<_QWERTY);
106 }
107 return false;
108 break;
109 case LOWER:
110 if (record->event.pressed) {
111 layer_on(_LOWER);
112 update_tri_layer(_LOWER, _RAISE, _ADJUST);
113 } else {
114 layer_off(_LOWER);
115 update_tri_layer(_LOWER, _RAISE, _ADJUST);
116 }
117 return false;
118 break;
119 case RAISE:
120 if (record->event.pressed) {
121 layer_on(_RAISE);
122 update_tri_layer(_LOWER, _RAISE, _ADJUST);
123 } else {
124 layer_off(_RAISE);
125 update_tri_layer(_LOWER, _RAISE, _ADJUST);
126 }
127 return false;
128 break;
129 case ADJUST:
130 if (record->event.pressed) {
131 layer_on(_ADJUST);
132 } else {
133 layer_off(_ADJUST);
134 }
135 return false;
136 break;
137 }
138 return true;
139}
diff --git a/keyboards/iris/keymaps/dvp-zjpxshade/rules.mk b/keyboards/iris/keymaps/dvp-zjpxshade/rules.mk
new file mode 100644
index 000000000..22b6ec476
--- /dev/null
+++ b/keyboards/iris/keymaps/dvp-zjpxshade/rules.mk
@@ -0,0 +1,6 @@
1RGBLIGHT_ENABLE = yes
2BACKLIGHT_ENABLE = yes
3
4ifndef QUANTUM_DIR
5 include ../../../../Makefile
6endif
diff --git a/util/linux_install.sh b/util/linux_install.sh
index e071b8ad3..0703db8f1 100755
--- a/util/linux_install.sh
+++ b/util/linux_install.sh
@@ -1,5 +1,4 @@
1#!/bin/sh 1#!/bin/sh
2
3if grep ID /etc/os-release | grep -q rhel; then 2if grep ID /etc/os-release | grep -q rhel; then
4 # RPM based OS 3 # RPM based OS
5 sudo dnf install gcc unzip wget zip dfu-util dfu-programmer avr-gcc \ 4 sudo dnf install gcc unzip wget zip dfu-util dfu-programmer avr-gcc \
@@ -18,9 +17,24 @@ elif grep ID /etc/os-release | grep -q arch; then
18 cd /tmp/dfu-programmer 17 cd /tmp/dfu-programmer
19 makepkg -sic 18 makepkg -sic
20 rm -rf /tmp/dfu-programmer/ 19 rm -rf /tmp/dfu-programmer/
21 20elif grep ID /etc/os-release | grep -q gentoo; then
21 echo "This script will make a USE change in order to ensure that that QMK works on your system. All changes will be sent to the the file /etc/portage/package.use/qmk_firmware -- please review it, and read Portage's output carefully before installing any packages on your system. You will also need to ensure that your kernel is compiled with support for the keyboard chip that you are using (e.g. enable Arduino for the Pro Micro). Further information can be found on the Gentoo wiki."
22 echo -n "Proceed (y/N)? "
23 old_stty_cfg=$(stty -g)
24 stty raw -echo
25 answer=$( while ! head -c 1 | grep -i '[ny]' ;do true ;done )
26 stty $old_stty_cfg
27 if echo "$answer" | grep -iq "^y" ;then
28 sudo touch /etc/portage/package.use/qmkfirmware
29 echo "sys-devel/gcc multilib" | sudo tee --append /etc/portage/package.use/qmkfirmware > /dev/null
30 sudo emerge -auN sys-devel/gcc app-arch/unzip app-arch/zip net-misc/wget app-mobilephone/dfu-util sys-devel/crossdev dev-embedded/avrdude
31 sudo crossdev -s4 --stable --g =4.9.4 --portage --verbose --target avr
32 echo Done!
33 else
34 echo "Quitting..."
35fi
22else 36else
23 echo "Sorry, we don't recognize your OS. Help us by contributing support!" 37 echo "Sorry, we don't recognize your OS. Help us by contributing support!"
24 echo 38 echo
25 echo " https://docs.qmk.fm/contributing.html" 39 echo "https://docs.qmk.fm/contributing.html"
26fi 40fi