dot

packages and services management
Log | Files | Refs | README

commit 07c9ee5655977a707d07bb45e8f3d829a21fdfe5
parent 3dd6957ec25490f0add3a64007792cadf3a095da
Author: josuah <mail@josuah.net>
Date:   Thu,  5 Jan 2017 00:09:15 +0100

Back to git-prompt

Diffstat:
M.config/dwm/config.h | 2+-
M.local/bin/tty-theme | 32++++++++++++++++++++------------
M.profile | 14+++++++-------
3 files changed, 28 insertions(+), 20 deletions(-)

diff --git a/.config/dwm/config.h b/.config/dwm/config.h @@ -11,7 +11,7 @@ static const char normfgcolor[] = "#999999"; static const char selbordercolor[] = "#ffffff"; static const char selbgcolor[] = "#000000"; static const char selfgcolor[] = "#ffffff"; -static const unsigned int borderpx = 1; /* border pixel of windows */ +static const unsigned int borderpx = 0; /* border pixel of windows */ static const unsigned int snap = 32; /* snap pixel */ static const int showbar = 1; /* 0 means no bar */ static const int topbar = 1; /* 0 means bottom bar */ diff --git a/.local/bin/tty-theme b/.local/bin/tty-theme @@ -294,9 +294,11 @@ F ffffff ' +# 1: chosen theme number + theme() { - number="$1" show=0 i=0 + show=0 i=0 printf '\033[H\033[J' @@ -323,22 +325,28 @@ theme() show=0 fi - [ "$number" ] && [ "$i" -ge "$number" ] && return 0 + [ "$1" ] && [ "$i" -ge "$1" ] && return 0 done << EOF $THEMES EOF } -if [ -z "$1" ] -then - theme - printf '\033]P0000000\033]P7aaaaaa\033[J\n Theme number: ' - read -r number -else - number="$1" -fi +main() +{ + if [ -z "$1" ] + then + theme + printf '\033]P0000000\033]P7aaaaaa\033[J\n Theme number: ' + read -r number + else + number="$1" + fi + + + theme "$number" + printf '\033[J' +} -theme "$number" -printf '\033[J' +main "$@" diff --git a/.profile b/.profile @@ -16,8 +16,8 @@ export EMAIL='mail@josuah.net' export MAIL="$HOME/mail/INBOX" # default commands -export EDITOR='vim' VISUAL="$EDITOR" FCEDIT="$EDITOR" -export PAGER='less' MANPAGER="$PAGER" +export EDITOR='vim' VISUAL='vim' FCEDIT='vim' +export PAGER='less' MANPAGER='less' # dvtm export DVTM_TERM='ansi' @@ -34,11 +34,11 @@ export PS1='$( [ $? -eq 0 ] && color=2 || color=1 [ -z "${PWD##$HOME*}" ] && pwd="~${PWD#$HOME}" || pwd="$PWD" - printf "\033[?6c" # TTY cursor shape - printf "\a" # bell at the end of the command - printf "\033]0;%s\007\n" "$pwd" # terminal name - git rev-parse 2> /dev/null && git -c color.ui=always status -s -b - printf " \033[1;3%sm───\033[m " "$color" + printf "\033[?6c" # TTY cursor shape + printf "\a" # bell at the end of the command + printf "\033]0;%s\007" "$pwd" # terminal name + + printf "\n %s%s\n \033[1;3%sm───\033[m " "$pwd" "$(git-prompt)" "$color" )' export PS2=' > ' export PS3=' > '