dotfiles

Unnamed repository; edit this file 'description' to name the repository.
git clone git://edryd.org/dotfiles
Log | Files | Refs

commit bf5d105e23485906b444909b242a929b0e6c96f2
parent 33798926b6f08f44c76d1c7cf9dddd857afcd2e6
Author: Ed van Bruggen <ed@fred-cb.(none)>
Date:   Thu, 15 Jan 2015 14:10:15 -0800

Merge branch 'master' of https://github.com/edvb54/dotfiles

Diffstat:
bashrc | 4+++-
bin/checkium.sh | 19++++++++++++++++---
bin/edium.sh | 2+-
bin/todoium | 34+++++++++++++++++-----------------
config/htop/htoprc | 2+-
config/terminator/config | 3++-
themes/AllGray/openbox-3/bullet.xbm | 4++++
themes/AllGray/openbox-3/close.xbm | 4++++
themes/AllGray/openbox-3/close_hover.xbm | 4++++
themes/AllGray/openbox-3/close_pressed.xbm | 4++++
themes/AllGray/openbox-3/desk.xbm | 4++++
themes/AllGray/openbox-3/desk_toggled.xbm | 4++++
themes/AllGray/openbox-3/iconify.xbm | 4++++
themes/AllGray/openbox-3/iconify_hover.xbm | 4++++
themes/AllGray/openbox-3/iconify_pressed.xbm | 4++++
themes/AllGray/openbox-3/max.xbm | 4++++
themes/AllGray/openbox-3/max_disabled.xbm | 4++++
themes/AllGray/openbox-3/max_hover.xbm | 4++++
themes/AllGray/openbox-3/max_toggled.xbm | 4++++
themes/AllGray/openbox-3/themerc | 112+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
vimrc | 3+++
21 files changed, 207 insertions(+), 24 deletions(-)

