From 7f0a205232ed5c4aec71216b1a1d3e14a8c56c6e Mon Sep 17 00:00:00 2001 From: zjpxshade <33698018+zjpxshade@users.noreply.github.com> Date: Sun, 15 Jul 2018 13:14:47 -0500 Subject: [PATCH] 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 --- keyboards/iris/keymaps/dvp-zjpxshade/config.h | 41 ++++++ keyboards/iris/keymaps/dvp-zjpxshade/keymap.c | 139 ++++++++++++++++++ keyboards/iris/keymaps/dvp-zjpxshade/rules.mk | 6 + util/linux_install.sh | 20 ++- 4 files changed, 203 insertions(+), 3 deletions(-) create mode 100644 keyboards/iris/keymaps/dvp-zjpxshade/config.h create mode 100644 keyboards/iris/keymaps/dvp-zjpxshade/keymap.c create mode 100644 keyboards/iris/keymaps/dvp-zjpxshade/rules.mk 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 @@ +/* +Copyright 2017 Danny Nguyen + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "config_common.h" + +/* Use I2C or Serial, not both */ + +#define USE_SERIAL +// #define USE_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 12 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 + +#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 @@ +#include "iris.h" +#include "action_layer.h" +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +#define _QWERTY 0 +#define _LOWER 1 +#define _RAISE 2 +#define _ADJUST 16 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + ADJUST, +}; + +#define KC_ KC_TRNS +#define _______ KC_TRNS + +#define KC_LOWR LOWER +#define KC_RASE RAISE +#define KC_RST RESET +#define KC_BL_S BL_STEP +#define KC_DBUG DEBUG +#define KC_RTOG RGB_TOG +#define KC_RMOD RGB_MOD +#define KC_RHUI RGB_HUI +#define KC_RHUD RGB_HUD +#define KC_RSAI RGB_SAI +#define KC_RSAD RGB_SAD +#define KC_RVAI RGB_VAI +#define KC_RVAD RGB_VAD + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT_kc( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + TAB , ,COMM,DOT , P , Y , F , G , C , R , L ,DEL , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + LSFT, A , O , E , U , I , D , H , T , N , S ,INS , + //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| + LCTL,QUOT, Q , J , K , X ,HOME, END , B , M , W , V , Z ,RSFT, + //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' + LGUI,LOWR,ENT , SPC ,RASE,LALT + // `----+----+----' `----+----+----' + ), + + [_LOWER] = LAYOUT_kc( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + TILD,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,BSPC, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + RST , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + DEL , ,LEFT,RGHT, UP ,LBRC, RBRC, P4 , P5 , P6 ,PLUS,PIPE, + //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| + BL_S, , , ,DOWN,LCBR,LPRN, RPRN,RCBR, P1 , P2 , P3 ,MINS, , + //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' + , ,DEL , DEL , , P0 + // `----+----+----' `----+----+----' + ), + + [_RAISE] = LAYOUT_kc( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + F12 , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + ,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN, , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + ,MPRV,MNXT,VOLU,PGUP,UNDS, EQL ,HOME, , , ,BSLS, + //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| + MUTE,MSTP,MPLY,VOLD,PGDN,MINS, , ,PLUS,END , , , , , + //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' + , , , , , + // `----+----+----' `----+----+----' + ), + + [_ADJUST] = LAYOUT_kc( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + , , , , , , , , , , , , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + RTOG,RMOD,RHUI,RSAI,RVAI, , , , , , , , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + ,DBUG,RHUD,RSAD,RVAD, , , , , , , , + //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| + BL_S,RST , , , , , , , , , , , , , + //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' + , , , , , + // `----+----+----' `----+----+----' + ) + +}; + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; + } + return true; +} 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 @@ +RGBLIGHT_ENABLE = yes +BACKLIGHT_ENABLE = yes + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif 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 @@ #!/bin/sh - if grep ID /etc/os-release | grep -q rhel; then # RPM based OS 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 cd /tmp/dfu-programmer makepkg -sic rm -rf /tmp/dfu-programmer/ - +elif grep ID /etc/os-release | grep -q gentoo; then + 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." + echo -n "Proceed (y/N)? " + old_stty_cfg=$(stty -g) + stty raw -echo + answer=$( while ! head -c 1 | grep -i '[ny]' ;do true ;done ) + stty $old_stty_cfg + if echo "$answer" | grep -iq "^y" ;then + sudo touch /etc/portage/package.use/qmkfirmware + echo "sys-devel/gcc multilib" | sudo tee --append /etc/portage/package.use/qmkfirmware > /dev/null + 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 + sudo crossdev -s4 --stable --g =4.9.4 --portage --verbose --target avr + echo Done! + else + echo "Quitting..." +fi else echo "Sorry, we don't recognize your OS. Help us by contributing support!" echo - echo " https://docs.qmk.fm/contributing.html" + echo "https://docs.qmk.fm/contributing.html" fi