Skip to content

Commit

Permalink
New fixer Version
Browse files Browse the repository at this point in the history
Added the fixer version that does everything described from readme file.
  • Loading branch information
GrindamN authored Jan 16, 2022
1 parent 1f1c93e commit d5b13b6
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions fixer.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/usr/bin/env bash
xkbcomp -xkb "$DISPLAY" xkbmap
FILE="/home/$USER/xkbmap"
NEWSCRIPT="/home/$USER/capslock.sh"
DESKTOP_AUTO_FILE="$HOME/.config/autostart/capslockf.desktop"
RUNLOG="/path/to/script.log"
sed -i 's/key <CAPS> { \[ Caps_Lock ] };/key <CAPS> {\n repeat=no,\n type[group1]="ALPHABETIC",\n symbols[group1]=[ Caps_Lock, Caps_Lock],\n actions[group1]=[ LockMods(modifiers=Lock), Private(type=3,data[0]=1,data[1]=3,data[2]=3)]\n };/' "$FILE"
cat <<EOF >"$NEWSCRIPT"
#!/usr/bin/env bash
xkbcomp -w 0 /home/$USER/xkbmap $DISPLAY
cp $HOME
EOF
cat <<EOF2 >"$DESKTOP_AUTO_FILE"
[Desktop Entry]
Type=Application
Exec=$NEWSCRIPT
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
Name[en_US]=CapsLockf
Name=CapsLockf
Comment[en_US]=
Comment=
EOF2
date >> $RUNLOG

0 comments on commit d5b13b6

Please sign in to comment.