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
This commit is contained in:
parent
1f5d5e5314
commit
7f0a205232
|
@ -0,0 +1,41 @@
|
|||
/*
|
||||
Copyright 2017 Danny Nguyen <danny@keeb.io>
|
||||
|
||||
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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#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
|
|
@ -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;
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
RGBLIGHT_ENABLE = yes
|
||||
BACKLIGHT_ENABLE = yes
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../../Makefile
|
||||
endif
|
|
@ -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,7 +17,22 @@ 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
|
||||
|
|
Loading…
Reference in New Issue