From 82b19bc71826859c7c2ebb638a0a250446bf4b76 Mon Sep 17 00:00:00 2001 From: Barak Michener Date: Tue, 21 Jan 2014 14:50:52 -0500 Subject: [PATCH 1/3] add setup script --- .setup_new_env.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 .setup_new_env.sh diff --git a/.setup_new_env.sh b/.setup_new_env.sh new file mode 100755 index 0000000..1ce4ac8 --- /dev/null +++ b/.setup_new_env.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +set -e + +function main { + mv -f .* $HOME + mv -f bin $HOME + cd $HOME + git update --init --recursive +} + +read -p "This will overwrite files in $HOME. Type 'yes' to confirm." confirm +if [ "$confirm" == "yes" ]; then + main; +fi From f7f01cbf7bd41f7bfe35bc40c244fe16aa8bfe24 Mon Sep 17 00:00:00 2001 From: Barak Michener Date: Tue, 21 Jan 2014 15:03:58 -0500 Subject: [PATCH 2/3] fix --- .setup_new_env.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.setup_new_env.sh b/.setup_new_env.sh index 1ce4ac8..e48f820 100755 --- a/.setup_new_env.sh +++ b/.setup_new_env.sh @@ -1,15 +1,13 @@ #!/bin/bash -set -e - function main { mv -f .* $HOME mv -f bin $HOME cd $HOME - git update --init --recursive + git submodule update --init --recursive } -read -p "This will overwrite files in $HOME. Type 'yes' to confirm." confirm +read -p "This will overwrite files in $HOME. Type 'yes' to confirm: " confirm if [ "$confirm" == "yes" ]; then main; fi From ec8785adbdf70e06fe682c1732ea2bd078406d5b Mon Sep 17 00:00:00 2001 From: Barak Michener Date: Wed, 22 Jan 2014 13:49:33 -0500 Subject: [PATCH 3/3] macros --- .bash_aliases | 1 + .config/awesome/rc.lua | 2 ++ bin/run_browser | 11 +++++++++++ 3 files changed, 14 insertions(+) create mode 100755 bin/run_browser diff --git a/.bash_aliases b/.bash_aliases index 43fecba..4d7c0be 100644 --- a/.bash_aliases +++ b/.bash_aliases @@ -53,6 +53,7 @@ alias grep="grep --color=auto" alias dvtm="dvtm -m \"^w\"" alias tm="tmux -2 attach" alias ppjson="python -mjson.tool" +alias miranda="ssh -D 7777 -Y barak@miranda.barakmich.com" #alias tmux-pwn='tmux list-clients | sed "s|^\(/dev/ttys[0-9]\+\).*\[\([0-9]\+x[0-9]\+\).*$|\2 \1|" | sort -r -n | tail -n +2 | cut -d " " -f 2 | xargs -n 1 tmux detach-client -t' #Cosmetic/useful diff --git a/.config/awesome/rc.lua b/.config/awesome/rc.lua index 73339e2..6060ba2 100644 --- a/.config/awesome/rc.lua +++ b/.config/awesome/rc.lua @@ -54,6 +54,7 @@ naughty.config.default_preset.font = "Inconsolata 14" terminal = "run_terminal" editor = os.getenv("EDITOR") or "vim" editor_cmd = terminal .. " -e " .. editor +browser = "run_browser" -- Default modkey. -- Usually, Mod4 is the key with a logo between Control and Alt. @@ -343,6 +344,7 @@ globalkeys = awful.util.table.join( -- Standard program awful.key({ modkey, "Shift" }, "Return", function () awful.util.spawn(terminal) end), + awful.key({ modkey, "Shift" }, ",", function () awful.util.spawn(browser) end), awful.key({ modkey, "Control" }, "r", awesome.restart), awful.key({ modkey, "Shift" }, "q", awesome.quit), diff --git a/bin/run_browser b/bin/run_browser new file mode 100755 index 0000000..15440ea --- /dev/null +++ b/bin/run_browser @@ -0,0 +1,11 @@ +#!/bin/bash + +if [ -n "`which firefox`" ]; then + firefox +elif [ -n "`which iceweasel`" ]; then + iceweasel +elif [ -n "`which google-chrome`" ]; then + google-chrome +else + exit 1 +fi