mirror of
https://github.com/cyberboy666/r_e_c_u_r.git
synced 2025-12-05 16:00:06 +01:00
arraged dotfiles into repo
This commit is contained in:
23
dotfiles/.defaultKeymap
Normal file
23
dotfiles/.defaultKeymap
Normal file
@@ -0,0 +1,23 @@
|
||||
keycode 63 = KP_Multiply KP_Multiply KP_Multiply KP_Multiply KP_Multiply KP_Multiply XF86ClearGrab
|
||||
keycode 79 = KP_Home KP_7 KP_Home KP_7
|
||||
keycode 80 = KP_Up KP_8 KP_Up KP_8
|
||||
keycode 81 = KP_Prior KP_9 KP_Prior KP_9
|
||||
keycode 82 = KP_Subtract KP_Subtract KP_Subtract KP_Subtract KP_Subtract KP_Subtract XF86Prev_VMode
|
||||
keycode 83 = KP_Left KP_4 KP_Left KP_4
|
||||
keycode 84 = KP_Begin KP_5 KP_Begin KP_5
|
||||
keycode 85 = KP_Right KP_6 KP_Right KP_6
|
||||
keycode 86 = KP_Add KP_Add KP_Add KP_Add KP_Add KP_Add XF86Next_VMode
|
||||
keycode 87 = KP_End KP_1 KP_End KP_1
|
||||
keycode 88 = KP_Down KP_2 KP_Down KP_2
|
||||
keycode 89 = KP_Next KP_3 KP_Next KP_3
|
||||
keycode 90 = KP_Insert KP_0 KP_Insert KP_0
|
||||
keycode 91 = KP_Delete KP_Decimal KP_Delete KP_Decimal
|
||||
keycode 104 = KP_Enter NoSymbol KP_Enter
|
||||
keycode 106 = KP_Divide KP_Divide KP_Divide KP_Divide KP_Divide KP_Divide XF86Ungrab
|
||||
keycode 125 = KP_Equal NoSymbol KP_Equal
|
||||
keycode 129 = KP_Decimal KP_Decimal KP_Decimal KP_Decimal
|
||||
keycode 77 = Num_Lock NoSymbol Num_Lock
|
||||
keycode 22 = BackSpace BackSpace BackSpace BackSpace
|
||||
|
||||
keycode 118 = Insert NoSymbol Insert
|
||||
|
||||
23
dotfiles/.remap
Normal file
23
dotfiles/.remap
Normal file
@@ -0,0 +1,23 @@
|
||||
keycode 82=a
|
||||
keycode 86=b
|
||||
keycode 22=c
|
||||
!note: this remaps the main backspace on a keyboard
|
||||
keycode 104=d
|
||||
keycode 63=e
|
||||
keycode 81=f
|
||||
keycode 85=g
|
||||
keycode 89=h
|
||||
keycode 91=i
|
||||
keycode 106=j
|
||||
keycode 80=k
|
||||
keycode 84=l
|
||||
keycode 88=m
|
||||
!note: the code will map 000 to n in the code
|
||||
keycode 77=o
|
||||
keycode 79=p
|
||||
keycode 83=q
|
||||
keycode 87=r
|
||||
keycode 90=s
|
||||
|
||||
keycode 118=BackSpace
|
||||
!note: for developing im going to use insert for backspacing
|
||||
@@ -1,21 +1,4 @@
|
||||
|
||||
# Key Mapping
|
||||
key remappings were achieved using the program `xmodmap`, and the most helpful post we found for that was [this stackexchange](https://raspberrypi.stackexchange.com/questions/32085/how-to-remap-caps-lock-to-esc)
|
||||
you can find the current keymappings using `xmodmap -pke` and for the specifically numpad related keymappings use:
|
||||
|
||||
xmodmap -pke | grep KP > defaultKeymap
|
||||
xmodmap -pke | grep Nu >> defaultKeymap
|
||||
|
||||
which prints only the default numpad keys to a file for reference later.
|
||||
keys can be manually remapped using `xmodmap -e "keycode 82=a" for testing.
|
||||
|
||||
In order to have the custom keymap work on startup we have added the line `xmodmap ~/.remap` to the launcher script.
|
||||
|
||||
where the file `.remap` has a list of the keycodes that you want to include.
|
||||
|
||||
|
||||
TODO add the `.remap` file to dotfiles
|
||||
|
||||
# Start r_e_c_u_r on login/boot
|
||||
|
||||
We wanted to set things up to autostart after xdg got going, there are a number of ways of tackling this, mentioned [here](https://www.raspberrypi-spy.co.uk/2014/05/how-to-autostart-apps-in-rasbian-lxde-desktop/).
|
||||
@@ -26,7 +9,20 @@ we ended up using method 2 from that page, which is _user specific_ (ie. if you
|
||||
|
||||
and adding the following line to the bottom of the file:
|
||||
|
||||
@bash /path/to/launch/bash/launchscript.sh
|
||||
|
||||
@bash /home/pi/r_e_c_u_r/dotfiles/launchscript.sh
|
||||
|
||||
# Key Mapping
|
||||
key remappings were achieved using the program `xmodmap`, and the most helpful post we found for that was [this stackexchange](https://raspberrypi.stackexchange.com/questions/32085/how-to-remap-caps-lock-to-esc)
|
||||
you can find the current keymappings using `xmodmap -pke` and for the specifically numpad related keymappings use:
|
||||
|
||||
xmodmap -pke | grep KP > defaultKeymap
|
||||
xmodmap -pke | grep Nu >> defaultKeymap
|
||||
|
||||
which prints only the default numpad keys to a file for reference later.
|
||||
keys can be manually remapped using `xmodmap -e "keycode 82=a" for testing.
|
||||
|
||||
In order to have the custom keymap work on startup we have added the line `xmodmap ~/r_e_c_u_r/dotfiles/.remap` to the launcher script.
|
||||
|
||||
where the file `.remap` has a list of the keycodes that you want to include.
|
||||
|
||||
|
||||
|
||||
8
scripts/launcher.sh → dotfiles/launcher.sh
Normal file → Executable file
8
scripts/launcher.sh → dotfiles/launcher.sh
Normal file → Executable file
@@ -3,7 +3,7 @@
|
||||
# navigate to home, to recur, run python then back
|
||||
|
||||
#export DISPLAY=:0.0
|
||||
cd /
|
||||
cd /home/pi/r_e_c_u_r
|
||||
python3 r_e_c_u_r.py
|
||||
cd /
|
||||
sleep 2
|
||||
xmodmap ~/r_e_c_u_r/dotfiles/.remap
|
||||
python3 ~/r_e_c_u_r/r_e_c_u_r.py
|
||||
|
||||
6
dotfiles/switch_to_display.sh
Normal file
6
dotfiles/switch_to_display.sh
Normal file
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
cd /
|
||||
cd /home/pi/LCD-show
|
||||
./LCD35-show 180
|
||||
cd /
|
||||
6
dotfiles/switch_to_hdmi.sh
Normal file
6
dotfiles/switch_to_hdmi.sh
Normal file
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
cd /
|
||||
cd /home/pi/LCD-show
|
||||
./LCD-hdmi
|
||||
cd /
|
||||
Reference in New Issue
Block a user