From 856eac8d97c7e492ba137470a763de67f326ef6b Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Mon, 9 Sep 2013 14:23:42 +0900 Subject: [PATCH 1/3] update my_ps1_scale with stty --- bashrc | 5 ++++- xinitrc | 8 ++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/bashrc b/bashrc index b1ac3bd..7f0aaaa 100755 --- a/bashrc +++ b/bashrc @@ -810,7 +810,10 @@ test -n "$SSH_CONNECTION" && __my_ps1_ssh_str="${__my_c5}SSH${__my_cdef} " __my_ps1_scale(){ local last=$? - printf "${LINES}x${COLUMNS}" + if null type stty && ! iswindows + then + stty size | tr -d $'\n' | tr " " x + fi return $last } diff --git a/xinitrc b/xinitrc index 68f3893..4d2e6ba 100644 --- a/xinitrc +++ b/xinitrc @@ -1,7 +1,15 @@ +#!/bin/sh + test -n "$DISPLAY" || return test -z "$ROXTERM_PID" || return test -z "$SSH_CONNECTION" || return +case "$TERM" in + xterm*) return;; +esac + +unset TMUX + setxkbmap -layout "jp" test "`hostname`" == "arch-aspireone" && setxkbmap -model "acer_laptop" -layout "jp" # this line must comes first From f5d9e40f3a528fc61d3f603c913ae2feea24ddea Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Mon, 9 Sep 2013 14:42:07 +0900 Subject: [PATCH 2/3] uncomment --- bashrc | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/bashrc b/bashrc index 5b6db9b..7e51452 100755 --- a/bashrc +++ b/bashrc @@ -888,12 +888,14 @@ then __my_cdef="\[\e[0m\]" fi -export _LAST_STATUS=$? -__my_export_last_status(){ - export _LAST_STATUS=$? - echo $_LAST_STATUS - return $_LAST_STATUS -} +# export _LAST_STATUS=a +# __my_export_last_status(){ +# local last=$? +# echo $last +# export _LAST_STATUS=$last +# echo $_LAST_STATUS +# return $last +# } _ps1_bash="\ ${__my_c4}:: ${__my_cdef}[${__my_c2}\u@\H${__my_cdef}:${__my_c1}\w/${__my_cdef}]\$(__my_ps1_git)\$(__my_ps1_bttry)\$(__my_ps1_ipaddr)\$(__my_ps1_moc)\n\ From b0b6c06dbb6fdc5bca45ff0bd8f222226e2bf3a9 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Tue, 10 Sep 2013 14:30:10 +0900 Subject: [PATCH 3/3] update my_ps1_scale for windows --- bashrc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bashrc b/bashrc index 7e51452..ce59997 100755 --- a/bashrc +++ b/bashrc @@ -810,9 +810,10 @@ test -n "$SSH_CONNECTION" && __my_ps1_ssh_str="${__my_c5}SSH${__my_cdef} " __my_ps1_scale(){ local last=$? - if null type stty && ! iswindows + if null type stty && ! ismsys then stty size | tr -d $'\n' | tr " " x + printf " " fi return $last }