From be1d96969bef04c84f894a7e024b66bb948bbf5b Mon Sep 17 00:00:00 2001 From: "Peter J. Holzer" Date: Mon, 8 Apr 2019 15:11:36 +0200 Subject: [PATCH 1/4] Add .psqlrc --- .psqlrc | 5 +++++ GNUmakefile | 1 + 2 files changed, 6 insertions(+) create mode 100644 .psqlrc diff --git a/.psqlrc b/.psqlrc new file mode 100644 index 0000000..14ef0f7 --- /dev/null +++ b/.psqlrc @@ -0,0 +1,5 @@ +\pset null '(∅)' +\pset linestyle unicode +\pset border 2 +\pset unicode_border_linestyle double +\timing on diff --git a/GNUmakefile b/GNUmakefile index 2b1f3c5..538bfae 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -7,6 +7,7 @@ ALLSRC = \ .zshenv \ .zshrc \ .gitconfig \ + .psqlrc \ .vim/colors/hjp.vim \ .vimrc \ From 6015c87af5a917106b83849a190f57b81982bf5d Mon Sep 17 00:00:00 2001 From: "Peter J. Holzer" Date: Thu, 11 Apr 2019 21:33:55 +0200 Subject: [PATCH 2/4] Add \x auto to .psqlrc --- .psqlrc | 1 + 1 file changed, 1 insertion(+) diff --git a/.psqlrc b/.psqlrc index 14ef0f7..1f136f9 100644 --- a/.psqlrc +++ b/.psqlrc @@ -3,3 +3,4 @@ \pset border 2 \pset unicode_border_linestyle double \timing on +\x auto From e5c28e48d26e8a17f132c819625deabe1ff48eae Mon Sep 17 00:00:00 2001 From: "Peter J. Holzer" Date: Sat, 18 May 2019 10:25:23 +0200 Subject: [PATCH 3/4] Use background from environment --- .vimrc | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.vimrc b/.vimrc index 9c94eb1..887cfd2 100644 --- a/.vimrc +++ b/.vimrc @@ -19,12 +19,20 @@ set sm set sw=4 set tw=72 set viminfo='100,<50,s10,h,% + if has('reltime') set incsearch endif -colorscheme hjp -syntax on +if $BG == "light" + set bg=light + colorscheme hjp + syntax on +elseif $BG == "dark" + set bg=dark + syntax on +endif + map :cp map :cn map!  >I<yypa/O From 8a0063cd7e6d43bfd29cfecfdcb5d1f779daf642 Mon Sep 17 00:00:00 2001 From: "Peter J. Holzer" Date: Sat, 18 May 2019 10:28:03 +0200 Subject: [PATCH 4/4] Set BG in .zxtermcolors --- .znewterm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.znewterm b/.znewterm index fd204fa..1d30148 100644 --- a/.znewterm +++ b/.znewterm @@ -51,7 +51,7 @@ then then . ~/.zxtermcolors else - perl -e 'printf(qq{if whence xtermcontrol >/dev/null\nthen\nxtermcontrol --bg "#%02X%02X%02X"\nfi\n}, map { rand(128)+128 } qw(1 1 1))' > ~/.zxtermcolors + perl -e 'printf(qq{if whence xtermcontrol >/dev/null\nthen\nxtermcontrol --bg "#%02X%02X%02X"\nexport BG=light\nfi\n}, map { rand(128)+128 } qw(1 1 1))' > ~/.zxtermcolors fi fi