dot

packages and services management
Log | Files | Refs | README

commit 79ce311dc4f8862d3f758b81fc411e58cd120ba9
parent 7d23ee6c75257e7b032aa69d4c60d920665508ee
Author: josuah <mail@josuah.net>
Date:   Wed,  5 Oct 2016 23:38:52 -0400

Settings cleanup

Diffstat:
Mshell/.profile | 122++++++++++++++++++++++++++++++++-----------------------------------------------
Mtmux/.tmux.conf | 37+++++++++++++++++++++++++------------
2 files changed, 74 insertions(+), 85 deletions(-)

diff --git a/shell/.profile b/shell/.profile @@ -7,11 +7,11 @@ #\/============================================================================= # Shell configuration, for any shell (dash, zsh, mksh, bash, busybox's ash...) -# Prevent from running twice - +# Prevents from running twice [ "$PROFILE_RUN" ] && return 0 export PROFILE_RUN=1 + # VARIABLES #------------------------------------------------------------------------------- # Parse and merge ~/.pam_environment @@ -25,6 +25,33 @@ export PATH="$CONFIG/bin:$LOCAL/bin:$PATH" export PS1='$(ps1)' export PS2='| ' +# Black Red Green Yellow Blue Purple Cyan White +THEMES=" +solarized_light \ +P0ffddbb P1d0154b P2779900 P3ffa700 P4096daf P5dd6699 P600aa88 P7000000\ +P8bb9988 P9d0154b PA779900 PBffa700 PC096daf PD897f74 PE00aa88 PF222222\ + +ghost_in_the_shell \ +P0000000 P191265C P2439a64 P3ccdd66 P455aaaa P5516583 P64a8f86 P799bbbb\ +P8334444 P9E71E5B PA72f4a0 PBf5ff8B PC99bbff PD676cb0 PE00ffff PFffffff\ + +coal \ +P0000000 P1ee3333 P288ff44 P3ffcc55 P477aaaa P5888888 P655ee99 P7cccccc\ +P8555555 P9ff6666 PAaaff66 PBffff99 PCaaddff PDaaaaaa PE99ffbb PFffffff\ + +drakula \ +P0282a36 P1cc4343 P242c763 P3ffb86c P46272a4 P5bd93f9 P66fb9c9 P7e6e6d5\ +P8888db4 P9ff5555 PA50fa7b PBf1fa8c PC8196d6 PDff79c6 PE8be9fd PFffffff\ + +gotham \ +P00a0f14 P1c33027 P226a98b P3edb54c P4195465 P54e5165 P633859d P798d1ce\ +P8406068 P9d26939 PA30dbb3 PBffd280 PC268099 PD888ba5 PE599caa PFd3ebe9\ + +monokai \ +P048483e P1dc2566 P28fc029 P3d4c96e P455bcce P59358fe P656b7a5 P7acada1\ +P876715e P9fa2772 PAa7e22e PBe7db75 PC66d9ee PDae82ff PE66efd5 PFdfe1d3\ +" + # ALIAS 2016-10-05 #------------------------------------------------------------------------------- @@ -35,7 +62,7 @@ alias la='l -A' alias lla='l -Alh' alias v='$VISUAL' alias p='$PAGER' -alias t='tmux' +alias t='tmux attach &>/dev/null || tmux new' alias f='find . -type f ! -path "*/.git/*" | fzf --margin=3,6' alias d='find . -type d ! -path "*/.git/*" | fzf --margin=3,6' alias c='cd "$(find . -maxdepth 4 -mindepth 1 -type d | fzf --margin=3,6)"' @@ -160,7 +187,7 @@ buildit() } # -# FrameBuffer Video player based on ffplay +# FrameBuffer Video player based on mplayer # fbv() { @@ -173,33 +200,6 @@ fbv() mplayer -vm -vo fbdev2 "$video" -vf scale -zoom -x "$x" -y "$y" } -# -# Prevent scaring people with a monospace black term -# -day() -{ - if [ "$TERM" = linux ] - then - printf "$solarized_light" - setfont LatGrkCyr-12x22.psfu.gz - clear - else - setterm --inversescreen on - fi -} - -night() -{ - if [ "$TERM" = linux ] - then - printf "$coal" - setfont - clear - else - setterm --inversescreen off - fi -} - rotate() { case "$1" in @@ -207,59 +207,35 @@ rotate() r | right ) printf 1 ;; d | down ) printf 2 ;; l | left ) printf 3 ;; - esac | sudo tee /sys/class/graphics/fbcon/rotate_all + esac | sudo tee /sys/class/graphics/fbcon/rotate_all > /dev/null } - -# TTY THEMES 2016-10-05 -#------------------------------------------------------------------------------- - -# Black Red Green Yellow -# Blue Magenta Cyan White - -while read name theme -do - THEMES="$( printf '%s\t%s\n%s' "$name" "$theme" "$THEMES")" - THEMES_NAMES="$(printf '%s\n%s' "$name" "$THEMES_NAMES")" -done << EOF -solarized_light \ -P0ffddbb P1d0154b P2779900 P3ffa700 P4096daf P5dd6699 P600aa88 P7000000\ -P8bb9988 P9d0154b PA779900 PBffa700 PC096daf PD897f74 PE00aa88 PF222222\ - -ghost_in_the_shell \ -P0000000 P191265C P2439a64 P3ccdd66 P455aaaa P5516583 P64a8f86 P799bbbb\ -P8334444 P9E71E5B PA72f4a0 PBf5ff8B PC99bbff PD676cb0 PE00ffff PFffffff\ - -coal \ -P0000000 P1ee3333 P288ff44 P3ffcc55 P477aaaa P5888888 P655ee99 P7cccccc\ -P8555555 P9ff6666 PAaaff66 PBffff99 PCaaddff PDaaaaaa PE99ffbb PFffffff\ - -drakula \ -P0282a36 P1cc4343 P242c763 P3ffb86c P46272a4 P5bd93f9 P66fb9c9 P7e6e6d5\ -P844475a P9ff5555 PA50fa7b PBf1fa8c PC8196d6 PDff79c6 PE8be9fd PFffffff\ - -gotham \ -P00a0f14 P1c33027 P226a98b P3edb54c P4195465 P54e5165 P633859d P798d1ce\ -P810151b P9d26939 PA30dbb3 PBffd280 PC268099 PD888ba5 PE599caa PFd3ebe9\ - -monokai \ -P048483e P1dc2566 P28fc029 P3d4c96e P455bcce P59358fe P656b7a5 P7acada1\ -P876715e P9fa2772 PAa7e22e PBe7db75 PC66d9ee PDae82ff PE66efd5 PFcfd0c2\ - -EOF - theme() { - local name="${1-$(printf '%s\n' "$THEMES_NAMES" | fzf --margin=10,20)}" - printf "$(printf %s "$THEMES" | sed -n "/$name/"'s/P/\\033]P/g p')" + printf "$(printf %s "$THEMES" | sed -n "/${1-$( + printf '%s' "$THEMES" | sed 's/ .*$//' | fzf --margin=10,20 + )}/ s/P/\\\\033]P/g p")" + clear } -[ "$TERM" = 'linux' ] && theme coal +color() +{ + for in in in in + do + for i in 1 2 3 4 5 6 7 + do printf ' \033[3%sm██\033[1m█\033[0m\033[3%sm██' $i $i + done + printf '\n' + done + +} # STARTUP 2016-10-05 #------------------------------------------------------------------------------- +[ "$TERM" = 'linux' ] && theme drakula + # Attach to tmux right away command -v tmux &> /dev/null && if [ -z "$TMUX" ] then tmux attach &> /dev/null || tmux new diff --git a/tmux/.tmux.conf b/tmux/.tmux.conf @@ -4,17 +4,20 @@ # / ___\/ __ __ \ / / / / \ \' / / ___\ / __ \ / __ \ / .'_ # / / / / / / / // /_/ / ,' ,'__ / /__ / /_/ // / / // ___/ # \/ \/ \/ \/ \____/ /_,\_\ \/ \____\ \____/ \/ \/ \/ 2016-10-05 -#============================================================== - - -# KEYBINDINGS 2016-10-05 -#------------------------------------------------------------------------------- +#=============================================================================== +# Editing mode set -g status-keys vi + +# Leader set -g prefix C-Space unbind C-b bind C-Space send-key C-Space + +# KEYBINDINGS 2016-10-05 +#------------------------------------------------------------------------------- + # Copy mode bind -t vi-copy v begin-selection bind -t vi-copy C-v rectangle-toggle @@ -51,7 +54,20 @@ bind S new-session\; send ". ~/.config/tmux/new-session\n" bind r source ~/.tmux.conf\; display "Config loaded" -# GLOBAL OPTIONS 2016-10-03 +# HOOKS 2016-10-05 +#------------------------------------------------------------------------------- + +# Refresh status line +set-hook after-select-pane 'refresh-client -S' +set-hook after-select-window 'refresh-client -S' +set-hook after-select-window 'refresh-client -S' +set-hook after-next-window 'refresh-client -S' +set-hook after-previous-window 'refresh-client -S' +set-hook after-choose-tree 'refresh-client -S' +set-hook after-switch-client 'refresh-client -S' + + +# OPTIONS 2016-10-05 #------------------------------------------------------------------------------- set -g base-index 1 @@ -62,8 +78,7 @@ set -g repeat-time 500 set -g detach-on-destroy off -# GLOBAL APPEARANCE 2016-10-04 -#------------------------------------------------------------------------------- +# GLOBAL APPEARANCE # Messages set -g message-style bold,fg=green @@ -81,8 +96,7 @@ set -g clock-mode-style 24 set -g mode-style bg=white,fg=black -# STATUS 2016-10-04 -#------------------------------------------------------------------------------- +# STATUS # Global set -g status-position top @@ -115,8 +129,7 @@ set -g window-status-bell-style fg=white,bg=red set -g window-status-activity-style fg=white,bg=yellow -# BORDERS 2016-10-04 -#------------------------------------------------------------------------------- +# BORDERS set -g pane-border-style bold,fg=white set -g pane-active-border-style bold,fg=white