From d701077ea1999b65cf6ac7145a8ff66b7abb828b Mon Sep 17 00:00:00 2001 From: q3aql Date: Thu, 5 Nov 2020 14:41:32 +0100 Subject: [PATCH] Fix and remove unnecessary items (win-to-altgr_xmodmap.sh) --- linux/win-to-altgr_xmodmap.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/linux/win-to-altgr_xmodmap.sh b/linux/win-to-altgr_xmodmap.sh index 67375fc..1736f20 100755 --- a/linux/win-to-altgr_xmodmap.sh +++ b/linux/win-to-altgr_xmodmap.sh @@ -17,15 +17,13 @@ if [ -f ${xmodmap_config_file} ] ; then sleep 2 restore_key=$(cat ${xmodmap_config_file}) xmodmap -e "keycode ${restore_key} = Super_L" - rm -rf ${HOME}/.Xmodmap rm -rf ${xmodmap_config_file} echo "* Restored!" else echo "* Creating mapping of Win-Key to AltGr-Key..." sleep 2 - win_key_detect=$(xmodmap -pke | grep Super_L | grep keycode | head -1 | cut -d " " -f 2) + win_key_detect=$(xmodmap -pke | grep Super_L | tr -s " " | grep keycode | head -1 | cut -d " " -f 2) echo ${win_key_detect} > ${xmodmap_config_file} xmodmap -e "keycode ${win_key_detect} = ISO_Level3_Shift" - echo "keycode ${win_key_detect} = ISO_Level3_Shift" > ${HOME}/.Xmodmap echo "* Created!" fi