Last active
September 22, 2019 20:57
-
-
Save nathandao/f193a04556e9b30c0141a903617b657b to your computer and use it in GitHub Desktop.
Linux keyboard mapping & configurations for macbook pro
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Config { font = "-misc-fixed-*-*-*-*-20-*-*-*-*-*-*-*" | |
, additionalFonts = [] | |
, borderColor = "#bada55" | |
, border = TopB | |
, bgColor = "#bada55" | |
, fgColor = "black" | |
, alpha = 255 | |
, position = Top | |
, textOffset = -1 | |
, iconOffset = -1 | |
, lowerOnStart = True | |
, pickBroadest = False | |
, persistent = False | |
, hideOnStart = False | |
, iconRoot = "." | |
, allDesktops = True | |
, overrideRedirect = False | |
, commands = [ Run Network "eth0" ["-L","0","-H","32" | |
,"--high","red"] 10 | |
, Run Network "eth1" ["-L","0","-H","32" | |
,"--high","red"] 10 | |
, Run Cpu ["-L","3","-H","50" | |
,"--high","red"] 10 | |
, Run Memory ["-t","Mem: <usedratio>%"] 10 | |
, Run Date "%a %b %_d %Y %H:%M:%S" "date" 10 | |
, Run BatteryP ["BAT0"] [] 600 | |
] | |
, sepChar = "%" | |
, alignSep = "}{" | |
, template = " %cpu% | %memory% | %battery%}\ | |
\{ %date% [nathan] " | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
keycode 66 = | |
keycode 66 = Control_L | |
keycode 133 = | |
keycode 133 = Meta_L | |
keycode 64 = Alt_L | |
clear mod1 | |
clear mod4 | |
remove control = Super_R | |
add control = Control_L | |
add mod1 = Meta_L | |
add mod4 = Alt_L |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// /usr/share/X11/xkb/symbols/pc | |
xkb_symbols "pc105" { | |
key <ESC> { [ Escape ] }; | |
// The extra key on many European keyboards: | |
key <LSGT> { [ less, greater, bar, brokenbar ] }; | |
// The following keys are common to all layouts. | |
key <BKSL> { [ backslash, bar ] }; | |
key <SPCE> { [ space ] }; | |
include "srvr_ctrl(fkey2vt)" | |
include "pc(editing)" | |
include "keypad(x11)" | |
key <BKSP> { [ BackSpace, BackSpace ] }; | |
key <TAB> { [ Tab, ISO_Left_Tab ] }; | |
key <RTRN> { [ Return ] }; | |
key <CAPS> { [ Caps_Lock ] }; | |
key <NMLK> { [ Num_Lock ] }; | |
key <LFSH> { [ Shift_L ] }; | |
key <LCTL> { [ Control_L ] }; | |
key <LWIN> { [ Meta_L ] }; | |
key <RTSH> { [ Shift_R ] }; | |
key <RCTL> { [ Control_R ] }; | |
key <RWIN> { [ Super_R ] }; | |
key <MENU> { [ Menu ] }; | |
// Beginning of modifier mappings. | |
modifier_map Shift { Shift_L, Shift_R }; | |
modifier_map Lock { Caps_Lock }; | |
modifier_map Control{ Control_L, Control_R }; | |
modifier_map Mod2 { Num_Lock }; | |
modifier_map Mod4 { Super_L, Super_R }; | |
// Fake keys for virtual<->real modifiers mapping: | |
key <LVL3> { [ ISO_Level3_Shift ] }; | |
key <MDSW> { [ Mode_switch ] }; | |
modifier_map Mod5 { <LVL3>, <MDSW> }; | |
key <ALT> { [ Super_L ] }; | |
include "altwin(meta_alt)" | |
key <META> { [ NoSymbol, Super_L ] }; | |
modifier_map Mod1 { <SUPR> }; | |
key <SUPR> { [ NoSymbol, Meta_L ] }; | |
modifier_map Mod4 { <META> }; | |
key <HYPR> { [ NoSymbol, Meta_L ] }; | |
modifier_map Mod4 { <META> }; | |
// End of modifier mappings. | |
key <OUTP> { [ XF86Display ] }; | |
key <KITG> { [ XF86KbdLightOnOff ] }; | |
key <KIDN> { [ XF86KbdBrightnessDown ] }; | |
key <KIUP> { [ XF86KbdBrightnessUp ] }; | |
}; | |
hidden partial alphanumeric_keys | |
xkb_symbols "editing" { | |
key <PRSC> { | |
type= "PC_ALT_LEVEL2", | |
symbols[Group1]= [ Print, Sys_Req ] | |
}; | |
key <SCLK> { [ Scroll_Lock ] }; | |
key <PAUS> { | |
type= "PC_CONTROL_LEVEL2", | |
symbols[Group1]= [ Pause, Break ] | |
}; | |
key <INS> { [ Insert ] }; | |
key <HOME> { [ Home ] }; | |
key <PGUP> { [ Prior ] }; | |
key <DELE> { [ Delete ] }; | |
key <END> { [ End ] }; | |
key <PGDN> { [ Next ] }; | |
key <UP> { [ Up ] }; | |
key <LEFT> { [ Left ] }; | |
key <DOWN> { [ Down ] }; | |
key <RGHT> { [ Right ] }; | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import XMonad | |
import XMonad.Hooks.DynamicLog | |
import XMonad.Hooks.ManageDocks | |
import XMonad.Util.Run(spawnPipe) | |
import XMonad.Util.EZConfig(additionalKeys) | |
import System.IO | |
main = do | |
xmproc <- spawnPipe "xmobar" | |
xmonad $ defaultConfig | |
{ manageHook = manageDocks <+> manageHook defaultConfig | |
, layoutHook = avoidStruts $ layoutHook defaultConfig | |
, modMask = mod4Mask | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment