From a29a07c0aafc2732871326f570d4ee44af85215e Mon Sep 17 00:00:00 2001 From: yage Date: Wed, 14 Aug 2024 19:07:00 -0600 Subject: [PATCH] initial pikachu configuration --- bin/pikachu/set-battery-max-charge | 19 + bin/xorg-activate-default | 22 +- colorschemes/active/polybar.ini | 12 + config/pikachu/X11/xkeymap | 1932 +++++++++++++++++ config/polybar.ini | 81 +- config/scwrypts/environments/dotwryn/local | 3 + .../environments/dotwryn/local.altaria | 3 + .../environments/dotwryn/local.blaziken | 3 + .../environments/dotwryn/local.butterfree | 3 + .../environments/dotwryn/local.gardevoir | 3 + .../environments/dotwryn/local.pikachu | 14 + .../environments/dotwryn/local.umbreon | 3 + .../environments/remote/local.pikachu | 7 + .../environments/scwrypts/local.pikachu | 51 + .../90-set-default-battery-max-charge.rules | 1 + .../pikachu/udev/rules.d/91-backlight.rules | 1 + .../pikachu/xinit/10-optimus-manager.conf | 40 + .../ssh_config.d/30-1password-ssh-agent.conf | 2 + ...-only-allow-password-on-local-network.conf | 5 + config/tmux.conf | 2 +- config/xcompose.conf | 1 + config/xinitrc.common | 6 + scwrypts/dotwryn/.config/env.template | 1 + .../dotwryn/.config/env.template.descriptions | 5 +- scwrypts/dotwryn/.config/env.yaml | 10 +- scwrypts/dotwryn/desktop/xorg/backlight | 23 +- .../desktop/colorscheme/polybar.module.zsh | 12 + scwrypts/dotwryn/lib/system/config.module.zsh | 54 + scwrypts/dotwryn/lib/system/system.module.zsh | 7 + scwrypts/dotwryn/system/setup | 17 + scwrypts/remote/connect | 9 +- scwrypts/remote/lib/bastion.module.zsh | 2 +- scwrypts/remote/test | 7 +- scwrypts/remote/tmux/manager | 2 +- scwrypts/remote/tmux/tmux.conf | 2 +- 35 files changed, 2319 insertions(+), 46 deletions(-) create mode 100755 bin/pikachu/set-battery-max-charge create mode 100644 config/pikachu/X11/xkeymap create mode 100644 config/scwrypts/environments/dotwryn/local.pikachu create mode 100644 config/scwrypts/environments/remote/local.pikachu create mode 100644 config/scwrypts/environments/scwrypts/local.pikachu create mode 100644 config/system/pikachu/udev/rules.d/90-set-default-battery-max-charge.rules create mode 100644 config/system/pikachu/udev/rules.d/91-backlight.rules create mode 100644 config/system/pikachu/xinit/10-optimus-manager.conf create mode 100644 config/system/ssh/ssh_config.d/30-1password-ssh-agent.conf create mode 100644 config/system/ssh/sshd_config.d/10-only-allow-password-on-local-network.conf create mode 100644 scwrypts/dotwryn/lib/system/config.module.zsh create mode 100644 scwrypts/dotwryn/lib/system/system.module.zsh create mode 100755 scwrypts/dotwryn/system/setup diff --git a/bin/pikachu/set-battery-max-charge b/bin/pikachu/set-battery-max-charge new file mode 100755 index 0000000..2e640ca --- /dev/null +++ b/bin/pikachu/set-battery-max-charge @@ -0,0 +1,19 @@ +#!/bin/bash +[[ $EUID -eq 0 ]] || { + echo "root access required" >&2 + exit 1 +} + + +MAX_CHARGE_THRESHOLD=$1 +[ "$MAX_CHARGE_THRESHOLD" ] \ + || MAX_CHARGE_THRESHOLD=75 + +DEVICE_SETTING_FILE=/sys/class/power_supply/BAT1/charge_control_end_threshold + +[ "$MAX_CHARGE_THRESHOLD" ] && [[ $MAX_CHARGE_THRESHOLD -ge 40 ]] && [[ $MAX_CHARGE_THRESHOLD -le 100 ]] || { + echo -e "Value '$MAX_CHARGE_THRESHOLD' is invalid. If you REALLY want to do this, overwrite the setting yourself\n$DEVICE_SETTING_FILE" >&2 + exit 2 +} + +echo "$MAX_CHARGE_THRESHOLD" > "$DEVICE_SETTING_FILE" diff --git a/bin/xorg-activate-default b/bin/xorg-activate-default index 113e840..0ba4d0f 100755 --- a/bin/xorg-activate-default +++ b/bin/xorg-activate-default @@ -1,6 +1,20 @@ #!/bin/zsh LAYOUT="$DOTWRYN/bin/$(hostnamectl --static)/default" -[ -f $LAYOUT ] && { - until xrandr -q >/dev/null 2>&1; do sleep .1; done - $LAYOUT -} + +until xrandr -q >/dev/null 2>&1; do sleep .1; done + +[ -f "$LAYOUT" ] \ + && XRANDR_LAYOUT_MODE=manual \ + || XRANDR_LAYOUT_MODE=auto \ + ; + +case $XRANDR_LAYOUT_MODE in + manual ) + "$LAYOUT" + ;; + auto ) + xrandr --auto + ;; +esac +unset XRANDR_LAYOUT_MODE +true diff --git a/colorschemes/active/polybar.ini b/colorschemes/active/polybar.ini index 01a8e9e..0356788 100644 --- a/colorschemes/active/polybar.ini +++ b/colorschemes/active/polybar.ini @@ -9,3 +9,15 @@ primary = #6911aa secondary = #11bb98 alert = #c80064 disabled = #424253 + +primary-gradient-0 = #420069 +primary-gradient-1 = #490099 +primary-gradient-2 = #6911aa +primary-gradient-3 = #8811cc +primary-gradient-4 = #9922dd + +secondary-gradient-0 = #006942 +secondary-gradient-1 = #009949 +secondary-gradient-2 = #00aa79 +secondary-gradient-3 = #11bb98 +secondary-gradient-4 = #22ccba diff --git a/config/pikachu/X11/xkeymap b/config/pikachu/X11/xkeymap new file mode 100644 index 0000000..cb799bc --- /dev/null +++ b/config/pikachu/X11/xkeymap @@ -0,0 +1,1932 @@ +xkb_keymap { +xkb_keycodes "evdev+aliases(qwerty)" { + minimum = 8; + maximum = 255; + = 9; + = 10; + = 11; + = 12; + = 13; + = 14; + = 15; + = 16; + = 17; + = 18; + = 19; + = 20; + = 21; + = 22; + = 23; + = 24; + = 25; + = 26; + = 27; + = 28; + = 29; + = 30; + = 31; + = 32; + = 33; + = 34; + = 35; + = 36; + = 37; + = 38; + = 39; + = 40; + = 41; + = 42; + = 43; + = 44; + = 45; + = 46; + = 47; + = 48; + = 49; + = 50; + = 51; + = 52; + = 53; + = 54; + = 55; + = 56; + = 57; + = 58; + = 59; + = 60; + = 61; + = 62; + = 63; + = 64; + = 65; + = 66; + = 67; + = 68; + = 69; + = 70; + = 71; + = 72; + = 73; + = 74; + = 75; + = 76; + = 77; + = 78; + = 79; + = 80; + = 81; + = 82; + = 83; + = 84; + = 85; + = 86; + = 87; + = 88; + = 89; + = 90; + = 91; + = 92; + = 94; + = 95; + = 96; + = 97; + = 98; + = 99; + = 100; + = 101; + = 102; + = 103; + = 104; + = 105; + = 106; + = 107; + = 108; + = 109; + = 110; + = 111; + = 112; + = 113; + = 114; + = 115; + = 116; + = 117; + = 118; + = 119; + = 120; + = 121; + = 122; + = 123; + = 124; + = 125; + = 126; + = 127; + = 128; + = 129; + = 130; + = 131; + = 132; + = 133; + = 134; + = 135; + = 136; + = 137; + = 138; + = 139; + = 140; + = 141; + = 142; + = 143; + = 144; + = 145; + = 146; + = 147; + = 148; + = 149; + = 150; + = 151; + = 152; + = 153; + = 154; + = 155; + = 156; + = 157; + = 158; + = 159; + = 160; + = 161; + = 162; + = 163; + = 164; + = 165; + = 166; + = 167; + = 168; + = 169; + = 170; + = 171; + = 172; + = 173; + = 174; + = 175; + = 176; + = 177; + = 178; + = 179; + = 180; + = 181; + = 182; + = 183; + = 184; + = 185; + = 186; + = 187; + = 188; + = 189; + = 190; + = 191; + = 192; + = 193; + = 194; + = 195; + = 196; + = 197; + = 198; + = 199; + = 200; + = 201; + = 202; + = 203; + = 204; + = 205; + = 206; + = 207; + = 208; + = 209; + = 210; + = 211; + = 212; + = 213; + = 214; + = 215; + = 216; + = 217; + = 218; + = 219; + = 220; + = 221; + = 222; + = 223; + = 224; + = 225; + = 226; + = 227; + = 228; + = 229; + = 230; + = 231; + = 232; + = 233; + = 234; + = 235; + = 236; + = 237; + = 238; + = 239; + = 240; + = 241; + = 242; + = 243; + = 244; + = 245; + = 246; + = 247; + = 248; + = 249; + = 250; + = 251; + = 252; + = 253; + = 254; + = 255; + indicator 1 = "Caps Lock"; + indicator 2 = "Num Lock"; + indicator 3 = "Scroll Lock"; + indicator 4 = "Compose"; + indicator 5 = "Kana"; + indicator 6 = "Sleep"; + indicator 7 = "Suspend"; + indicator 8 = "Mute"; + indicator 9 = "Misc"; + indicator 10 = "Mail"; + indicator 11 = "Charging"; + virtual indicator 12 = "Shift Lock"; + virtual indicator 13 = "Group 2"; + virtual indicator 14 = "Mouse Keys"; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; + alias = ; +}; + +xkb_types "complete" { + + virtual_modifiers NumLock,Alt,LevelThree,LevelFive,Meta,Super,Hyper,ScrollLock; + + type "ONE_LEVEL" { + modifiers= none; + level_name[Level1]= "Any"; + }; + type "TWO_LEVEL" { + modifiers= Shift; + map[Shift]= Level2; + level_name[Level1]= "Base"; + level_name[Level2]= "Shift"; + }; + type "ALPHABETIC" { + modifiers= Shift+Lock; + map[Shift]= Level2; + map[Lock]= Level2; + level_name[Level1]= "Base"; + level_name[Level2]= "Caps"; + }; + type "KEYPAD" { + modifiers= Shift+NumLock; + map[NumLock]= Level2; + level_name[Level1]= "Base"; + level_name[Level2]= "Number"; + }; + type "PC_ALT_LEVEL2" { + modifiers= Alt; + map[Alt]= Level2; + level_name[Level1]= "Base"; + level_name[Level2]= "Alt"; + }; + type "PC_SUPER_LEVEL2" { + modifiers= Mod4; + map[Mod4]= Level2; + level_name[Level1]= "Base"; + level_name[Level2]= "Super"; + }; + type "PC_CONTROL_LEVEL2" { + modifiers= Control; + map[Control]= Level2; + level_name[Level1]= "Base"; + level_name[Level2]= "Control"; + }; + type "CTRL+ALT" { + modifiers= Shift+Control+Alt+LevelThree; + map[Shift]= Level2; + preserve[Shift]= Shift; + map[LevelThree]= Level3; + map[Shift+LevelThree]= Level4; + preserve[Shift+LevelThree]= Shift; + map[Control+Alt]= Level5; + level_name[Level1]= "Base"; + level_name[Level2]= "Shift"; + level_name[Level3]= "AltGr"; + level_name[Level4]= "Shift AltGr"; + level_name[Level5]= "Ctrl+Alt"; + }; + type "THREE_LEVEL" { + modifiers= Shift+LevelThree; + map[Shift]= Level2; + map[LevelThree]= Level3; + map[Shift+LevelThree]= Level3; + level_name[Level1]= "Base"; + level_name[Level2]= "Shift"; + level_name[Level3]= "Level3"; + }; + type "FOUR_LEVEL" { + modifiers= Shift+LevelThree; + map[Shift]= Level2; + map[LevelThree]= Level3; + map[Shift+LevelThree]= Level4; + level_name[Level1]= "Base"; + level_name[Level2]= "Shift"; + level_name[Level3]= "AltGr"; + level_name[Level4]= "Shift AltGr"; + }; + type "FOUR_LEVEL_ALPHABETIC" { + modifiers= Shift+Lock+LevelThree; + map[Shift]= Level2; + map[Lock]= Level2; + map[LevelThree]= Level3; + map[Shift+LevelThree]= Level4; + map[Lock+LevelThree]= Level4; + map[Shift+Lock+LevelThree]= Level3; + level_name[Level1]= "Base"; + level_name[Level2]= "Shift"; + level_name[Level3]= "AltGr"; + level_name[Level4]= "Shift AltGr"; + }; + type "FOUR_LEVEL_SEMIALPHABETIC" { + modifiers= Shift+Lock+LevelThree; + map[Shift]= Level2; + map[Lock]= Level2; + map[LevelThree]= Level3; + map[Shift+LevelThree]= Level4; + map[Lock+LevelThree]= Level3; + preserve[Lock+LevelThree]= Lock; + map[Shift+Lock+LevelThree]= Level4; + preserve[Shift+Lock+LevelThree]= Lock; + level_name[Level1]= "Base"; + level_name[Level2]= "Shift"; + level_name[Level3]= "AltGr"; + level_name[Level4]= "Shift AltGr"; + }; + type "FOUR_LEVEL_KEYPAD" { + modifiers= Shift+NumLock+LevelThree; + map[Shift]= Level2; + map[NumLock]= Level2; + map[LevelThree]= Level3; + map[Shift+LevelThree]= Level4; + map[NumLock+LevelThree]= Level4; + map[Shift+NumLock+LevelThree]= Level3; + level_name[Level1]= "Base"; + level_name[Level2]= "Shift/Numlock"; + level_name[Level3]= "AltGr"; + level_name[Level4]= "Shift/Numlock AltGr"; + }; + type "FOUR_LEVEL_MIXED_KEYPAD" { + modifiers= Shift+NumLock+LevelThree; + map[Shift]= Level2; + map[NumLock]= Level2; + map[LevelThree]= Level3; + map[Shift+LevelThree]= Level4; + map[NumLock+LevelThree]= Level3; + map[Shift+NumLock+LevelThree]= Level4; + level_name[Level1]= "Base"; + level_name[Level2]= "Number"; + level_name[Level3]= "AltGr"; + level_name[Level4]= "Shift AltGr"; + }; + type "FOUR_LEVEL_X" { + modifiers= Shift+Control+Alt+LevelThree; + map[Shift]= Level1; + map[LevelThree]= Level2; + map[Shift+LevelThree]= Level3; + map[Control+Alt]= Level4; + level_name[Level1]= "Base"; + level_name[Level2]= "AltGr"; + level_name[Level3]= "Shift AltGr"; + level_name[Level4]= "Ctrl+Alt"; + }; + type "SEPARATE_CAPS_AND_SHIFT_ALPHABETIC" { + modifiers= Shift+Lock+LevelThree; + map[Shift]= Level2; + map[Lock]= Level4; + preserve[Lock]= Lock; + map[LevelThree]= Level3; + map[Shift+LevelThree]= Level4; + map[Lock+LevelThree]= Level3; + preserve[Lock+LevelThree]= Lock; + map[Shift+Lock+LevelThree]= Level3; + level_name[Level1]= "Base"; + level_name[Level2]= "Shift"; + level_name[Level3]= "AltGr"; + level_name[Level4]= "Caps / Shift AltGr"; + }; + type "FOUR_LEVEL_PLUS_LOCK" { + modifiers= Shift+Lock+LevelThree; + map[Shift]= Level2; + map[LevelThree]= Level3; + map[Shift+LevelThree]= Level4; + map[Lock]= Level5; + map[Shift+Lock]= Level2; + map[Lock+LevelThree]= Level3; + map[Shift+Lock+LevelThree]= Level4; + level_name[Level1]= "Base"; + level_name[Level2]= "Shift"; + level_name[Level3]= "AltGr"; + level_name[Level4]= "Shift AltGr"; + level_name[Level5]= "Lock"; + }; + type "EIGHT_LEVEL" { + modifiers= Shift+LevelThree+LevelFive; + map[Shift]= Level2; + map[LevelThree]= Level3; + map[Shift+LevelThree]= Level4; + map[LevelFive]= Level5; + map[Shift+LevelFive]= Level6; + map[LevelThree+LevelFive]= Level7; + map[Shift+LevelThree+LevelFive]= Level8; + level_name[Level1]= "Base"; + level_name[Level2]= "Shift"; + level_name[Level3]= "AltGr"; + level_name[Level4]= "Shift AltGr"; + level_name[Level5]= "X"; + level_name[Level6]= "X Shift"; + level_name[Level7]= "X AltGr"; + level_name[Level8]= "X Shift AltGr"; + }; + type "EIGHT_LEVEL_ALPHABETIC" { + modifiers= Shift+Lock+LevelThree+LevelFive; + map[Shift]= Level2; + map[Lock]= Level2; + map[LevelThree]= Level3; + map[Shift+LevelThree]= Level4; + map[Lock+LevelThree]= Level4; + map[Shift+Lock+LevelThree]= Level3; + map[LevelFive]= Level5; + map[Shift+LevelFive]= Level6; + map[Lock+LevelFive]= Level6; + map[Shift+Lock+LevelFive]= Level5; + map[LevelThree+LevelFive]= Level7; + map[Shift+LevelThree+LevelFive]= Level8; + map[Lock+LevelThree+LevelFive]= Level8; + map[Shift+Lock+LevelThree+LevelFive]= Level7; + level_name[Level1]= "Base"; + level_name[Level2]= "Shift"; + level_name[Level3]= "AltGr"; + level_name[Level4]= "Shift AltGr"; + level_name[Level5]= "X"; + level_name[Level6]= "X Shift"; + level_name[Level7]= "X AltGr"; + level_name[Level8]= "X Shift AltGr"; + }; + type "EIGHT_LEVEL_SEMIALPHABETIC" { + modifiers= Shift+Lock+LevelThree+LevelFive; + map[Shift]= Level2; + map[Lock]= Level2; + map[LevelThree]= Level3; + map[Shift+LevelThree]= Level4; + map[Lock+LevelThree]= Level3; + preserve[Lock+LevelThree]= Lock; + map[Shift+Lock+LevelThree]= Level4; + preserve[Shift+Lock+LevelThree]= Lock; + map[LevelFive]= Level5; + map[Shift+LevelFive]= Level6; + map[Lock+LevelFive]= Level6; + map[Shift+Lock+LevelFive]= Level5; + map[LevelThree+LevelFive]= Level7; + map[Shift+LevelThree+LevelFive]= Level8; + map[Lock+LevelThree+LevelFive]= Level7; + preserve[Lock+LevelThree+LevelFive]= Lock; + map[Shift+Lock+LevelThree+LevelFive]= Level8; + preserve[Shift+Lock+LevelThree+LevelFive]= Lock; + level_name[Level1]= "Base"; + level_name[Level2]= "Shift"; + level_name[Level3]= "AltGr"; + level_name[Level4]= "Shift AltGr"; + level_name[Level5]= "X"; + level_name[Level6]= "X Shift"; + level_name[Level7]= "X AltGr"; + level_name[Level8]= "X Shift AltGr"; + }; + type "EIGHT_LEVEL_WITH_LEVEL5_LOCK" { + modifiers= Shift+NumLock+LevelThree+LevelFive; + map[Shift]= Level2; + map[LevelThree]= Level3; + map[Shift+LevelThree]= Level4; + map[LevelFive]= Level5; + map[Shift+LevelFive]= Level6; + preserve[Shift+LevelFive]= Shift; + map[LevelThree+LevelFive]= Level7; + map[Shift+LevelThree+LevelFive]= Level8; + map[NumLock]= Level5; + map[Shift+NumLock]= Level6; + preserve[Shift+NumLock]= Shift; + map[NumLock+LevelThree]= Level7; + map[Shift+NumLock+LevelThree]= Level8; + map[Shift+NumLock+LevelFive]= Level2; + map[NumLock+LevelThree+LevelFive]= Level3; + map[Shift+NumLock+LevelThree+LevelFive]= Level4; + level_name[Level1]= "Base"; + level_name[Level2]= "Shift"; + level_name[Level3]= "AltGr"; + level_name[Level4]= "Shift AltGr"; + level_name[Level5]= "X"; + level_name[Level6]= "X Shift"; + level_name[Level7]= "X AltGr"; + level_name[Level8]= "X Shift AltGr"; + }; + type "EIGHT_LEVEL_ALPHABETIC_WITH_LEVEL5_LOCK" { + modifiers= Shift+Lock+NumLock+LevelThree+LevelFive; + map[Shift]= Level2; + map[LevelThree]= Level3; + map[Shift+LevelThree]= Level4; + map[LevelFive]= Level5; + map[Shift+LevelFive]= Level6; + preserve[Shift+LevelFive]= Shift; + map[LevelThree+LevelFive]= Level7; + map[Shift+LevelThree+LevelFive]= Level8; + map[NumLock]= Level5; + map[Shift+NumLock]= Level6; + preserve[Shift+NumLock]= Shift; + map[NumLock+LevelThree]= Level7; + map[Shift+NumLock+LevelThree]= Level8; + map[Shift+NumLock+LevelFive]= Level2; + map[NumLock+LevelThree+LevelFive]= Level3; + map[Shift+NumLock+LevelThree+LevelFive]= Level4; + map[Lock]= Level2; + map[Lock+LevelThree]= Level3; + map[Shift+Lock+LevelThree]= Level4; + map[Lock+LevelFive]= Level5; + map[Shift+Lock+LevelFive]= Level6; + map[Lock+LevelThree+LevelFive]= Level7; + map[Shift+Lock+LevelThree+LevelFive]= Level8; + map[Lock+NumLock]= Level5; + map[Shift+Lock+NumLock]= Level6; + map[Lock+NumLock+LevelThree]= Level7; + map[Shift+Lock+NumLock+LevelThree]= Level8; + map[Lock+NumLock+LevelFive]= Level2; + map[Lock+NumLock+LevelThree+LevelFive]= Level3; + map[Shift+Lock+NumLock+LevelThree+LevelFive]= Level4; + level_name[Level1]= "Base"; + level_name[Level2]= "Shift"; + level_name[Level3]= "AltGr"; + level_name[Level4]= "Shift AltGr"; + level_name[Level5]= "X"; + level_name[Level6]= "X Shift"; + level_name[Level7]= "X AltGr"; + level_name[Level8]= "X Shift AltGr"; + }; + type "EIGHT_LEVEL_BY_CTRL" { + modifiers= Shift+Lock+Control+LevelThree; + map[Shift]= Level2; + map[Lock]= Level2; + map[LevelThree]= Level3; + map[Shift+LevelThree]= Level4; + map[Lock+LevelThree]= Level4; + map[Shift+Lock+LevelThree]= Level3; + map[Control]= Level5; + map[Shift+Control]= Level6; + map[Lock+Control]= Level6; + map[Shift+Lock+Control]= Level5; + map[Control+LevelThree]= Level7; + map[Shift+Control+LevelThree]= Level8; + map[Lock+Control+LevelThree]= Level8; + map[Shift+Lock+Control+LevelThree]= Level7; + level_name[Level1]= "Base"; + level_name[Level2]= "Shift"; + level_name[Level3]= "Level3"; + level_name[Level4]= "Shift Level3"; + level_name[Level5]= "Ctrl"; + level_name[Level6]= "Shift Ctrl"; + level_name[Level7]= "Level3 Ctrl"; + level_name[Level8]= "Shift Level3 Ctrl"; + }; + type "SHIFT+ALT" { + modifiers= Shift+Alt; + map[Shift+Alt]= Level2; + level_name[Level1]= "Base"; + level_name[Level2]= "Shift+Alt"; + }; + type "CUSTOM_CAPSLOCK" { + modifiers=Shift+Lock; + map[Shift] = Level2; + map[Lock] = Level3; + map[Shift+Lock] = Level3; + level_name[Level1] = "Base"; + level_name[Level2] = "Shift"; + level_name[Level3] = "Lock"; + }; +}; + +xkb_compatibility "complete" { + + virtual_modifiers NumLock,Alt,LevelThree,LevelFive,Meta,Super,Hyper,ScrollLock; + + interpret.useModMapMods= AnyLevel; + interpret.repeat= False; + interpret.locking= False; + interpret ISO_Level2_Latch+Exactly(Shift) { + useModMapMods=level1; + action= LatchMods(modifiers=Shift,clearLocks,latchToLock); + }; + interpret Shift_Lock+AnyOf(Shift+Lock) { + action= LockMods(modifiers=Shift); + }; + interpret Num_Lock+AnyOf(all) { + virtualModifier= NumLock; + action= LockMods(modifiers=NumLock); + }; + interpret ISO_Level3_Shift+AnyOf(all) { + virtualModifier= LevelThree; + useModMapMods=level1; + action= SetMods(modifiers=LevelThree,clearLocks); + }; + interpret ISO_Level3_Latch+AnyOf(all) { + virtualModifier= LevelThree; + useModMapMods=level1; + action= LatchMods(modifiers=LevelThree,clearLocks,latchToLock); + }; + interpret ISO_Level3_Lock+AnyOf(all) { + virtualModifier= LevelThree; + useModMapMods=level1; + action= LockMods(modifiers=LevelThree); + }; + interpret Alt_L+AnyOf(all) { + virtualModifier= Alt; + action= SetMods(modifiers=modMapMods,clearLocks); + }; + interpret Alt_R+AnyOf(all) { + virtualModifier= Alt; + action= SetMods(modifiers=modMapMods,clearLocks); + }; + interpret Meta_L+AnyOf(all) { + virtualModifier= Meta; + action= SetMods(modifiers=modMapMods,clearLocks); + }; + interpret Meta_R+AnyOf(all) { + virtualModifier= Meta; + action= SetMods(modifiers=modMapMods,clearLocks); + }; + interpret Super_L+AnyOf(all) { + virtualModifier= Super; + action= SetMods(modifiers=modMapMods,clearLocks); + }; + interpret Super_R+AnyOf(all) { + virtualModifier= Super; + action= SetMods(modifiers=modMapMods,clearLocks); + }; + interpret Hyper_L+AnyOf(all) { + virtualModifier= Hyper; + action= SetMods(modifiers=modMapMods,clearLocks); + }; + interpret Hyper_R+AnyOf(all) { + virtualModifier= Hyper; + action= SetMods(modifiers=modMapMods,clearLocks); + }; + interpret Scroll_Lock+AnyOf(all) { + virtualModifier= ScrollLock; + action= LockMods(modifiers=modMapMods); + }; + interpret ISO_Level5_Shift+AnyOf(all) { + virtualModifier= LevelFive; + useModMapMods=level1; + action= SetMods(modifiers=LevelFive,clearLocks); + }; + interpret ISO_Level5_Latch+AnyOf(all) { + virtualModifier= LevelFive; + useModMapMods=level1; + action= LatchMods(modifiers=LevelFive,clearLocks,latchToLock); + }; + interpret ISO_Level5_Lock+AnyOf(all) { + virtualModifier= LevelFive; + useModMapMods=level1; + action= LockMods(modifiers=LevelFive); + }; + interpret Mode_switch+AnyOfOrNone(all) { + action= SetGroup(group=+1); + }; + interpret ISO_Level3_Shift+AnyOfOrNone(all) { + action= SetMods(modifiers=LevelThree,clearLocks); + }; + interpret ISO_Level3_Latch+AnyOfOrNone(all) { + action= LatchMods(modifiers=LevelThree,clearLocks,latchToLock); + }; + interpret ISO_Level3_Lock+AnyOfOrNone(all) { + action= LockMods(modifiers=LevelThree); + }; + interpret ISO_Group_Latch+AnyOfOrNone(all) { + action= LatchGroup(group=2); + }; + interpret ISO_Next_Group+AnyOfOrNone(all) { + action= LockGroup(group=+1); + }; + interpret ISO_Prev_Group+AnyOfOrNone(all) { + action= LockGroup(group=-1); + }; + interpret ISO_First_Group+AnyOfOrNone(all) { + action= LockGroup(group=1); + }; + interpret ISO_Last_Group+AnyOfOrNone(all) { + action= LockGroup(group=2); + }; + interpret KP_1+AnyOfOrNone(all) { + repeat= True; + action= MovePtr(x=-1,y=+1); + }; + interpret KP_End+AnyOfOrNone(all) { + repeat= True; + action= MovePtr(x=-1,y=+1); + }; + interpret KP_2+AnyOfOrNone(all) { + repeat= True; + action= MovePtr(x=+0,y=+1); + }; + interpret KP_Down+AnyOfOrNone(all) { + repeat= True; + action= MovePtr(x=+0,y=+1); + }; + interpret KP_3+AnyOfOrNone(all) { + repeat= True; + action= MovePtr(x=+1,y=+1); + }; + interpret KP_Next+AnyOfOrNone(all) { + repeat= True; + action= MovePtr(x=+1,y=+1); + }; + interpret KP_4+AnyOfOrNone(all) { + repeat= True; + action= MovePtr(x=-1,y=+0); + }; + interpret KP_Left+AnyOfOrNone(all) { + repeat= True; + action= MovePtr(x=-1,y=+0); + }; + interpret KP_6+AnyOfOrNone(all) { + repeat= True; + action= MovePtr(x=+1,y=+0); + }; + interpret KP_Right+AnyOfOrNone(all) { + repeat= True; + action= MovePtr(x=+1,y=+0); + }; + interpret KP_7+AnyOfOrNone(all) { + repeat= True; + action= MovePtr(x=-1,y=-1); + }; + interpret KP_Home+AnyOfOrNone(all) { + repeat= True; + action= MovePtr(x=-1,y=-1); + }; + interpret KP_8+AnyOfOrNone(all) { + repeat= True; + action= MovePtr(x=+0,y=-1); + }; + interpret KP_Up+AnyOfOrNone(all) { + repeat= True; + action= MovePtr(x=+0,y=-1); + }; + interpret KP_9+AnyOfOrNone(all) { + repeat= True; + action= MovePtr(x=+1,y=-1); + }; + interpret KP_Prior+AnyOfOrNone(all) { + repeat= True; + action= MovePtr(x=+1,y=-1); + }; + interpret KP_5+AnyOfOrNone(all) { + repeat= True; + action= PtrBtn(button=default); + }; + interpret KP_Begin+AnyOfOrNone(all) { + repeat= True; + action= PtrBtn(button=default); + }; + interpret KP_F2+AnyOfOrNone(all) { + repeat= True; + action= SetPtrDflt(affect=button,button=1); + }; + interpret KP_Divide+AnyOfOrNone(all) { + repeat= True; + action= SetPtrDflt(affect=button,button=1); + }; + interpret KP_F3+AnyOfOrNone(all) { + repeat= True; + action= SetPtrDflt(affect=button,button=2); + }; + interpret KP_Multiply+AnyOfOrNone(all) { + repeat= True; + action= SetPtrDflt(affect=button,button=2); + }; + interpret KP_F4+AnyOfOrNone(all) { + repeat= True; + action= SetPtrDflt(affect=button,button=3); + }; + interpret KP_Subtract+AnyOfOrNone(all) { + repeat= True; + action= SetPtrDflt(affect=button,button=3); + }; + interpret KP_Separator+AnyOfOrNone(all) { + repeat= True; + action= PtrBtn(button=default,count=2); + }; + interpret KP_Add+AnyOfOrNone(all) { + repeat= True; + action= PtrBtn(button=default,count=2); + }; + interpret KP_0+AnyOfOrNone(all) { + repeat= True; + action= LockPtrBtn(button=default,affect=lock); + }; + interpret KP_Insert+AnyOfOrNone(all) { + repeat= True; + action= LockPtrBtn(button=default,affect=lock); + }; + interpret KP_Decimal+AnyOfOrNone(all) { + repeat= True; + action= LockPtrBtn(button=default,affect=unlock); + }; + interpret KP_Delete+AnyOfOrNone(all) { + repeat= True; + action= LockPtrBtn(button=default,affect=unlock); + }; + interpret F25+AnyOfOrNone(all) { + repeat= True; + action= SetPtrDflt(affect=button,button=1); + }; + interpret F26+AnyOfOrNone(all) { + repeat= True; + action= SetPtrDflt(affect=button,button=2); + }; + interpret F27+AnyOfOrNone(all) { + repeat= True; + action= MovePtr(x=-1,y=-1); + }; + interpret F29+AnyOfOrNone(all) { + repeat= True; + action= MovePtr(x=+1,y=-1); + }; + interpret F31+AnyOfOrNone(all) { + repeat= True; + action= PtrBtn(button=default); + }; + interpret F33+AnyOfOrNone(all) { + repeat= True; + action= MovePtr(x=-1,y=+1); + }; + interpret F35+AnyOfOrNone(all) { + repeat= True; + action= MovePtr(x=+1,y=+1); + }; + interpret Pointer_Button_Dflt+AnyOfOrNone(all) { + action= PtrBtn(button=default); + }; + interpret Pointer_Button1+AnyOfOrNone(all) { + action= PtrBtn(button=1); + }; + interpret Pointer_Button2+AnyOfOrNone(all) { + action= PtrBtn(button=2); + }; + interpret Pointer_Button3+AnyOfOrNone(all) { + action= PtrBtn(button=3); + }; + interpret Pointer_DblClick_Dflt+AnyOfOrNone(all) { + action= PtrBtn(button=default,count=2); + }; + interpret Pointer_DblClick1+AnyOfOrNone(all) { + action= PtrBtn(button=1,count=2); + }; + interpret Pointer_DblClick2+AnyOfOrNone(all) { + action= PtrBtn(button=2,count=2); + }; + interpret Pointer_DblClick3+AnyOfOrNone(all) { + action= PtrBtn(button=3,count=2); + }; + interpret Pointer_Drag_Dflt+AnyOfOrNone(all) { + action= LockPtrBtn(button=default,affect=both); + }; + interpret Pointer_Drag1+AnyOfOrNone(all) { + action= LockPtrBtn(button=1,affect=both); + }; + interpret Pointer_Drag2+AnyOfOrNone(all) { + action= LockPtrBtn(button=2,affect=both); + }; + interpret Pointer_Drag3+AnyOfOrNone(all) { + action= LockPtrBtn(button=3,affect=both); + }; + interpret Pointer_EnableKeys+AnyOfOrNone(all) { + action= LockControls(controls=MouseKeys); + }; + interpret Pointer_Accelerate+AnyOfOrNone(all) { + action= LockControls(controls=MouseKeysAccel); + }; + interpret Pointer_DfltBtnNext+AnyOfOrNone(all) { + action= SetPtrDflt(affect=button,button=+1); + }; + interpret Pointer_DfltBtnPrev+AnyOfOrNone(all) { + action= SetPtrDflt(affect=button,button=-1); + }; + interpret AccessX_Enable+AnyOfOrNone(all) { + action= LockControls(controls=AccessXKeys); + }; + interpret AccessX_Feedback_Enable+AnyOfOrNone(all) { + action= LockControls(controls=AccessXFeedback); + }; + interpret RepeatKeys_Enable+AnyOfOrNone(all) { + action= LockControls(controls=RepeatKeys); + }; + interpret SlowKeys_Enable+AnyOfOrNone(all) { + action= LockControls(controls=SlowKeys); + }; + interpret BounceKeys_Enable+AnyOfOrNone(all) { + action= LockControls(controls=BounceKeys); + }; + interpret StickyKeys_Enable+AnyOfOrNone(all) { + action= LockControls(controls=StickyKeys); + }; + interpret MouseKeys_Enable+AnyOfOrNone(all) { + action= LockControls(controls=MouseKeys); + }; + interpret MouseKeys_Accel_Enable+AnyOfOrNone(all) { + action= LockControls(controls=MouseKeysAccel); + }; + interpret Overlay1_Enable+AnyOfOrNone(all) { + action= LockControls(controls=Overlay1); + }; + interpret Overlay2_Enable+AnyOfOrNone(all) { + action= LockControls(controls=Overlay2); + }; + interpret AudibleBell_Enable+AnyOfOrNone(all) { + action= LockControls(controls=AudibleBell); + }; + interpret Terminate_Server+AnyOfOrNone(all) { + action= Terminate(); + }; + interpret Alt_L+AnyOfOrNone(all) { + action= SetMods(modifiers=Alt,clearLocks); + }; + interpret Alt_R+AnyOfOrNone(all) { + action= SetMods(modifiers=Alt,clearLocks); + }; + interpret Meta_L+AnyOfOrNone(all) { + action= SetMods(modifiers=Meta,clearLocks); + }; + interpret Meta_R+AnyOfOrNone(all) { + action= SetMods(modifiers=Meta,clearLocks); + }; + interpret Super_L+AnyOfOrNone(all) { + action= SetMods(modifiers=Super,clearLocks); + }; + interpret Super_R+AnyOfOrNone(all) { + action= SetMods(modifiers=Super,clearLocks); + }; + interpret Hyper_L+AnyOfOrNone(all) { + action= SetMods(modifiers=Hyper,clearLocks); + }; + interpret Hyper_R+AnyOfOrNone(all) { + action= SetMods(modifiers=Hyper,clearLocks); + }; + interpret Shift_L+AnyOfOrNone(all) { + action= SetMods(modifiers=Shift,clearLocks); + }; + interpret Shift_R+AnyOfOrNone(all) { + action= SetMods(modifiers=Shift,clearLocks); + }; + interpret XF86Switch_VT_1+AnyOfOrNone(all) { + repeat= True; + action= SwitchScreen(screen=1,!same); + }; + interpret XF86Switch_VT_2+AnyOfOrNone(all) { + repeat= True; + action= SwitchScreen(screen=2,!same); + }; + interpret XF86Switch_VT_3+AnyOfOrNone(all) { + repeat= True; + action= SwitchScreen(screen=3,!same); + }; + interpret XF86Switch_VT_4+AnyOfOrNone(all) { + repeat= True; + action= SwitchScreen(screen=4,!same); + }; + interpret XF86Switch_VT_5+AnyOfOrNone(all) { + repeat= True; + action= SwitchScreen(screen=5,!same); + }; + interpret XF86Switch_VT_6+AnyOfOrNone(all) { + repeat= True; + action= SwitchScreen(screen=6,!same); + }; + interpret XF86Switch_VT_7+AnyOfOrNone(all) { + repeat= True; + action= SwitchScreen(screen=7,!same); + }; + interpret XF86Switch_VT_8+AnyOfOrNone(all) { + repeat= True; + action= SwitchScreen(screen=8,!same); + }; + interpret XF86Switch_VT_9+AnyOfOrNone(all) { + repeat= True; + action= SwitchScreen(screen=9,!same); + }; + interpret XF86Switch_VT_10+AnyOfOrNone(all) { + repeat= True; + action= SwitchScreen(screen=10,!same); + }; + interpret XF86Switch_VT_11+AnyOfOrNone(all) { + repeat= True; + action= SwitchScreen(screen=11,!same); + }; + interpret XF86Switch_VT_12+AnyOfOrNone(all) { + repeat= True; + action= SwitchScreen(screen=12,!same); + }; + interpret XF86LogGrabInfo+AnyOfOrNone(all) { + repeat= True; + action= Private(type=0x86,data[0]=0x50,data[1]=0x72,data[2]=0x47,data[3]=0x72,data[4]=0x62,data[5]=0x73,data[6]=0x00); + }; + interpret XF86LogWindowTree+AnyOfOrNone(all) { + repeat= True; + action= Private(type=0x86,data[0]=0x50,data[1]=0x72,data[2]=0x57,data[3]=0x69,data[4]=0x6e,data[5]=0x73,data[6]=0x00); + }; + interpret XF86Next_VMode+AnyOfOrNone(all) { + repeat= True; + action= Private(type=0x86,data[0]=0x2b,data[1]=0x56,data[2]=0x4d,data[3]=0x6f,data[4]=0x64,data[5]=0x65,data[6]=0x00); + }; + interpret XF86Prev_VMode+AnyOfOrNone(all) { + repeat= True; + action= Private(type=0x86,data[0]=0x2d,data[1]=0x56,data[2]=0x4d,data[3]=0x6f,data[4]=0x64,data[5]=0x65,data[6]=0x00); + }; + interpret ISO_Level5_Shift+AnyOfOrNone(all) { + action= SetMods(modifiers=LevelFive,clearLocks); + }; + interpret ISO_Level5_Latch+AnyOfOrNone(all) { + action= LatchMods(modifiers=LevelFive,clearLocks,latchToLock); + }; + interpret ISO_Level5_Lock+AnyOfOrNone(all) { + action= LockMods(modifiers=LevelFive); + }; + interpret Caps_Lock+AnyOfOrNone(all) { + action= SetMods(modifiers=Lock); + }; + interpret Any+Exactly(Lock) { + action= LockMods(modifiers=Lock); + }; + interpret Any+AnyOf(all) { + action= SetMods(modifiers=modMapMods,clearLocks); + }; + group 2 = Mod5; + group 3 = Mod5; + group 4 = Mod5; + indicator "Caps Lock" { + !allowExplicit; + whichModState= locked; + modifiers= Lock; + }; + indicator "Num Lock" { + !allowExplicit; + whichModState= locked; + modifiers= NumLock; + }; + indicator "Scroll Lock" { + whichModState= locked; + modifiers= ScrollLock; + }; + indicator "Shift Lock" { + !allowExplicit; + whichModState= locked; + modifiers= Shift; + }; + indicator "Group 2" { + !allowExplicit; + groups= 0xfe; + }; + indicator "Mouse Keys" { + indicatorDrivesKeyboard; + controls= mouseKeys; + }; +}; + +xkb_symbols "pc+us+inet(evdev)" { + + name[group1]="English (US)"; + + key { [ Escape ] }; + key { [ 1, exclam ] }; + key { [ 2, at ] }; + key { [ 3, numbersign ] }; + key { [ 4, dollar ] }; + key { [ 5, percent ] }; + key { [ 6, asciicircum ] }; + key { [ 7, ampersand ] }; + key { [ 8, asterisk ] }; + key { [ 9, parenleft ] }; + key { [ 0, parenright ] }; + key { [ minus, underscore ] }; + key { [ equal, plus ] }; + key { [ BackSpace, BackSpace ] }; + key { [ Tab, ISO_Left_Tab ] }; + key { + type= "ALPHABETIC", + symbols[Group1]= [ q, Q ] + }; + key { + type= "ALPHABETIC", + symbols[Group1]= [ w, W ] + }; + key { + type= "CUSTOM_CAPSLOCK", + symbols[Group1]= [ e, E, XF86AudioLowerVolume ], + actions[Group1]= [ NoAction(), NoAction(), RedirectKey(keycode=, clearmods=Lock) ] + }; + key { + type= "ALPHABETIC", + symbols[Group1]= [ r, R ] + }; + key { + type= "ALPHABETIC", + symbols[Group1]= [ t, T ] + }; + key { + type= "CUSTOM_CAPSLOCK", + symbols[Group1]= [ y, Y, XF86AudioRaiseVolume ], + actions[Group1]= [ NoAction(), NoAction(), RedirectKey(keycode=, clearmods=Lock) ] + }; + key { + type= "ALPHABETIC", + symbols[Group1]= [ u, U ] + }; + key { + type= "ALPHABETIC", + symbols[Group1]= [ i, I ] + }; + key { + type= "ALPHABETIC", + symbols[Group1]= [ o, O ] + }; + key { + type= "CUSTOM_CAPSLOCK", + symbols[Group1]= [ p, P, XF86AudioPrev ], + actions[Group1]= [ NoAction(), NoAction(), RedirectKey(keycode=, clearmods=Lock) ] + }; + key { [ bracketleft, braceleft ] }; + key { [ bracketright, braceright ] }; + key { [ Return ] }; + key { [ Control_L ] }; + key { + type= "ALPHABETIC", + symbols[Group1]= [ a, A ] + }; + key { + type= "ALPHABETIC", + symbols[Group1]= [ s, S ] + }; + key { + type= "ALPHABETIC", + symbols[Group1]= [ d, D ] + }; + key { + type= "ALPHABETIC", + symbols[Group1]= [ f, F ] + }; + key { + type= "ALPHABETIC", + symbols[Group1]= [ g, G ] + }; + key { + type= "CUSTOM_CAPSLOCK", + symbols[Group1]= [ h, H, Left], + actions[Group1]= [ NoAction(), NoAction(), RedirectKey(keycode=, clearmods=Lock) ] + }; + key { + type= "CUSTOM_CAPSLOCK", + symbols[Group1]= [ j, J, Down], + actions[Group1]= [ NoAction(), NoAction(), RedirectKey(keycode=, clearmods=Lock) ] + }; + key { + type= "CUSTOM_CAPSLOCK", + symbols[Group1]= [ k, K, Up], + actions[Group1]= [ NoAction(), NoAction(), RedirectKey(keycode=, clearmods=Lock) ] + }; + key { + type= "CUSTOM_CAPSLOCK", + symbols[Group1]= [ l, L, Right], + actions[Group1]= [ NoAction(), NoAction(), RedirectKey(keycode=, clearmods=Lock) ] + }; + key { [ semicolon, colon ] }; + key { [ apostrophe, quotedbl ] }; + key { [ grave, asciitilde ] }; + key { [ Shift_L ] }; + key { + type= "CUSTOM_CAPSLOCK", + symbols[Group1]= [ backslash, bar, XF86AudioMute ], + actions[Group1]= [ NoAction(), NoAction(), RedirectKey(keycode=, clearmods=Lock) ] + }; + key { + type= "ALPHABETIC", + symbols[Group1]= [ z, Z ] + }; + key { + type= "ALPHABETIC", + symbols[Group1]= [ x, X ] + }; + key { + type= "ALPHABETIC", + symbols[Group1]= [ c, C ] + }; + key { + type= "ALPHABETIC", + symbols[Group1]= [ v, V ] + }; + key { + type= "ALPHABETIC", + symbols[Group1]= [ b, B ] + }; + key { + type= "CUSTOM_CAPSLOCK", + symbols[Group1]= [ n, N, XF86AudioNext ], + actions[Group1]= [ NoAction(), NoAction(), RedirectKey(keycode=, clearmods=Lock) ] + }; + key { + type= "ALPHABETIC", + symbols[Group1]= [ m, M ] + }; + key { [ comma, less ] }; + key { [ period, greater ] }; + key { [ slash, question ] }; + key { [ Shift_R ] }; + key { + type= "CTRL+ALT", + symbols[Group1]= [ KP_Multiply, KP_Multiply, KP_Multiply, KP_Multiply, XF86ClearGrab ] + }; + key { [ Alt_L, Meta_L ] }; + key { + type= "CUSTOM_CAPSLOCK", + symbols[Group1]= [ space, space, XF86AudioPlay ], + actions[Group1]= [ NoAction(), NoAction(), RedirectKey(keycode=, clearmods=Lock) ] + }; + key { [ Caps_Lock ] }; + key { + type= "CTRL+ALT", + symbols[Group1]= [ F1, F1, F1, F1, XF86Switch_VT_1 ] + }; + key { + type= "CTRL+ALT", + symbols[Group1]= [ F2, F2, F2, F2, XF86Switch_VT_2 ] + }; + key { + type= "CTRL+ALT", + symbols[Group1]= [ F3, F3, F3, F3, XF86Switch_VT_3 ] + }; + key { + type= "CTRL+ALT", + symbols[Group1]= [ F4, F4, F4, F4, XF86Switch_VT_4 ] + }; + key { + type= "CTRL+ALT", + symbols[Group1]= [ F5, F5, F5, F5, XF86Switch_VT_5 ] + }; + key { + type= "CTRL+ALT", + symbols[Group1]= [ F6, F6, F6, F6, XF86Switch_VT_6 ] + }; + key { + type= "CUSTOM_CAPSLOCK", + symbols[Group1]= [ F7, F7, XF86MonBrightnessDown ], + actions[Group1]= [ NoAction(), NoAction(), RedirectKey(keycode=, clearmods=Lock) ] + }; + key { + type= "CUSTOM_CAPSLOCK", + symbols[Group1]= [ F8, F8, XF86MonBrightnessUp ], + actions[Group1]= [ NoAction(), NoAction(), RedirectKey(keycode=, clearmods=Lock) ] + }; + key { + type= "CTRL+ALT", + symbols[Group1]= [ F9, F9, F9, F9, XF86Switch_VT_9 ] + }; + key { + type= "CTRL+ALT", + symbols[Group1]= [ F10, F10, F10, F10, XF86Switch_VT_10 ] + }; + key { [ Num_Lock ] }; + key { [ Scroll_Lock ] }; + key { [ KP_Home, KP_7 ] }; + key { [ KP_Up, KP_8 ] }; + key { [ KP_Prior, KP_9 ] }; + key { + type= "CTRL+ALT", + symbols[Group1]= [ KP_Subtract, KP_Subtract, KP_Subtract, KP_Subtract, XF86Prev_VMode ] + }; + key { [ KP_Left, KP_4 ] }; + key { [ KP_Begin, KP_5 ] }; + key { [ KP_Right, KP_6 ] }; + key { + type= "CTRL+ALT", + symbols[Group1]= [ KP_Add, KP_Add, KP_Add, KP_Add, XF86Next_VMode ] + }; + key { [ KP_End, KP_1 ] }; + key { [ KP_Down, KP_2 ] }; + key { [ KP_Next, KP_3 ] }; + key { [ KP_Insert, KP_0 ] }; + key { [ KP_Delete, KP_Decimal ] }; + key { [ ISO_Level3_Shift ] }; + key { + type= "FOUR_LEVEL", + symbols[Group1]= [ less, greater, bar, brokenbar ] + }; + key { + type= "CTRL+ALT", + symbols[Group1]= [ F11, F11, F11, F11, XF86Switch_VT_11 ] + }; + key { + type= "CTRL+ALT", + symbols[Group1]= [ F12, F12, F12, F12, XF86Switch_VT_12 ] + }; + key { [ Katakana ] }; + key { [ Hiragana ] }; + key { [ Henkan_Mode ] }; + key { [ Hiragana_Katakana ] }; + key { [ Muhenkan ] }; + key { [ KP_Enter ] }; + key { [ Control_R ] }; + key { + type= "CTRL+ALT", + symbols[Group1]= [ KP_Divide, KP_Divide, KP_Divide, KP_Divide, XF86Ungrab ] + }; + key { + type= "PC_ALT_LEVEL2", + symbols[Group1]= [ Print, Sys_Req ] + }; + key { [ Multi_key ] }; + key { [ Linefeed ] }; + key { [ Home ] }; + key { [ Up ] }; + key { [ Prior ] }; + key { [ Left ] }; + key { [ Right ] }; + key { [ End ] }; + key { [ Down ] }; + key { [ Next ] }; + key { [ Insert ] }; + key { [ Delete ] }; + key { [ XF86AudioMute ] }; + key { [ XF86AudioLowerVolume ] }; + key { [ XF86AudioRaiseVolume ] }; + key { [ XF86PowerOff ] }; + key { [ KP_Equal ] }; + key { [ plusminus ] }; + key { + type= "PC_CONTROL_LEVEL2", + symbols[Group1]= [ Pause, Break ] + }; + key { [ XF86LaunchA ] }; + key { [ KP_Decimal, KP_Decimal ] }; + key { [ Hangul ] }; + key { [ Hangul_Hanja ] }; + key { [ Super_L ] }; + key { [ Super_R ] }; + key { [ Menu ] }; + key { [ Cancel ] }; + key { [ Redo ] }; + key { [ SunProps ] }; + key { [ Undo ] }; + key { [ SunFront ] }; + key { [ XF86Copy ] }; + key { [ XF86Open ] }; + key { [ XF86Paste ] }; + key { [ Find ] }; + key { [ XF86Cut ] }; + key { [ Help ] }; + key { [ XF86MenuKB ] }; + key { [ XF86Calculator ] }; + key { [ XF86Sleep ] }; + key { [ XF86WakeUp ] }; + key { [ XF86Explorer ] }; + key { [ XF86Send ] }; + key { [ XF86Xfer ] }; + key { [ XF86Launch1 ] }; + key { [ XF86Launch2 ] }; + key { [ XF86WWW ] }; + key { [ XF86DOS ] }; + key { [ XF86ScreenSaver ] }; + key { [ XF86RotateWindows ] }; + key { [ XF86TaskPane ] }; + key { [ XF86Mail ] }; + key { [ XF86Favorites ] }; + key { [ XF86MyComputer ] }; + key { [ XF86Back ] }; + key { [ XF86Forward ] }; + key { [ XF86Eject ] }; + key { [ XF86Eject ] }; + key { [ XF86AudioNext ] }; + key { [ XF86AudioPlay, XF86AudioPause ] }; + key { [ XF86AudioPrev ] }; + key { [ XF86AudioStop, XF86Eject ] }; + key { [ XF86AudioRecord ] }; + key { [ XF86AudioRewind ] }; + key { [ XF86Phone ] }; + key { [ XF86Tools ] }; + key { [ XF86HomePage ] }; + key { [ XF86Reload ] }; + key { [ XF86Close ] }; + key { [ XF86ScrollUp ] }; + key { [ XF86ScrollDown ] }; + key { [ parenleft ] }; + key { [ parenright ] }; + key { [ XF86New ] }; + key { [ Redo ] }; + key { [ XF86Tools ] }; + key { [ XF86Launch5 ] }; + key { [ XF86Launch6 ] }; + key { [ XF86Launch7 ] }; + key { [ XF86Launch8 ] }; + key { [ XF86Launch9 ] }; + key { [ XF86AudioMicMute ] }; + key { [ XF86TouchpadToggle ] }; + key { [ XF86TouchpadOn ] }; + key { [ XF86TouchpadOff ] }; + key { [ ISO_Level5_Shift ] }; + key { [ NoSymbol, Alt_L ] }; + key { [ NoSymbol, Meta_L ] }; + key { [ NoSymbol, Super_L ] }; + key { [ NoSymbol, Hyper_L ] }; + key { [ XF86AudioPlay ] }; + key { [ XF86AudioPause ] }; + key { [ XF86Launch3 ] }; + key { [ XF86Launch4 ] }; + key { [ XF86LaunchB ] }; + key { [ XF86Suspend ] }; + key { [ XF86Close ] }; + key { [ XF86AudioPlay ] }; + key { [ XF86AudioForward ] }; + key { [ Print ] }; + key { [ XF86WebCam ] }; + key { [ XF86AudioPreset ] }; + key { [ XF86Mail ] }; + key { [ XF86Messenger ] }; + key { [ XF86Search ] }; + key { [ XF86Go ] }; + key { [ XF86Finance ] }; + key { [ XF86Game ] }; + key { [ XF86Shop ] }; + key { [ Cancel ] }; + key { [ XF86MonBrightnessDown ] }; + key { [ XF86MonBrightnessUp ] }; + key { [ XF86AudioMedia ] }; + key { [ XF86Display ] }; + key { [ XF86KbdLightOnOff ] }; + key { [ XF86KbdBrightnessDown ] }; + key { [ XF86KbdBrightnessUp ] }; + key { [ XF86Send ] }; + key { [ XF86Reply ] }; + key { [ XF86MailForward ] }; + key { [ XF86Save ] }; + key { [ XF86Documents ] }; + key { [ XF86Battery ] }; + key { [ XF86Bluetooth ] }; + key { [ XF86WLAN ] }; + key { [ XF86UWB ] }; + key { [ XF86Next_VMode ] }; + key { [ XF86Prev_VMode ] }; + key { [ XF86MonBrightnessCycle ] }; + key { [ XF86BrightnessAuto ] }; + key { [ XF86DisplayOff ] }; + key { [ XF86WWAN ] }; + key { [ XF86RFKill ] }; + modifier_map Control { }; + modifier_map Shift { }; + modifier_map Shift { }; + modifier_map Mod1 { }; + modifier_map Lock { }; + modifier_map Mod2 { }; + modifier_map Mod5 { }; + modifier_map Control { }; + modifier_map Mod1 { }; + modifier_map Mod4 { }; + modifier_map Mod4 { }; + modifier_map Mod3 { }; + modifier_map Mod1 { }; + modifier_map Mod1 { }; + modifier_map Mod4 { }; + modifier_map Mod4 { }; +}; + +xkb_geometry "pc(pc105)" { + + width= 470; + height= 180; + + alias = ; + alias = ; + + baseColor= "white"; + labelColor= "black"; + xfont= "-*-helvetica-medium-r-normal--*-120-*-*-*-*-iso8859-1"; + description= "Generic 105-key PC"; + + shape "NORM" { + corner= 1, + { [ 18, 18 ] }, + { [ 2, 1 ], [ 16, 16 ] } + }; + shape "BKSP" { + corner= 1, + { [ 38, 18 ] }, + { [ 2, 1 ], [ 36, 16 ] } + }; + shape "TABK" { + corner= 1, + { [ 28, 18 ] }, + { [ 2, 1 ], [ 26, 16 ] } + }; + shape "BKSL" { + corner= 1, + { [ 28, 18 ] }, + { [ 2, 1 ], [ 26, 16 ] } + }; + shape "RTRN" { + corner= 1, + { [ 0, 0 ], [ 28, 0 ], [ 28, 37 ], [ 5, 37 ], + [ 5, 18 ], [ 0, 18 ] }, + { [ 2, 1 ], [ 26, 1 ], [ 26, 35 ], [ 7, 35 ], + [ 7, 16 ], [ 2, 16 ] }, + approx= { [ 5, 0 ], [ 28, 37 ] } + }; + shape "CAPS" { + corner= 1, + { [ 33, 18 ] }, + { [ 2, 1 ], [ 31, 16 ] } + }; + shape "LFSH" { + corner= 1, + { [ 25, 18 ] }, + { [ 2, 1 ], [ 23, 16 ] } + }; + shape "RTSH" { + corner= 1, + { [ 50, 18 ] }, + { [ 2, 1 ], [ 48, 16 ] } + }; + shape "MODK" { + corner= 1, + { [ 27, 18 ] }, + { [ 2, 1 ], [ 25, 16 ] } + }; + shape "SMOD" { + corner= 1, + { [ 23, 18 ] }, + { [ 2, 1 ], [ 21, 16 ] } + }; + shape "SPCE" { + corner= 1, + { [ 113, 18 ] }, + { [ 2, 1 ], [ 111, 16 ] } + }; + shape "KP0" { + corner= 1, + { [ 37, 18 ] }, + { [ 2, 1 ], [ 35, 16 ] } + }; + shape "KPAD" { + corner= 1, + { [ 18, 37 ] }, + { [ 2, 1 ], [ 16, 35 ] } + }; + shape "LEDS" { { [ 75, 20 ] } }; + shape "LED" { { [ 5, 1 ] } }; + section "Function" { + key.color= "grey20"; + priority= 7; + top= 22; + left= 19; + width= 351; + height= 19; + row { + top= 1; + left= 1; + keys { + { , "NORM", 1 }, + { , "NORM", 20, color="white" }, + { , "NORM", 1, color="white" }, + { , "NORM", 1, color="white" }, + { , "NORM", 1, color="white" }, + { , "NORM", 11, color="white" }, + { , "NORM", 1, color="white" }, + { , "NORM", 1, color="white" }, + { , "NORM", 1, color="white" }, + { , "NORM", 11, color="white" }, + { , "NORM", 1, color="white" }, + { , "NORM", 1, color="white" }, + { , "NORM", 1, color="white" }, + { , "NORM", 8, color="white" }, + { , "NORM", 1, color="white" }, + { , "NORM", 1, color="white" } + }; + }; + }; // End of "Function" section + + section "Alpha" { + key.color= "white"; + priority= 8; + top= 61; + left= 19; + width= 287; + height= 95; + row { + top= 1; + left= 1; + keys { + { , "NORM", 1 }, { , "NORM", 1 }, + { , "NORM", 1 }, { , "NORM", 1 }, + { , "NORM", 1 }, { , "NORM", 1 }, + { , "NORM", 1 }, { , "NORM", 1 }, + { , "NORM", 1 }, { , "NORM", 1 }, + { , "NORM", 1 }, { , "NORM", 1 }, + { , "NORM", 1 }, + { , "BKSP", 1, color="grey20" } + }; + }; + row { + top= 20; + left= 1; + keys { + { , "TABK", 1, color="grey20" }, + { , "NORM", 1 }, { , "NORM", 1 }, + { , "NORM", 1 }, { , "NORM", 1 }, + { , "NORM", 1 }, { , "NORM", 1 }, + { , "NORM", 1 }, { , "NORM", 1 }, + { , "NORM", 1 }, { , "NORM", 1 }, + { , "NORM", 1 }, { , "NORM", 1 }, + { , "RTRN", 1, color="grey20" } + }; + }; + row { + top= 39; + left= 1; + keys { + { , "CAPS", 1, color="grey20" }, + { , "NORM", 1 }, { , "NORM", 1 }, + { , "NORM", 1 }, { , "NORM", 1 }, + { , "NORM", 1 }, { , "NORM", 1 }, + { , "NORM", 1 }, { , "NORM", 1 }, + { , "NORM", 1 }, { , "NORM", 1 }, + { , "NORM", 1 }, { , "NORM", 1 } + }; + }; + row { + top= 58; + left= 1; + keys { + { , "LFSH", 1, color="grey20" }, + { , "NORM", 1 }, { , "NORM", 1 }, + { , "NORM", 1 }, { , "NORM", 1 }, + { , "NORM", 1 }, { , "NORM", 1 }, + { , "NORM", 1 }, { , "NORM", 1 }, + { , "NORM", 1 }, { , "NORM", 1 }, + { , "NORM", 1 }, + { , "RTSH", 1, color="grey20" } + }; + }; + row { + top= 77; + left= 1; + keys { + { , "MODK", 1, color="grey20" }, + { , "SMOD", 1, color="grey20" }, + { , "SMOD", 1, color="grey20" }, + { , "SPCE", 1 }, + { , "SMOD", 1, color="grey20" }, + { , "SMOD", 1, color="grey20" }, + { , "SMOD", 1, color="grey20" }, + { , "SMOD", 1, color="grey20" } + }; + }; + }; // End of "Alpha" section + + section "Editing" { + key.color= "grey20"; + priority= 9; + top= 61; + left= 312; + width= 58; + height= 95; + row { + top= 1; + left= 1; + keys { + { , "NORM", 1 }, { , "NORM", 1 }, + { , "NORM", 1 } + }; + }; + row { + top= 20; + left= 1; + keys { + { , "NORM", 1 }, { , "NORM", 1 }, + { , "NORM", 1 } + }; + }; + row { + top= 58; + left= 20; + keys { + { , "NORM", 1 } + }; + }; + row { + top= 77; + left= 1; + keys { + { , "NORM", 1 }, { , "NORM", 1 }, + { , "NORM", 1 } + }; + }; + }; // End of "Editing" section + + section "Keypad" { + key.color= "grey20"; + priority= 10; + top= 61; + left= 376; + width= 77; + height= 95; + row { + top= 1; + left= 1; + keys { + { , "NORM", 1 }, { , "NORM", 1 }, + { , "NORM", 1 }, { , "NORM", 1 } + }; + }; + row { + top= 20; + left= 1; + keys { + { , "NORM", 1, color="white" }, + { , "NORM", 1, color="white" }, + { , "NORM", 1, color="white" }, + { , "KPAD", 1 } + }; + }; + row { + top= 39; + left= 1; + keys { + { , "NORM", 1, color="white" }, + { , "NORM", 1, color="white" }, + { , "NORM", 1, color="white" } + }; + }; + row { + top= 58; + left= 1; + keys { + { , "NORM", 1, color="white" }, + { , "NORM", 1, color="white" }, + { , "NORM", 1, color="white" }, + { , "KPAD", 1 } + }; + }; + row { + top= 77; + left= 1; + keys { + { , "KP0", 1, color="white" }, + { , "NORM", 1, color="white" } + }; + }; + }; // End of "Keypad" section + + solid "LedPanel" { + top= 22; + left= 377; + priority= 0; + color= "grey10"; + shape= "LEDS"; + }; + indicator "Num Lock" { + top= 37; + left= 382; + priority= 1; + onColor= "green"; + offColor= "green30"; + shape= "LED"; + }; + indicator "Caps Lock" { + top= 37; + left= 407; + priority= 2; + onColor= "green"; + offColor= "green30"; + shape= "LED"; + }; + indicator "Scroll Lock" { + top= 37; + left= 433; + priority= 3; + onColor= "green"; + offColor= "green30"; + shape= "LED"; + }; + text "NumLockLabel" { + top= 25; + left= 378; + priority= 4; + width= 19.8; + height= 10; + XFont= "-*-helvetica-medium-r-normal--*-120-*-*-*-*-iso8859-1"; + text= "Num\nLock"; + }; + text "CapsLockLabel" { + top= 25; + left= 403; + priority= 5; + width= 26.4; + height= 10; + XFont= "-*-helvetica-medium-r-normal--*-120-*-*-*-*-iso8859-1"; + text= "Caps\nLock"; + }; + text "ScrollLockLabel" { + top= 25; + left= 428; + priority= 6; + width= 39.6; + height= 10; + XFont= "-*-helvetica-medium-r-normal--*-120-*-*-*-*-iso8859-1"; + text= "Scroll\nLock"; + }; +}; + +}; diff --git a/config/polybar.ini b/config/polybar.ini index 1d08b56..45a2449 100644 --- a/config/polybar.ini +++ b/config/polybar.ini @@ -1,4 +1,5 @@ include-file = $DOTWRYN/colorschemes/active/polybar.ini +include-file = $HOME/.config/polybar/local.ini [settings] screenchange-reload = true @@ -10,8 +11,6 @@ width = 100% height = 24pt radius = 0 -; dpi = 96 - background = ${colors.background} foreground = ${colors.foreground} @@ -64,7 +63,7 @@ label-urgent-padding = 1 ##################################################################### [bar/i3] -modules-center = tray +modules-center = tray battery0 battery1 [module/tray] type = internal/tray @@ -72,12 +71,70 @@ type = internal/tray format-margin = 8pt tray-spacing = 8pt +[module/backlight] +type = internal/backlight +format = + +[module/battery0] +type = internal/battery + +battery = BAT0 + +interval = 31 +ramp-capacity-0 =  +ramp-capacity-1 =  +ramp-capacity-2 =  +ramp-capacity-3 =  +ramp-capacity-4 =  +ramp-capacity-0-foreground = ${colors.alert} +ramp-capacity-1-foreground = ${colors.foreground} +ramp-capacity-2-foreground = ${colors.secondary-gradient-2} +ramp-capacity-3-foreground = ${colors.secondary-gradient-3} +ramp-capacity-4-foreground = ${colors.secondary-gradient-4} +format-charging = +format-discharging = +format-full = +format-low = +full-at = 74 +label-full = c: +label-full-foreground = ${colors.secondary-gradient-4} +low-at = 39 +label-low = ⚠ +label-low-foreground = ${colors.alert} + +[module/battery1] +type = internal/battery + +battery = BAT1 + +interval = 31 +ramp-capacity-0 =  +ramp-capacity-1 =  +ramp-capacity-2 =  +ramp-capacity-3 =  +ramp-capacity-4 =  +ramp-capacity-0-foreground = ${colors.alert} +ramp-capacity-1-foreground = ${colors.foreground} +ramp-capacity-2-foreground = ${colors.secondary-gradient-2} +ramp-capacity-3-foreground = ${colors.secondary-gradient-3} +ramp-capacity-4-foreground = ${colors.secondary-gradient-4} +format-charging = +format-discharging = +format-full = +format-low = +full-at = 74 +label-full = c: +label-full-foreground = ${colors.secondary-gradient-4} +low-at = 39 +label-low = ⚠ +label-low-foreground = ${colors.alert} + ##################################################################### ### modules-right ################################################### ##################################################################### [bar/i3] -modules-right = fs memory cpu wlan eth datetime backlight battery +modules-right = fs memory cpu wlan eth datetime backlight [module/fs] type = internal/fs @@ -133,19 +190,3 @@ type = custom/script label-foreground = ${colors.foreground} interval = 0.5 exec = echo $(date +"%A %B %d, %Y : %I:%M:%S-%P") $(TZ=UTC date +"{%H:%M-UTC}") - -[module/backlight] -type = internal/backlight -format = - -[module/battery] -type = internal/battery - -interval = 13 -format-charging = -format-discharging = -format-full = -format-low = -low-at = 10 -label-low = ⚠ -label-low-foreground = ${colors.alert} diff --git a/config/scwrypts/environments/dotwryn/local b/config/scwrypts/environments/dotwryn/local index 5a395b6..2d682ba 100644 --- a/config/scwrypts/environments/dotwryn/local +++ b/config/scwrypts/environments/dotwryn/local @@ -3,6 +3,9 @@ ### scwrypts runtime configuration (group 'dotwryn') ################ ##################################################################### +# enlighten BACKLIGHT_DEVICE (see 'man enlighten') +export DESKTOP__BACKLIGHT_DEVICE= + # directory containing sound effects export DESKTOP__SFX_PATH="$HOME/Media/sfx" export DESKTOP__WALLPAPER_PATH="$HOME/Pictures/bg" diff --git a/config/scwrypts/environments/dotwryn/local.altaria b/config/scwrypts/environments/dotwryn/local.altaria index 095330e..cd2db14 100644 --- a/config/scwrypts/environments/dotwryn/local.altaria +++ b/config/scwrypts/environments/dotwryn/local.altaria @@ -3,6 +3,9 @@ ### scwrypts runtime configuration (group 'dotwryn') ################ ##################################################################### +# enlighten BACKLIGHT_DEVICE (see 'man enlighten') +export DESKTOP__BACKLIGHT_DEVICE= + # directory containing sound effects export DESKTOP__SFX_PATH="$HOME/Media/sfx" # from local export DESKTOP__WALLPAPER_PATH="$HOME/Pictures/bg" # from local diff --git a/config/scwrypts/environments/dotwryn/local.blaziken b/config/scwrypts/environments/dotwryn/local.blaziken index 095330e..cd2db14 100644 --- a/config/scwrypts/environments/dotwryn/local.blaziken +++ b/config/scwrypts/environments/dotwryn/local.blaziken @@ -3,6 +3,9 @@ ### scwrypts runtime configuration (group 'dotwryn') ################ ##################################################################### +# enlighten BACKLIGHT_DEVICE (see 'man enlighten') +export DESKTOP__BACKLIGHT_DEVICE= + # directory containing sound effects export DESKTOP__SFX_PATH="$HOME/Media/sfx" # from local export DESKTOP__WALLPAPER_PATH="$HOME/Pictures/bg" # from local diff --git a/config/scwrypts/environments/dotwryn/local.butterfree b/config/scwrypts/environments/dotwryn/local.butterfree index 095330e..cd2db14 100644 --- a/config/scwrypts/environments/dotwryn/local.butterfree +++ b/config/scwrypts/environments/dotwryn/local.butterfree @@ -3,6 +3,9 @@ ### scwrypts runtime configuration (group 'dotwryn') ################ ##################################################################### +# enlighten BACKLIGHT_DEVICE (see 'man enlighten') +export DESKTOP__BACKLIGHT_DEVICE= + # directory containing sound effects export DESKTOP__SFX_PATH="$HOME/Media/sfx" # from local export DESKTOP__WALLPAPER_PATH="$HOME/Pictures/bg" # from local diff --git a/config/scwrypts/environments/dotwryn/local.gardevoir b/config/scwrypts/environments/dotwryn/local.gardevoir index 095330e..cd2db14 100644 --- a/config/scwrypts/environments/dotwryn/local.gardevoir +++ b/config/scwrypts/environments/dotwryn/local.gardevoir @@ -3,6 +3,9 @@ ### scwrypts runtime configuration (group 'dotwryn') ################ ##################################################################### +# enlighten BACKLIGHT_DEVICE (see 'man enlighten') +export DESKTOP__BACKLIGHT_DEVICE= + # directory containing sound effects export DESKTOP__SFX_PATH="$HOME/Media/sfx" # from local export DESKTOP__WALLPAPER_PATH="$HOME/Pictures/bg" # from local diff --git a/config/scwrypts/environments/dotwryn/local.pikachu b/config/scwrypts/environments/dotwryn/local.pikachu new file mode 100644 index 0000000..06d533b --- /dev/null +++ b/config/scwrypts/environments/dotwryn/local.pikachu @@ -0,0 +1,14 @@ +#!/bin/zsh +##################################################################### +### scwrypts runtime configuration (group 'dotwryn') ################ +##################################################################### + +# enlighten BACKLIGHT_DEVICE (see 'man enlighten') +export DESKTOP__BACKLIGHT_DEVICE=amdgpu_bl1 + +# directory containing sound effects +export DESKTOP__SFX_PATH="$HOME/Media/sfx" # from local +export DESKTOP__WALLPAPER_PATH="$HOME/Pictures/bg" # from local + +# home server data +export WRYN__SERVER_HOSTNAMES= diff --git a/config/scwrypts/environments/dotwryn/local.umbreon b/config/scwrypts/environments/dotwryn/local.umbreon index 095330e..cd2db14 100644 --- a/config/scwrypts/environments/dotwryn/local.umbreon +++ b/config/scwrypts/environments/dotwryn/local.umbreon @@ -3,6 +3,9 @@ ### scwrypts runtime configuration (group 'dotwryn') ################ ##################################################################### +# enlighten BACKLIGHT_DEVICE (see 'man enlighten') +export DESKTOP__BACKLIGHT_DEVICE= + # directory containing sound effects export DESKTOP__SFX_PATH="$HOME/Media/sfx" # from local export DESKTOP__WALLPAPER_PATH="$HOME/Pictures/bg" # from local diff --git a/config/scwrypts/environments/remote/local.pikachu b/config/scwrypts/environments/remote/local.pikachu new file mode 100644 index 0000000..180df25 --- /dev/null +++ b/config/scwrypts/environments/remote/local.pikachu @@ -0,0 +1,7 @@ +#!/bin/zsh +##################################################################### +### scwrypts runtime configuration (group 'remote') ################# +##################################################################### + +# session name for remote connection (default 'remote') +export REMOTE_TMUX_SESSION= diff --git a/config/scwrypts/environments/scwrypts/local.pikachu b/config/scwrypts/environments/scwrypts/local.pikachu new file mode 100644 index 0000000..878fbd7 --- /dev/null +++ b/config/scwrypts/environments/scwrypts/local.pikachu @@ -0,0 +1,51 @@ +#!/bin/zsh +##################################################################### +### scwrypts runtime configuration (group 'scwrypts') ############### +##################################################################### + +# standard AWS environment variables used by awscli and other tools +export AWS_ACCOUNT=088935110352 # from local +export AWS_PROFILE=yage # from local +export AWS_REGION=us-east-2 # from local + +# fully-qualified path to mount the EFS drive +export AWS__EFS__LOCAL_MOUNT_POINT=/mnt/efs/yage # from local + +# details for a directus instance +export DIRECTUS__API_TOKEN= +export DIRECTUS__BASE_URL=https://heretic.directus.app # from local + +# details for discord bot +export DISCORD__BOT_TOKEN= +export DISCORD__CONTENT_FOOTER= +export DISCORD__CONTENT_HEADER='<@380809228450922507> ' # from local +export DISCORD__DEFAULT_AVATAR_URL= +export DISCORD__DEFAULT_CHANNEL_ID= +export DISCORD__DEFAULT_USERNAME= +export DISCORD__DEFAULT_WEBHOOK= + +# linear.app project management configuration +export LINEAR__API_TOKEN= + +# s3 bucket name and filesystem targets for media backups +export MEDIA_SYNC__S3_BUCKET=yage # from local +export MEDIA_SYNC__TARGETS=( + Pictures + Documents + Media + .local/.porn + .local/share/dolphin-emu + Games/roms +) + +# redis connection credentials +export REDIS_AUTH= +export REDIS_HOST= +export REDIS_PORT= + +# twilio account / credentials +export TWILIO__ACCOUNT_SID=ACac926b109b3cd8a78685a2a0994d0271 # from local +export TWILIO__API_KEY= +export TWILIO__API_SECRET= +export TWILIO__DEFAULT_PHONE_FROM= +export TWILIO__DEFAULT_PHONE_TO= diff --git a/config/system/pikachu/udev/rules.d/90-set-default-battery-max-charge.rules b/config/system/pikachu/udev/rules.d/90-set-default-battery-max-charge.rules new file mode 100644 index 0000000..3c519dc --- /dev/null +++ b/config/system/pikachu/udev/rules.d/90-set-default-battery-max-charge.rules @@ -0,0 +1 @@ +ACTION=="add", RUN+="/home/w0ryn/.wryn/bin/pikachu/set-battery-max-charge" diff --git a/config/system/pikachu/udev/rules.d/91-backlight.rules b/config/system/pikachu/udev/rules.d/91-backlight.rules new file mode 100644 index 0000000..890d09c --- /dev/null +++ b/config/system/pikachu/udev/rules.d/91-backlight.rules @@ -0,0 +1 @@ +SUBSYSTEM=="backlight", ACTION=="add", RUN+="/usr/bin/env chgrp video %S%p/brightness", RUN+="/usr/bin/env chmod g+w %S%p/brightness" diff --git a/config/system/pikachu/xinit/10-optimus-manager.conf b/config/system/pikachu/xinit/10-optimus-manager.conf new file mode 100644 index 0000000..06c155e --- /dev/null +++ b/config/system/pikachu/xinit/10-optimus-manager.conf @@ -0,0 +1,40 @@ +Section "Files" + ModulePath "/usr/lib/nvidia" + ModulePath "/usr/lib32/nvidia" + ModulePath "/usr/lib32/nvidia/xorg/modules" + ModulePath "/usr/lib32/xorg/modules" + ModulePath "/usr/lib64/nvidia/xorg/modules" + ModulePath "/usr/lib64/nvidia/xorg" + ModulePath "/usr/lib64/xorg/modules" +EndSection + +Section "ServerLayout" + Identifier "layout" + Screen 0 "integrated" + Inactive "nvidia" + Option "AllowNVIDIAGPUScreens" +EndSection + +Section "Device" + Identifier "integrated" + Driver "modesetting" + BusID "PCI:101:0:0" + Option "DRI" "3" +EndSection + +Section "Screen" + Identifier "integrated" + Device "integrated" +EndSection + +Section "Device" + Identifier "nvidia" + Driver "nvidia" + BusID "PCI:100:0:0" + Option "Coolbits" "28" +EndSection + +Section "Screen" + Identifier "nvidia" + Device "nvidia" +EndSection diff --git a/config/system/ssh/ssh_config.d/30-1password-ssh-agent.conf b/config/system/ssh/ssh_config.d/30-1password-ssh-agent.conf new file mode 100644 index 0000000..d9b3b0c --- /dev/null +++ b/config/system/ssh/ssh_config.d/30-1password-ssh-agent.conf @@ -0,0 +1,2 @@ +Host * + IdentityAgent ~/.1password/agent.sock diff --git a/config/system/ssh/sshd_config.d/10-only-allow-password-on-local-network.conf b/config/system/ssh/sshd_config.d/10-only-allow-password-on-local-network.conf new file mode 100644 index 0000000..7c87b8c --- /dev/null +++ b/config/system/ssh/sshd_config.d/10-only-allow-password-on-local-network.conf @@ -0,0 +1,5 @@ +PasswordAuthentication no + +Match Address 192.168.68.* + PasswordAuthentication yes +Match All diff --git a/config/tmux.conf b/config/tmux.conf index 2a146b2..5fa789e 100644 --- a/config/tmux.conf +++ b/config/tmux.conf @@ -28,7 +28,7 @@ set -g mouse off set -g status-style fg=brightmagenta,bg=black set -g window-status-current-style fg=black,bg=brightmagenta -set -g status-right "#(cat /sys/class/power_supply/BAT0/capacity)% | #[fg=magneta]%d %b %R | #(ip address 2>&1 | grep wlp0 | sed -n 's/^.*\\(192.[^/]*\\)\\/.*$/\\1/p') " +set -g status-right "#(cat /sys/class/power_supply/BAT[01]/capacity | head -n1)% | #[fg=magneta]%d %b %R | #(ip address 2>&1 | grep wlp0 | sed -n 's/^.*\\(192.[^/]*\\)\\/.*$/\\1/p') " ##################################################################### diff --git a/config/xcompose.conf b/config/xcompose.conf index d0af474..565b8ae 100644 --- a/config/xcompose.conf +++ b/config/xcompose.conf @@ -1,3 +1,4 @@ include "%L" : "ñ" + : "Ñ" diff --git a/config/xinitrc.common b/config/xinitrc.common index 5c48114..a853d87 100644 --- a/config/xinitrc.common +++ b/config/xinitrc.common @@ -21,4 +21,10 @@ done for XINITRC in $(find /etc/X11/xinit/xinitrc.d); do source "$XINITRC"; done +[ -f "$HOME/.config/X11/xmodmap" ] \ + && xmodmap "$HOME/.config/X11/xmodmap" + +[ -f "$HOME/.config/X11/xkeymap" ] \ + && xkbcomp "$HOME/.config/X11/xkeymap" ${DISPLAY} + unset PREFERRED_TERMINAL PREFERRED_BROWSER XINITRC diff --git a/scwrypts/dotwryn/.config/env.template b/scwrypts/dotwryn/.config/env.template index 2a29e7f..7a96596 100644 --- a/scwrypts/dotwryn/.config/env.template +++ b/scwrypts/dotwryn/.config/env.template @@ -1,4 +1,5 @@ #!/bin/zsh +export DESKTOP__BACKLIGHT_DEVICE= export DESKTOP__SFX_PATH= export DESKTOP__WALLPAPER_PATH= export WRYN__SERVER_HOSTNAMES= diff --git a/scwrypts/dotwryn/.config/env.template.descriptions b/scwrypts/dotwryn/.config/env.template.descriptions index bac40cc..52bb313 100644 --- a/scwrypts/dotwryn/.config/env.template.descriptions +++ b/scwrypts/dotwryn/.config/env.template.descriptions @@ -1,4 +1,5 @@ -DESKTOP__SFX_PATH | directory containing sound effects -DESKTOP__DESKTOP_PATH | directory containing desktop background images +DESKTOP__BACKLIGHT_DEVICE | enlighten BACKLIGHT_DEVICE (see 'man enlighten') +DESKTOP__SFX_PATH | directory containing sound effects +DESKTOP__DESKTOP_PATH | directory containing desktop background images WRYN__SERVER_HOSTNAMES | home server data diff --git a/scwrypts/dotwryn/.config/env.yaml b/scwrypts/dotwryn/.config/env.yaml index 353f34d..bc80844 100644 --- a/scwrypts/dotwryn/.config/env.yaml +++ b/scwrypts/dotwryn/.config/env.yaml @@ -1,10 +1,16 @@ --- desktop: - .DESCRIPTION: >- - directory containing sound effects + backlight-device: + .DESCRIPTION: >- + enlighten BACKLIGHT_DEVICE (see 'man enlighten') + .ENVIRONMENT: DESKTOP__BACKLIGHT_DEVICE sfx-path: + .DESCRIPTION: >- + directory containing sound effects .ENVIRONMENT: DESKTOP__SFX_PATH wallpaper-path: + .DESCRIPTION: >- + directory containing wallpaper images .ENVIRONMENT: DESKTOP__WALLPAPER_PATH wryn: .DESCRIPTION: >- diff --git a/scwrypts/dotwryn/desktop/xorg/backlight b/scwrypts/dotwryn/desktop/xorg/backlight index 09896ad..badc2bb 100755 --- a/scwrypts/dotwryn/desktop/xorg/backlight +++ b/scwrypts/dotwryn/desktop/xorg/backlight @@ -1,5 +1,8 @@ #!/bin/zsh use desktop/notify --group dotwryn + +__CHECK_ENV_VAR DESKTOP__BACKLIGHT_DEVICE --optional + ##################################################################### MAIN() { @@ -11,10 +14,10 @@ MAIN() { [[ $UTIL =~ ^enlighten$ ]] && { CURRENT_PERCENT=$(enlighten | sed 's/.*(//;s/%.*//') - [[ $CURRENT_PERCENT -gt 60 ]] && DELTA=20 - [[ $CURRENT_PERCENT -le 60 ]] && DELTA=10 - [[ $CURRENT_PERCENT -le 40 ]] && DELTA=5 - [[ $CURRENT_PERCENT -le 10 ]] && DELTA=1 + [[ $CURRENT_PERCENT -gt 60 ]] && DELTA=40 + [[ $CURRENT_PERCENT -le 60 ]] && DELTA=20 + [[ $CURRENT_PERCENT -le 40 ]] && DELTA=10 + [[ $CURRENT_PERCENT -le 10 ]] && DELTA=5 } case $1 in @@ -25,7 +28,7 @@ MAIN() { enlighten ) [[ $CURRENT_PERCENT -ge 99 ]] && NOTIFY_SEND 'at maximum brightness' && exit 0 - enlighten +${DELTA}% + BACKLIGHT_DEVICE=$DESKTOP__BACKLIGHT_DEVICE enlighten +${DELTA}% ;; esac ;; @@ -43,7 +46,7 @@ MAIN() { enlighten ) [[ $CURRENT_PERCENT -le 1 ]] && NOTIFY_SEND 'at minimum brightness' && exit 0 [[ $CURRENT_PERCENT -le 2 ]] && ARGS='=1%' || ARGS="-${DELTA}%" - enlighten "$ARGS" + BACKLIGHT_DEVICE=$DESKTOP__BACKLIGHT_DEVICE enlighten "$ARGS" ;; esac ;; @@ -52,22 +55,22 @@ MAIN() { case $UTIL in xbacklight ) xbacklight -set $2 ;; gmux_backlight ) gmux_backlight $2 ;; - enlighten ) enlighten "=$2" ;; + enlighten ) BACKLIGHT_DEVICE=$DESKTOP__BACKLIGHT_DEVICE enlighten "=$2" ;; esac ;; min | minimum ) case $UTIL in - enlighten ) enlighten '=1%' ;; + enlighten ) BACKLIGHT_DEVICE=$DESKTOP__BACKLIGHT_DEVICE enlighten '=1%' ;; esac ;; max | maximum ) case $UTIL in - enlighten ) enlighten '=100%' ;; + enlighten ) BACKLIGHT_DEVICE=$DESKTOP__BACKLIGHT_DEVICE enlighten '=100%' ;; esac ;; query | '' ) case $UTIL in - enlighten ) NOTIFY_SUCCESS "current brightness : $(enlighten)" ;; + enlighten ) NOTIFY_SUCCESS "current brightness : $(BACKLIGHT_DEVICE=$DESKTOP__BACKLIGHT_DEVICE enlighten)" ;; esac ;; diff --git a/scwrypts/dotwryn/lib/desktop/colorscheme/polybar.module.zsh b/scwrypts/dotwryn/lib/desktop/colorscheme/polybar.module.zsh index 6267b4b..a57ef8b 100644 --- a/scwrypts/dotwryn/lib/desktop/colorscheme/polybar.module.zsh +++ b/scwrypts/dotwryn/lib/desktop/colorscheme/polybar.module.zsh @@ -12,6 +12,18 @@ primary = #$(_GET_HEX .polybar.primary .material.base.primary .ansi. secondary = #$(_GET_HEX .polybar.secondary .material.base.secondary .ansi.blue.regular) alert = #$(_GET_HEX .polybar.alert .material.base.error .ansi.red.regular) disabled = #$(_GET_HEX .polybar.disabled .ansi.gray.regular) + +primary-gradient-0 = #$(_GET_HEX .polybar.primary-gradient-0 .material.primary.700 .ansi.green.regular) +primary-gradient-1 = #$(_GET_HEX .polybar.primary-gradient-1 .material.primary.600 .ansi.green.regular) +primary-gradient-2 = #$(_GET_HEX .polybar.primary-gradient-2 .material.primary.500 .ansi.green.regular) +primary-gradient-3 = #$(_GET_HEX .polybar.primary-gradient-3 .material.primary.400 .ansi.green.regular) +primary-gradient-4 = #$(_GET_HEX .polybar.primary-gradient-4 .material.primary.300 .ansi.green.regular) + +secondary-gradient-0 = #$(_GET_HEX .polybar.secondary-gradient-0 .material.secondary.700 .ansi.blue.regular ) +secondary-gradient-1 = #$(_GET_HEX .polybar.secondary-gradient-1 .material.secondary.600 .ansi.blue.regular ) +secondary-gradient-2 = #$(_GET_HEX .polybar.secondary-gradient-2 .material.secondary.500 .ansi.blue.regular ) +secondary-gradient-3 = #$(_GET_HEX .polybar.secondary-gradient-3 .material.secondary.400 .ansi.blue.regular ) +secondary-gradient-4 = #$(_GET_HEX .polybar.secondary-gradient-4 .material.secondary.300 .ansi.blue.regular ) " | sed '$d' > "$_COLORSCHEME_FILE__polybar" } diff --git a/scwrypts/dotwryn/lib/system/config.module.zsh b/scwrypts/dotwryn/lib/system/config.module.zsh new file mode 100644 index 0000000..a7292ad --- /dev/null +++ b/scwrypts/dotwryn/lib/system/config.module.zsh @@ -0,0 +1,54 @@ +##################################################################### + +DEPENDENCIES+=(hostnamectl) +REQUIRED_ENV+=(DOTWRYN) + +##################################################################### + +${SCWRYPTS_MODULE}setup() { + STATUS "configuring system applications" + local \ + APPLICATION \ + CONFIG \ + SOURCE_DIR SOURCE_CONFIG \ + SYSTEM_DIR SYSTEM_CONFIG \ + ; + + for SOURCE_DIR in $({ + find "${DOTWRYN}/config/system/" -mindepth 1 -maxdepth 1 -type d + find "${DOTWRYN}/config/system/$(hostnamectl --static)/" -mindepth 1 -maxdepth 1 -type d + } 2>/dev/null | sort -u) + do + APPLICATION="$(echo "${SOURCE_DIR}" | sed 's|.*/||')" + case ${APPLICATION} in + ( ssh | udev ) + SYSTEM_DIR=/etc/${APPLICATION} + ;; + ( xinit ) + SYSTEM_DIR=/etc/X11/xinit/xinitrc.d/ + ;; + ( * ) + SYSTEM_DIR='' + ;; + esac + + [ "${SYSTEM_DIR}" ] && sudo [ -d "${SYSTEM_DIR}" ] \ + || continue + + for CONFIG in $(cd -- "${SOURCE_DIR}"; find . -mindepth 1 -type f | sed 's|^\./||') + do + SOURCE_CONFIG="${SOURCE_DIR}/${CONFIG}" + SYSTEM_CONFIG="${SYSTEM_DIR}/${CONFIG}" + + sudo [ -f "${SYSTEM_CONFIG}" ] && { + STATUS "already linked '${APPLICATION}/${CONFIG}'" + continue + } + + sudo ln -s "${SOURCE_CONFIG}" "${SYSTEM_CONFIG}" \ + && STATUS "linked '${APPLICATION}/${CONFIG}'" \ + || WARNING "cannot link '${APPLICATION}/${CONFIG}'" \ + ; + done + done +} diff --git a/scwrypts/dotwryn/lib/system/system.module.zsh b/scwrypts/dotwryn/lib/system/system.module.zsh new file mode 100644 index 0000000..6e8a683 --- /dev/null +++ b/scwrypts/dotwryn/lib/system/system.module.zsh @@ -0,0 +1,7 @@ +# +# provides system setup utilities +# + +SCWRYPTS_MODULE=dotwryn.system. + +use system/config --group dotwryn diff --git a/scwrypts/dotwryn/system/setup b/scwrypts/dotwryn/system/setup new file mode 100755 index 0000000..6ab7d2a --- /dev/null +++ b/scwrypts/dotwryn/system/setup @@ -0,0 +1,17 @@ +#!/bin/zsh +##################################################################### + +use system --group dotwryn + +##################################################################### + +USAGE__description=' + sets up links to things like /etc/*.d/ configurations + or systemd services; requires root access +' + +##################################################################### + +MAIN() { + dotwryn.system.setup +} diff --git a/scwrypts/remote/connect b/scwrypts/remote/connect index d896856..b06c65a 100755 --- a/scwrypts/remote/connect +++ b/scwrypts/remote/connect @@ -65,7 +65,10 @@ MAIN() { * ) ERROR "unknown argument '$1'" ;; esac - shift $_S + [[ $_S -le $# ]] \ + && shift $_S \ + || ERROR "missing argument for '$1'" \ + || shift $# done CHECK_ERRORS @@ -149,7 +152,9 @@ MAIN() { [ $BASTION_HOST ] && { - PASSTHROUGH_COMMAND="$(GET_PASSTHROUGH_PREFIX) connect $REMOTE_NAME -- -c $(printf "%q " "$REMOTE_COMMAND")" + DEBUG "REMOTE_COMMAND : $REMOTE_COMMAND" + PASSTHROUGH_COMMAND="$(GET_PASSTHROUGH_PREFIX) connect $REMOTE_NAME --" + [ "$REMOTE_COMMAND" ] && PASSTHROUGH_COMMAND+=" -c $(printf "%q " "$REMOTE_COMMAND")" BASTION_TARGET=$REMOTE_NAME REMOTE__TARGET=$BASTION_HOST MAIN --command "$PASSTHROUGH_COMMAND" return $? diff --git a/scwrypts/remote/lib/bastion.module.zsh b/scwrypts/remote/lib/bastion.module.zsh index d61217f..2310725 100644 --- a/scwrypts/remote/lib/bastion.module.zsh +++ b/scwrypts/remote/lib/bastion.module.zsh @@ -1,3 +1,3 @@ GET_PASSTHROUGH_PREFIX() { - echo "SUBSCWRYPT=$((SUBSCWRYPT+1)) SCWRYPTS_LOG_LEVEL=$SCWRYPTS_LOG_LEVEL scwrypts" + echo "source ~/.zshrc &>/dev/null; SUBSCWRYPT=$((SUBSCWRYPT+1)) SCWRYPTS_LOG_LEVEL=$SCWRYPTS_LOG_LEVEL scwrypts" } diff --git a/scwrypts/remote/test b/scwrypts/remote/test index 3b83891..12393ff 100755 --- a/scwrypts/remote/test +++ b/scwrypts/remote/test @@ -60,7 +60,10 @@ MAIN() { ;; * ) ERROR "unrecognized argument '$1'" ;; esac - shift $_S + [[ $_S -le $# ]] \ + && shift $_S \ + || ERROR "missing argument for '$1'" \ + || shift $# done [ $CONNECTION_STRING ] \ @@ -108,7 +111,7 @@ MAIN() { CONNECTION_TEST() { [ $REMOTE_NAME ] && { - [[ $(REMOTE__QUERY_CONNECTION .sessions.$REMOTE_NAME) =~ false ]] && { + [[ $(REMOTE__QUERY_CONNECTION .sessions.$REMOTE_NAME.enabled) =~ false ]] && { return 1 } } diff --git a/scwrypts/remote/tmux/manager b/scwrypts/remote/tmux/manager index 040e77a..553add8 100755 --- a/scwrypts/remote/tmux/manager +++ b/scwrypts/remote/tmux/manager @@ -1,4 +1,4 @@ -#!/bin/zsh +#!/usr/bin/env zsh # # works as a standalone zsh script # diff --git a/scwrypts/remote/tmux/tmux.conf b/scwrypts/remote/tmux/tmux.conf index e11deb5..eed1d22 100644 --- a/scwrypts/remote/tmux/tmux.conf +++ b/scwrypts/remote/tmux/tmux.conf @@ -9,7 +9,7 @@ set-window-option -g status-keys vi setw -gq utf8 on set -g status-style fg=brightmagenta,bg=black set -g window-status-current-style fg=black,bg=brightmagenta -set -g status-right "omni host : #(hostnamectl --static) | #(cat /sys/class/power_supply/BAT0/capacity)% " +set -g status-right "omni host : #(hostnamectl --static) | #(cat /sys/class/power_supply/BAT[01]/capacity | head -n1)% " # navigate between hosts with ALT+window-number set -g base-index 1