From b75ccc7266221dd5281932ef017ff25195d976a9 Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Sat, 10 Oct 2009 14:57:00 -0400 Subject: [PATCH] Change default $MODKEY to Mod4. --- alternative_wmiircs/plan9port/wmiirc | 2 +- alternative_wmiircs/ruby/config.yaml | 4 ++-- rc/wmiirc.sh | 16 +++++++++++++++- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/alternative_wmiircs/plan9port/wmiirc b/alternative_wmiircs/plan9port/wmiirc index ebef8ed4..ee89608e 100755 --- a/alternative_wmiircs/plan9port/wmiirc +++ b/alternative_wmiircs/plan9port/wmiirc @@ -7,7 +7,7 @@ oldpath=$path; path=($PLAN9/bin $path) # WMII Configuration # Keys -MODKEY=Mod1 +MODKEY=Mod4 UP=k DOWN=j LEFT=h diff --git a/alternative_wmiircs/ruby/config.yaml b/alternative_wmiircs/ruby/config.yaml index e5ab63e6..9872561b 100644 --- a/alternative_wmiircs/ruby/config.yaml +++ b/alternative_wmiircs/ruby/config.yaml @@ -137,12 +137,12 @@ control: ## # The wmii "grabmod" setting. # - grab: Mod1 + grab: Mod4 ## # Prefix for all shortcuts. # - mod: Mod1 + mod: Mod4 ## # Direction keys. diff --git a/rc/wmiirc.sh b/rc/wmiirc.sh index 380f2511..e164bd9b 100644 --- a/rc/wmiirc.sh +++ b/rc/wmiirc.sh @@ -3,8 +3,9 @@ wmiiscript=wmiirc # For wmii.sh . wmii.sh + # Configuration Variables -MODKEY=Mod1 +MODKEY=Mod4 UP=k DOWN=j LEFT=h @@ -24,6 +25,19 @@ export WMII_FONT='-*-fixed-medium-r-*-*-13-*-*-*-*-*-*-*' set -- $(echo $WMII_NORMCOLORS $WMII_FOCUSCOLORS) export WMII_TERM="@TERMINAL@" +if ! test -d "${WMII_CONFPATH%%:*}"; then + mkdir "${WMII_CONFPATH%%:*}" + res=$(wihack -type DIALOG xmessage -nearmouse -buttons Windows,Alt -print -fn $WMII_FONT \ + "Welcome to wmii,$wi_newline$wi_newline" \ + "Most of wmii's default key bindings make use of the$wi_newline" \ + "Windows key, or equivalent. For keyboards lacking such$wi_newline" \ + "a key, many users change this to the Alt key.$wi_newline$wi_newline" \ + "Which would you prefer?") + [ "$res" = "Alt" ] && MODKEY=Mod1 + echo "MODKEY=$MODKEY" >"${WMII_CONFPATH%%:*}/wmiirc_local" + chmod +x "${WMII_CONFPATH%%:*}/wmiirc_local" +fi + # Menu history hist="${WMII_CONFPATH%%:*}/history" histnum=5000