diff --git a/bashrc b/bashrc @@ -68,13 +68,15 @@ PS2='\[${White}\]\$\[${Color_Off}\] ' export EDITOR='vim' # export EDITOR='emacs' +export gh='https://github.com' + # allow for color support in terminal if [ "$TERM" == "xterm" ]; then export TERM=xterm-256color fi # update TMUX if ssh'ed into computer in TMUX -[[ -z "$TMUX" ]] && exec tmux -2 +# [[ -z "$TMUX" ]] && exec tmux -2 # load other files source ~/dotfiles/bin/edium.sh diff --git a/bin/checkium.sh b/bin/checkium.sh @@ -1,15 +1,27 @@ #!/usr/bin/env bash checkium_color() { + # set color depending on if the last command succeed or not if [[ $? -eq 0 ]]; then echo -ne "\033[0;32m" return 0 else echo -ne "\033[0;31m" + # need to return a value so that the other functions here will + # know if last command ran OK or not, the previous code will return 0 return 1 fi } +checkium_custom() { + if [[ $? -eq 0 ]]; then + local char=$1 + else + local char=$2 + fi + echo $char +} + checkium_check() { if [[ $? -eq 0 ]]; then local char="✓" @@ -29,15 +41,16 @@ checkium_face() { } checkium_random_face() { + # set arrays for different faces to randomly choose from if [[ $? -eq 0 ]]; then local faces=(":)" ":D") else local faces=(":P" ":(" ":(" ":O" ":\\" ":|" ":(" ":(") fi - local facels=${#faces[*]} - local randfacels=${faces[$(($RANDOM % $facels))]} - echo $randfacels + local facels=${#faces[*]} # get how many elements are in each array + local randfacels=${faces[$((RANDOM % facels))]} # randomly choose an array element + echo $randfacels # print that face } diff --git a/bin/edium.sh b/bin/edium.sh @@ -6,7 +6,7 @@ ed() { if [[ "$@" == "" ]]; then $EDITOR . else - $EDITOR $@ + $EDITOR "$@" fi } diff --git a/bin/todoium b/bin/todoium @@ -2,16 +2,16 @@ # set varibles version="v0.3" -progname="`basename $0`" +progname="$(basename "$0")" # manually change this path if you want to use your own folder tododir="$HOME/.todo/" # make sure $tododir exists -if [ ! -d $tododir ]; then - printf "Warning: %s does not exist\n" $tododir +if [ ! -d "$tododir" ]; then + printf "Warning: %s does not exist\n" "$tododir" printf "Making it for you ... " - mkdir -p $tododir + mkdir -p "$tododir" printf "done\n" fi @@ -34,22 +34,22 @@ Usage: %s [OPTION] [todo] } todo_tree() { - local treevar="`tree $tododir`" - local treevar="`echo "$treevar" | sed -e "s/files/todos/g" -`" - local treevar="`echo "$treevar" | sed -e "s/directory/sub-folder/g" -`" - local treevar="`echo "$treevar" | sed -e "s/directories/sub-folders/g" -`" + local treevar="$(tree "$tododir")" + local treevar="$(echo "$treevar" | sed -e "s/files/todos/g" -)" + local treevar="$(echo "$treevar" | sed -e "s/directory/sub-folder/g" -)" + local treevar="$(echo "$treevar" | sed -e "s/directories/sub-folders/g" -)" echo "$treevar" } # handle options and file creation case "$1" in - # if nothing is typed show the help - ""|-h|--help) - todo_help + # type `todoium -l` or `todoium` to list your todos + ""|-l|--list) + ls -tr1 "$tododir" ;; - # use `todoium -l` to list your todos - -l|--list) - ls -1 $tododir + # use `todoium -h` to show help + -h|--help) + todo_help ;; # use `todoium -t` to list your todos in a tree -t|--tree) @@ -57,13 +57,13 @@ case "$1" in ;; # use `todoium -p` to echo where the todos are being stored -p|--path) - printf "%s\n" $tododir + printf "%s\n" "$tododir" ;; # if no options is specified then use $1 to create file *) - cd $tododir + cd "$tododir" touch "$1" ;; esac -# vim: set shiftwidth=4 tabstop=4 expandtab: +# vim: set shiftwidth=4 tabstop=4: diff --git a/config/htop/htoprc b/config/htop/htoprc @@ -15,7 +15,7 @@ tree_view=0 header_margin=1 detailed_cpu_time=0 cpu_count_from_zero=0 -color_scheme=0 +color_scheme=5 delay=15 left_meters=CPU LeftCPUs Battery Uptime Clock left_meter_modes=3 1 1 2 2 diff --git a/config/terminator/config b/config/terminator/config @@ -2,6 +2,7 @@ title_transmit_bg_color = "#000000" title_inactive_bg_color = "#000000" [keybindings] + full_screen = None [profiles] [[default]] use_system_font = False @@ -10,7 +11,7 @@ use_custom_command = True show_titlebar = False background_darkness = 0.32 - font = Monospace 11 + font = Monospace 7 [[solarized-clear]] scrollbar_position = hidden palette = "#073642:#dc322f:#859900:#b58900:#268bd2:#d33682:#2aa198:#eee8d5:#002b36:#cb4b16:#586e75:#657b83:#839496:#6c71c4:#93a1a1:#fdf6e3" diff --git a/themes/AllGray/openbox-3/bullet.xbm b/themes/AllGray/openbox-3/bullet.xbm @@ -0,0 +1,4 @@ +#define bullet_width 4 +#define bullet_height 7 +static unsigned char bullet_bits[] = { + 0x01, 0x03, 0x07, 0x0f, 0x07, 0x03, 0x01 }; diff --git a/themes/AllGray/openbox-3/close.xbm b/themes/AllGray/openbox-3/close.xbm @@ -0,0 +1,4 @@ +#define close_width 6 +#define close_height 6 +static unsigned char close_bits[] = { + 0x33, 0x3f, 0x1e, 0x1e, 0x3f, 0x33 }; diff --git a/themes/AllGray/openbox-3/close_hover.xbm b/themes/AllGray/openbox-3/close_hover.xbm @@ -0,0 +1,4 @@ +#define close_width 6 +#define close_height 6 +static unsigned char close_bits[] = { + 0x33, 0x3f, 0x1e, 0x1e, 0x3f, 0x33 }; diff --git a/themes/AllGray/openbox-3/close_pressed.xbm b/themes/AllGray/openbox-3/close_pressed.xbm @@ -0,0 +1,4 @@ +#define close_width 6 +#define close_height 6 +static unsigned char close_bits[] = { + 0x33, 0x3f, 0x1e, 0x1e, 0x3f, 0x33 }; diff --git a/themes/AllGray/openbox-3/desk.xbm b/themes/AllGray/openbox-3/desk.xbm @@ -0,0 +1,4 @@ +#define desk_width 6 +#define desk_height 6 +static unsigned char desk_bits[] = { + 0x33, 0x33, 0x00, 0x00, 0x33, 0x33 }; diff --git a/themes/AllGray/openbox-3/desk_toggled.xbm b/themes/AllGray/openbox-3/desk_toggled.xbm @@ -0,0 +1,4 @@ +#define desk_toggle_width 6 +#define desk_toggle_height 6 +static unsigned char desk_toggle_bits[] = { + 0x00, 0x1e, 0x1a, 0x16, 0x1e, 0x00 }; diff --git a/themes/AllGray/openbox-3/iconify.xbm b/themes/AllGray/openbox-3/iconify.xbm @@ -0,0 +1,4 @@ +#define iconify_width 6 +#define iconify_height 6 +static unsigned char iconify_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x3f, 0x3f }; diff --git a/themes/AllGray/openbox-3/iconify_hover.xbm b/themes/AllGray/openbox-3/iconify_hover.xbm @@ -0,0 +1,4 @@ +#define iconify_width 6 +#define iconify_height 6 +static unsigned char iconify_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x3f, 0x3f }; diff --git a/themes/AllGray/openbox-3/iconify_pressed.xbm b/themes/AllGray/openbox-3/iconify_pressed.xbm @@ -0,0 +1,4 @@ +#define iconify_width 6 +#define iconify_height 6 +static unsigned char iconify_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x3f, 0x3f }; diff --git a/themes/AllGray/openbox-3/max.xbm b/themes/AllGray/openbox-3/max.xbm @@ -0,0 +1,4 @@ +#define max_width 6 +#define max_height 6 +static unsigned char max_bits[] = { + 0x3e, 0x22, 0x2f, 0x29, 0x39, 0x0f }; diff --git a/themes/AllGray/openbox-3/max_disabled.xbm b/themes/AllGray/openbox-3/max_disabled.xbm @@ -0,0 +1,4 @@ +#define max_width 6 +#define max_height 6 +static unsigned char max_bits[] = { + 0x3f, 0x3f, 0x21, 0x21, 0x21, 0x3f }; diff --git a/themes/AllGray/openbox-3/max_hover.xbm b/themes/AllGray/openbox-3/max_hover.xbm @@ -0,0 +1,4 @@ +#define max_width 6 +#define max_height 6 +static unsigned char max_bits[] = { + 0x3e, 0x22, 0x2f, 0x29, 0x39, 0x0f }; diff --git a/themes/AllGray/openbox-3/max_toggled.xbm b/themes/AllGray/openbox-3/max_toggled.xbm @@ -0,0 +1,4 @@ +#define max_toggled_width 6 +#define max_toggled_height 6 +static unsigned char max_toggled_bits[] = { + 0x3c, 0x27, 0x25, 0x3d, 0x11, 0x1f }; diff --git a/themes/AllGray/openbox-3/themerc b/themes/AllGray/openbox-3/themerc @@ -0,0 +1,112 @@ +# AllGray by saraithegeek +# mod of moka by rent0n | ret0n86.deviantart.com which is in itself a mod of mookid by bl1nks + +# Window geometry +padding.width: 3 +padding.height: 0 +border.width: 3 +window.client.padding.width: 0 +window.client.padding.height: 0 +window.handle.width: 0 + +#Menu geometry +menu.border.width: 3 +menu.overlap.x: -5 +menu.overlap.y: 0 + +# Border colors +window.*.border.color: #333333 +menu.border.color: #333333 +window.active.client.color: #333333 +window.inactive.client.color: #333333 + +# Text shadows +window.active.label.text.font: shadow=n +window.inactive.label.text.font: shadow=n +menu.items.font: shadow=n +menu.title.text.font: shadow=n + +# Window title justification +window.label.text.justify: right + +# Window +window.*.title.bg: flat +window.*.title.bg.color: #333333 + +window.*.label.bg: Parentrelative +window.active.label.text.color: #666666 +window.inactive.label.text.color: #333333 + +window.active.button.unpressed.bg: Flat +window.active.button.unpressed.bg.color: #333333 +window.active.button.unpressed.image.color: #333333 + +window.active.button.pressed.bg: Flat +window.active.button.pressed.bg.color: #333333 +window.active.button.pressed.image.color: #ecedee + +window.active.button.disabled.bg: Flat +window.active.button.disabled.bg.color: #333333 +window.active.button.disabled.image.color: #333333 + +window.active.button.toggled.bg: Flat +window.active.button.toggled.bg.color: #333333 +window.active.button.toggled.image.color: #666666 + +window.active.button.hover.bg: Flat +window.active.button.hover.bg.color: #333333 +window.active.button.hover.image.color: #666666 + +window.inactive.button.unpressed.bg: Flat +window.inactive.button.unpressed.bg.color: #333333 +window.inactive.button.unpressed.image.color: #333333 + +window.inactive.button.pressed.bg: Flat +window.inactive.button.pressed.bg.color: #333333 +window.inactive.button.pressed.image.color: #ecedee + +window.inactive.button.disabled.bg: Flat +window.inactive.button.disabled.bg.color: #333333 +window.inactive.button.disabled.image.color: #333333 + +window.inactive.button.toggled.bg: Flat +window.inactive.button.toggled.bg.color: #333333 +window.inactive.button.toggled.image.color: #333333 + +window.inactive.button.hover.bg: Flat +window.inactive.button.hover.bg.color: #333333 +window.inactive.button.hover.image.color: #666666 + +# Menus +menu.title.bg: Flat +menu.title.bg.color: #333333 +menu.title.text.color: #ecedee +menu.title.text.justify: right + +menu.items.bg: Flat Solid +menu.items.bg.color: #fafafa +menu.items.text.color: #333333 +menu.items.disabled.text.color: #303030 + +menu.items.active.bg: Flat +menu.items.active.bg.color: #333333 +menu.items.active.text.color: #ecedee +menu.items.active.disabled.text.color: #434343 + +#osd +osd.border.width: 2 +osd.border.color: #333333 + +osd.bg: flat solid +osd.bg.color: #fafafa +osd.bg.colorTo: #fafafa +osd.bg.border.color: #333333 +osd.label.bg: parentrelative +osd.label.text.color: #333333 + +osd.hilight.bg: flat solid +osd.hilight.bg.color: #333333 + +osd.unhilight.bg: flat solid +osd.unhilight.bg.color: #ecedee + diff --git a/vimrc b/vimrc @@ -288,6 +288,9 @@ nnoremap Q :<Up><CR> vnoremap > >gv vnoremap < <gv +nnoremap <C-N> :bnext<CR> +nnoremap <C-P> :bprev<CR> + " pair completion{{{2 inoremap { {}<Left> inoremap {<CR> {<CR>}<Esc>O