From f1e9241e45d6d8a6300274ebb6cf8311ac1f0687 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Thu, 10 Jan 2013 16:53:25 +0900 Subject: [PATCH 1/4] work when ENV{HOSTNAME} not defined --- tmux.conf.pl | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/tmux.conf.pl b/tmux.conf.pl index 5770338..8794c97 100755 --- a/tmux.conf.pl +++ b/tmux.conf.pl @@ -49,16 +49,25 @@ sub set_prefs { set("display-panes-time", "5000"); } +sub get_hostname { + my $hostname = $ENV{"HOSTNAME"}; + if (! $hostname) { + $hostname = `hostname`; + $hostname =~ s/\n//; + } + return $hostname; +} + sub set_status_line { my $user = $ENV{"USER"}; - my $hostname = $ENV{"HOSTNAME"}; + my $hostname = get_hostname(); my $tmux_v = `tmux -V`; $tmux_v =~ s/\n//; set("status-right", "${user}\@${hostname} | ${tmux_v} "); } sub set_colors { - my $hostname = $ENV{"HOSTNAME"}; + my $hostname = get_hostname(); my $color = $color_prefs{$hostname}; if (! $color) { $color = $color_def; From b73ccd5eacf3ff0aa5ed19602aba90263ff66379 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Fri, 11 Jan 2013 16:35:06 +0900 Subject: [PATCH 2/4] fix tmux.conf.pl --- tmux.conf.pl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tmux.conf.pl b/tmux.conf.pl index 8794c97..ccdff19 100755 --- a/tmux.conf.pl +++ b/tmux.conf.pl @@ -42,6 +42,8 @@ sub set_key { } sub set_prefs { + set("base-index", "1"); + set("pane-base-index", "1"); setw("mode-keys", "vi"); set("default-command", "/bin/bash"); set("default-path", $ENV{"HOME"}); From 078bcc4694808275c5ddb6fe7abb902ea9d57fbc Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Mon, 14 Jan 2013 17:09:59 +0900 Subject: [PATCH 3/4] fix git alias graph --- setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.sh b/setup.sh index 629bf58..4fe3516 100755 --- a/setup.sh +++ b/setup.sh @@ -56,7 +56,7 @@ git_config(){ git config --global status.relativePaths false git config --global status.showUntrackedFiles normal git config --global log.date iso - git config --global alias.graph "log --graph --date-order -C -M --pretty=tformat:\"<%C(green)%h%C(reset)> %C(white)%ad%C(reset) [%C(red)%an%C(reset)] %C(yellow)%d%C(reset) %C(white bold)%s%C(reset)\" --all --date=iso -n 499" + git config --global alias.graph "log --graph --date-order -C -M --pretty=tformat:\"%C(green)%h%C(reset) %C(white)%ad%C(reset) %C(red)%an%C(reset)%C(yellow)%d%C(reset) %C(white bold)%s%C(reset)\" --all --date=iso -n 499" git config --global alias.st "status -s -b" git config --global alias.b "branch" git config --global alias.sb "show-branch" From 37a6a9e963aba54ebc1d4d938db8ba4c8f77ac54 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Mon, 14 Jan 2013 17:18:50 +0900 Subject: [PATCH 4/4] fix profile --- profile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/profile b/profile index da477bf..3be2f81 100755 --- a/profile +++ b/profile @@ -2,8 +2,10 @@ # ~/.dotfiles/profile -test -n "$DOTFILES_PROFILE" && return -export DOTFILES_PROFILE=t +# This not works when, for example, inherit parent ENV and load /etc/profile +# again. +#test -n "$DOTFILES_PROFILE" && return +#export DOTFILES_PROFILE=t # export PS1="\$ " export LC_TIME=C