From 79c92ec6cbad87cc59111877a4224996e133b0ac Mon Sep 17 00:00:00 2001 From: xerus2000 <27jf@pm.me> Date: Mon, 1 Mar 2021 09:58:21 +0100 Subject: [PATCH] config: update Xorg initialisation --- .Xmodmap | 2 ++ .Xdefaults => .Xresources | 0 .local/bin/scripts/update-keyboard-layout | 3 ++- .xinitrc | 3 +++ .xsessionrc | 8 -------- .zprofile | 1 + 6 files changed, 8 insertions(+), 9 deletions(-) create mode 100644 .Xmodmap rename .Xdefaults => .Xresources (100%) create mode 100644 .xinitrc delete mode 100644 .xsessionrc diff --git a/.Xmodmap b/.Xmodmap new file mode 100644 index 0000000..0838da2 --- /dev/null +++ b/.Xmodmap @@ -0,0 +1,2 @@ +! Swap semicolon and colon - https://unix.stackexchange.com/questions/615799/swap-semicolon-colon-to-p-unexpected-cause-semicolon-colon-affected-by-cpas-lock +keycode 47 = colon semicolon colon semicolon diff --git a/.Xdefaults b/.Xresources similarity index 100% rename from .Xdefaults rename to .Xresources diff --git a/.local/bin/scripts/update-keyboard-layout b/.local/bin/scripts/update-keyboard-layout index 604c906..159c905 100755 --- a/.local/bin/scripts/update-keyboard-layout +++ b/.local/bin/scripts/update-keyboard-layout @@ -1,6 +1,7 @@ #!/bin/sh +echo $XDG_RUNTIME_DIR test "$ACTION" && case $ACTION in add) id=1;; remove) id=0;; esac || id=$(test -c /dev/ttyACM0 && echo 1 || echo 0) -test "$id" && XAUTHORITY="/home/janek/.cache/Xauthority" DISPLAY=:0 xkblayout-state set $id +test "$id" && XAUTHORITY="/run/user/1000/Xauthority" DISPLAY=:0 xkblayout-state set $id diff --git a/.xinitrc b/.xinitrc new file mode 100644 index 0000000..c5502ed --- /dev/null +++ b/.xinitrc @@ -0,0 +1,3 @@ +export KDEHOME="$XDG_DATA_HOME/kdehome" +export DESKTOP_SESSION=plasma +exec startplasma-x11 diff --git a/.xsessionrc b/.xsessionrc deleted file mode 100644 index f1b6417..0000000 --- a/.xsessionrc +++ /dev/null @@ -1,8 +0,0 @@ -export XDG_DATA_DIRS="$HOME/.local/xdg:$XDG_DATA_DIRS" -export KDEHOME="$XDG_DATA_HOME/kdehome" - -# Update keyboard layout to US if keyboardio is connected -$HOME/.local/bin/update-keyboard-layout - -# Swap semicolon and colon - https://unix.stackexchange.com/questions/615799/swap-semicolon-colon-to-p-unexpected-cause-semicolon-colon-affected-by-cpas-lock -xmodmap -e "keycode 47 = colon semicolon colon semicolon" diff --git a/.zprofile b/.zprofile index 21deabf..2ce03ef 100644 --- a/.zprofile +++ b/.zprofile @@ -3,6 +3,7 @@ export DATA="$HOME/data" export XDG_DATA_HOME="$HOME/.local/share" export XDG_CACHE_HOME="$HOME/.cache" export XDG_CONFIG_HOME="$HOME/.config" +export XDG_DATA_DIRS="$HOME/.local/xdg:$XDG_DATA_DIRS" # adjust programs to use xdg export XAUTHORITY="$XDG_RUNTIME_DIR"/Xauthority export PASSWORD_STORE_DIR="$XDG_DATA_HOME"/pass